mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Migrating Kubelet testing flags to configuration
This commit is contained in:
parent
a0344973a3
commit
fe9eb1ba46
@ -346,9 +346,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) {
|
|||||||
"On success, a kubeconfig file referencing the generated client certificate and key is written to the path specified by --kubeconfig. "+
|
"On success, a kubeconfig file referencing the generated client certificate and key is written to the path specified by --kubeconfig. "+
|
||||||
"The client certificate and key file will be stored in the directory pointed by --cert-dir.")
|
"The client certificate and key file will be stored in the directory pointed by --cert-dir.")
|
||||||
|
|
||||||
fs.BoolVar(&f.ReallyCrashForTesting, "really-crash-for-testing", f.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.")
|
|
||||||
fs.Float64Var(&f.ChaosChance, "chaos-chance", f.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing.")
|
|
||||||
|
|
||||||
fs.BoolVar(&f.EnableServer, "enable-server", f.EnableServer, "Enable the Kubelet's server")
|
fs.BoolVar(&f.EnableServer, "enable-server", f.EnableServer, "Enable the Kubelet's server")
|
||||||
|
|
||||||
fs.StringVar(&f.HostnameOverride, "hostname-override", f.HostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname. If --cloud-provider is set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).")
|
fs.StringVar(&f.HostnameOverride, "hostname-override", f.HostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname. If --cloud-provider is set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).")
|
||||||
@ -405,7 +402,10 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) {
|
|||||||
fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, "enable-cadvisor-json-endpoints", f.EnableCAdvisorJSONEndpoints, "Enable cAdvisor json /spec and /stats/* endpoints. [default=false]")
|
fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, "enable-cadvisor-json-endpoints", f.EnableCAdvisorJSONEndpoints, "Enable cAdvisor json /spec and /stats/* endpoints. [default=false]")
|
||||||
// TODO: Remove this flag in 1.20+. https://github.com/kubernetes/kubernetes/issues/68522
|
// TODO: Remove this flag in 1.20+. https://github.com/kubernetes/kubernetes/issues/68522
|
||||||
fs.MarkDeprecated("enable-cadvisor-json-endpoints", "will be removed in a future version")
|
fs.MarkDeprecated("enable-cadvisor-json-endpoints", "will be removed in a future version")
|
||||||
|
fs.BoolVar(&f.ReallyCrashForTesting, "really-crash-for-testing", f.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.")
|
||||||
|
fs.MarkDeprecated("really-crash-for-testing", "will be removed in a future version.")
|
||||||
|
fs.Float64Var(&f.ChaosChance, "chaos-chance", f.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing.")
|
||||||
|
fs.MarkDeprecated("chaos-chance", "will be removed in a future version.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddKubeletConfigFlags adds flags for a specific kubeletconfig.KubeletConfiguration to the specified FlagSet
|
// AddKubeletConfigFlags adds flags for a specific kubeletconfig.KubeletConfiguration to the specified FlagSet
|
||||||
|
@ -405,7 +405,7 @@ type KubeletWebhookAuthentication struct {
|
|||||||
CacheTTL metav1.Duration
|
CacheTTL metav1.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// KubeletAnonymousAuthentication enables anonymous requests to the kubetlet server.
|
// KubeletAnonymousAuthentication enables anonymous requests to the kubelet server.
|
||||||
type KubeletAnonymousAuthentication struct {
|
type KubeletAnonymousAuthentication struct {
|
||||||
// enabled allows anonymous requests to the kubelet server.
|
// enabled allows anonymous requests to the kubelet server.
|
||||||
// Requests that are not rejected by another authentication method are treated as anonymous requests.
|
// Requests that are not rejected by another authentication method are treated as anonymous requests.
|
||||||
|
Loading…
Reference in New Issue
Block a user