mirror of https://github.com/kubernetes/kops.git
Disable some flags in kube-controller-manager and kube-scheduler when logging-format is not text
Disable these flags because these are not accepted. * --logtostderr * --alsologtostderr * --log-file
This commit is contained in:
parent
e19fc773d6
commit
cb6398fce5
|
|
@ -252,11 +252,17 @@ func (b *KubeControllerManagerBuilder) buildPod(kcm *kops.KubeControllerManagerC
|
|||
container.Args = append(container.Args, sortedStrings(flags)...)
|
||||
} else {
|
||||
container.Command = []string{"/usr/local/bin/kube-controller-manager"}
|
||||
container.Args = append(
|
||||
sortedStrings(flags),
|
||||
"--logtostderr=false", // https://github.com/kubernetes/klog/issues/60
|
||||
"--alsologtostderr",
|
||||
"--log-file=/var/log/kube-controller-manager.log")
|
||||
if kcm.LogFormat != "" && kcm.LogFormat != "text" {
|
||||
// When logging-format is not text, some flags are not accepted.
|
||||
// https://github.com/kubernetes/kops/issues/14100
|
||||
container.Args = sortedStrings(flags)
|
||||
} else {
|
||||
container.Args = append(
|
||||
sortedStrings(flags),
|
||||
"--logtostderr=false", // https://github.com/kubernetes/klog/issues/60
|
||||
"--alsologtostderr",
|
||||
"--log-file=/var/log/kube-controller-manager.log")
|
||||
}
|
||||
}
|
||||
for _, path := range b.SSLHostPaths() {
|
||||
name := strings.Replace(path, "/", "", -1)
|
||||
|
|
|
|||
|
|
@ -264,11 +264,17 @@ func (b *KubeSchedulerBuilder) buildPod(kubeScheduler *kops.KubeSchedulerConfig)
|
|||
container.Args = append(container.Args, sortedStrings(flags)...)
|
||||
} else {
|
||||
container.Command = []string{"/usr/local/bin/kube-scheduler"}
|
||||
container.Args = append(
|
||||
sortedStrings(flags),
|
||||
"--logtostderr=false", // https://github.com/kubernetes/klog/issues/60
|
||||
"--alsologtostderr",
|
||||
"--log-file=/var/log/kube-scheduler.log")
|
||||
if kubeScheduler.LogFormat != "" && kubeScheduler.LogFormat != "text" {
|
||||
// When logging-format is not text, some flags are not accepted.
|
||||
// https://github.com/kubernetes/kops/issues/14100
|
||||
container.Args = sortedStrings(flags)
|
||||
} else {
|
||||
container.Args = append(
|
||||
sortedStrings(flags),
|
||||
"--logtostderr=false", // https://github.com/kubernetes/klog/issues/60
|
||||
"--alsologtostderr",
|
||||
"--log-file=/var/log/kube-scheduler.log")
|
||||
}
|
||||
}
|
||||
|
||||
if kubeScheduler.MaxPersistentVolumes != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue