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

helm: use correct nodeSelector for k8s 1.25+ #1360

Closed
Closed
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 @@ -26,7 +26,11 @@ spec:
nodeSelector:
kubernetes.io/os: linux
{{- if .Values.controller.runOnMaster}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a new runOnControlPlane setting and have this line check if either is set and the apply the correct node-selector?

That is more work now but probably better in the long run.

Copy link
Author

Choose a reason for hiding this comment

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

I think that would be a separate PR, but agree it would be good going forward.

@andyzhangx would you accept a follow-up PR with a new helm value controller.runOnControlPlane, with comment that controller.runOnMaster is deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

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

fair enough

Copy link
Member

Choose a reason for hiding this comment

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

I think we could remove controller.runOnMaster chart, replace with controller.runOnControlPlane directly

Copy link
Author

Choose a reason for hiding this comment

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

Won't this break back-compat for existing users? (or has a new version of the chart w/ this configuration never been released?)

Copy link
Member

Choose a reason for hiding this comment

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

that's ok for chart config of new versions, add a new controller.runOnControlPlane could be safer, and after a few versions, we could remove controller.runOnMaste

Copy link
Author

Choose a reason for hiding this comment

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

how about we do that as a follow-up change? in the meantime looks like we can merge this to fix broken tests

Copy link
Member

Choose a reason for hiding this comment

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

the windows test failure should already be fixed by #1362, no worry, I will provide a fix using controller.runOnControlPlane later

Copy link
Member

Choose a reason for hiding this comment

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

PR(#1366) would address the issue.

{{- if ge .Capabilities.KubeVersion.Minor "25" }}
node-role.kubernetes.io/control-plane: ""
{{- else }}
node-role.kubernetes.io/master: ""
{{- end }}
{{- end}}
priorityClassName: system-cluster-critical
{{- with .Values.controller.tolerations }}
Expand Down