mirror of https://github.com/k3s-io/k3s
Merge pull request #29999 from mtaufen/kubecfg-config-field-rename
Automatic merge from submit-queue [Kubelet] Rename `--config` to `--pod-manifest-path`. `--config` is deprecated. This field holds the location of a manifest file or directory of manifest files for pods the Kubelet is supposed to run. The name of the field should reflect that purpose. I didn't change the flag name because that API should remain stable. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29999) <!-- Reviewable:end -->pull/6/head
commit
2fb7cae2be
|
@ -59,7 +59,9 @@ func NewKubeletServer() *KubeletServer {
|
|||
|
||||
// AddFlags adds flags for a specific KubeletServer to the specified FlagSet
|
||||
func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&s.Config, "config", s.Config, "Path to the config file or directory of files")
|
||||
fs.StringVar(&s.PodManifestPath, "config", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.")
|
||||
fs.MarkDeprecated("config", "Use --pod-manifest-path instead. Will be removed in a future version.")
|
||||
fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.")
|
||||
fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config")
|
||||
fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data")
|
||||
fs.DurationVar(&s.HTTPCheckFrequency.Duration, "http-check-frequency", s.HTTPCheckFrequency.Duration, "Duration between checking http for new data")
|
||||
|
|
|
@ -208,7 +208,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) {
|
|||
Cloud: nil, // cloud provider might start background processes
|
||||
ClusterDNS: net.ParseIP(s.ClusterDNS),
|
||||
ClusterDomain: s.ClusterDomain,
|
||||
ConfigFile: s.Config,
|
||||
ConfigFile: s.PodManifestPath,
|
||||
ConfigureCBR0: s.ConfigureCBR0,
|
||||
ContainerManager: nil,
|
||||
ContainerRuntime: s.ContainerRuntime,
|
||||
|
|
|
@ -361,6 +361,7 @@ path-override
|
|||
pod-cidr
|
||||
pod-eviction-timeout
|
||||
pod-infra-container-image
|
||||
pod-manifest-path
|
||||
pod-running
|
||||
pods-per-core
|
||||
policy-config-file
|
||||
|
|
|
@ -1311,17 +1311,17 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||
_ = yym138
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeString(codecSelferC_UTF81234, string(x.Config))
|
||||
r.EncodeString(codecSelferC_UTF81234, string(x.PodManifestPath))
|
||||
}
|
||||
} else {
|
||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||
r.EncodeString(codecSelferC_UTF81234, string("config"))
|
||||
r.EncodeString(codecSelferC_UTF81234, string("podManifestPath"))
|
||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||
yym139 := z.EncBinary()
|
||||
_ = yym139
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeString(codecSelferC_UTF81234, string(x.Config))
|
||||
r.EncodeString(codecSelferC_UTF81234, string(x.PodManifestPath))
|
||||
}
|
||||
}
|
||||
if yyr130 || yy2arr130 {
|
||||
|
@ -3437,11 +3437,11 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode
|
|||
} else {
|
||||
x.APIVersion = string(r.DecodeString())
|
||||
}
|
||||
case "config":
|
||||
case "podManifestPath":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Config = ""
|
||||
x.PodManifestPath = ""
|
||||
} else {
|
||||
x.Config = string(r.DecodeString())
|
||||
x.PodManifestPath = string(r.DecodeString())
|
||||
}
|
||||
case "syncFrequency":
|
||||
if r.TryDecodeAsNil() {
|
||||
|
@ -4202,9 +4202,9 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco
|
|||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Config = ""
|
||||
x.PodManifestPath = ""
|
||||
} else {
|
||||
x.Config = string(r.DecodeString())
|
||||
x.PodManifestPath = string(r.DecodeString())
|
||||
}
|
||||
yyj561++
|
||||
if yyhl561 {
|
||||
|
|
|
@ -112,8 +112,9 @@ const (
|
|||
type KubeletConfiguration struct {
|
||||
unversioned.TypeMeta
|
||||
|
||||
// config is the path to the config file or directory of files
|
||||
Config string `json:"config"`
|
||||
// podManifestPath is the path to the directory containing pod manifests to
|
||||
// run, or the path to a single manifest file
|
||||
PodManifestPath string `json:"podManifestPath"`
|
||||
// syncFrequency is the max period between synchronizing running
|
||||
// containers and config
|
||||
SyncFrequency unversioned.Duration `json:"syncFrequency"`
|
||||
|
|
|
@ -166,8 +166,9 @@ type LeaderElectionConfiguration struct {
|
|||
type KubeletConfiguration struct {
|
||||
unversioned.TypeMeta
|
||||
|
||||
// config is the path to the config file or directory of files
|
||||
Config string `json:"config"`
|
||||
// podManifestPath is the path to the directory containing pod manifests to
|
||||
// run, or the path to a single manifest file
|
||||
PodManifestPath string `json:"podManifestPath"`
|
||||
// syncFrequency is the max period between synchronizing running
|
||||
// containers and config
|
||||
SyncFrequency unversioned.Duration `json:"syncFrequency"`
|
||||
|
|
|
@ -162,7 +162,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu
|
|||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Config = in.Config
|
||||
out.PodManifestPath = in.PodManifestPath
|
||||
out.SyncFrequency = in.SyncFrequency
|
||||
out.FileCheckFrequency = in.FileCheckFrequency
|
||||
out.HTTPCheckFrequency = in.HTTPCheckFrequency
|
||||
|
@ -326,7 +326,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu
|
|||
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Config = in.Config
|
||||
out.PodManifestPath = in.PodManifestPath
|
||||
out.SyncFrequency = in.SyncFrequency
|
||||
out.FileCheckFrequency = in.FileCheckFrequency
|
||||
out.HTTPCheckFrequency = in.HTTPCheckFrequency
|
||||
|
|
|
@ -111,7 +111,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c *
|
|||
in := in.(*KubeletConfiguration)
|
||||
out := out.(*KubeletConfiguration)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.Config = in.Config
|
||||
out.PodManifestPath = in.PodManifestPath
|
||||
out.SyncFrequency = in.SyncFrequency
|
||||
out.FileCheckFrequency = in.FileCheckFrequency
|
||||
out.HTTPCheckFrequency = in.HTTPCheckFrequency
|
||||
|
|
|
@ -185,7 +185,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface
|
|||
in := in.(*KubeletConfiguration)
|
||||
out := out.(*KubeletConfiguration)
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.Config = in.Config
|
||||
out.PodManifestPath = in.PodManifestPath
|
||||
out.SyncFrequency = in.SyncFrequency
|
||||
out.FileCheckFrequency = in.FileCheckFrequency
|
||||
out.HTTPCheckFrequency = in.HTTPCheckFrequency
|
||||
|
|
Loading…
Reference in New Issue