Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set cert-dir to prepare for 1.13 and switch to sercure port #77

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
imagePullPolicy: {{ .ImagePullPolicy }}
command: ["/bin/bash", "-c"]
args:
- exec hyperkube kube-scheduler --kubeconfig=/etc/kubernetes/secrets/kubeconfig --leader-elect=true --secure-port=0 --port=10251
- exec hyperkube kube-scheduler --kubeconfig=/etc/kubernetes/secrets/kubeconfig --leader-elect=true --cert-dir=/var/run/kubernetes
volumeMounts:
- mountPath: /etc/kubernetes/secrets
name: secrets
Expand Down
3 changes: 1 addition & 2 deletions bindata/v3.11.0/kube-scheduler/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ spec:
command: ["hyperkube", "kube-scheduler"]
args:
- --config=/etc/kubernetes/static-pod-resources/configmaps/config/config.yaml
- --secure-port=0
- --port=10251
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/openshift/cluster-monitoring-operator/blob/172beb3e0d2cbf1f79bf61ba9c3f5bea373b4125/assets/prometheus-k8s/service-monitor-kube-scheduler.yaml#L15 relies on scraping the insecure port 10251 in the openshift-kube-scheduler namespace.

By ommitting --port, hyperkube kube-scheduler will still be listening on the insecure port 10251. Just explicitely setting it to --port=0 will disable the insecure port.

tldr: this shouldn't break monitoring and I verified with a local scheduler that, having ommitted --port i stil get metrics on 127.0.0.1:10251/metrics.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sttts I'm looking at our config which we point here and I don't see we set port to 10257 and insecure to 0, am I blind or something?

- --cert-dir=/var/run/kubernetes
resources:
requests:
memory: 50Mi
Expand Down
3 changes: 1 addition & 2 deletions pkg/operator/v311_00_assets/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.