mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 17:53:28 +00:00
Re-add kinds
config field to tbot with a deprecation warning (#12933)
* Re-add `kinds` config field with a deprecation warning This re-adds the `kinds` config field with a deprecation warning. We removed the field in #11596 but due to strict YAML parsing this causes existing otherwise compatible configs to error out. * Update tool/tbot/config/config_destination.go Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com> * Use standardized deprecation comment formatting Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com>
This commit is contained in:
parent
e8cfe5df6d
commit
17dbc2d287
|
@ -51,6 +51,11 @@ type DestinationConfig struct {
|
|||
Roles []string `yaml:"roles,omitempty"`
|
||||
Configs []TemplateConfig `yaml:"configs,omitempty"`
|
||||
|
||||
// Kinds is a deprecated and unused field that remains for compatibility
|
||||
// reasons.
|
||||
// DELETE IN 11.0.0: Kinds should be removed after a grace period.
|
||||
Kinds []string `yaml:"kinds,omitempty"`
|
||||
|
||||
Database *DatabaseConfig `yaml:"database,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -107,6 +112,12 @@ func (dc *DestinationConfig) CheckAndSetDefaults() error {
|
|||
}
|
||||
}
|
||||
|
||||
if len(dc.Kinds) > 0 {
|
||||
log.Warnf("The `kinds` configuration field has been deprecated and " +
|
||||
"will be removed in a future release. It is now a no-op and can " +
|
||||
"safely be removed from the configuration file.")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue