-
Notifications
You must be signed in to change notification settings - Fork 324
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
Do not set securityContext on Openshift < 4.11 #2678
Conversation
them we avoid PSA warnings that are enabled by default. | ||
|
||
We use the K8s version as a proxy for the OpenShift version because there is a | ||
1:1 mapping of versions. OpenShift 4.11 corresponds to K8s 1.24.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of a better way to check for OpenShift version. As far as we know and based on their docs (requires login 😞 ), there's a 1:1 mapping between OpenShift and Kube versions so I think this should be okay.
OpenShift Version | Kubernetes Version |
---|---|
4.9 | 1.22 |
4.10 | 1.23 |
4.11 | 1.24 |
4.12 | 1.25 |
4.13 | 1.26 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also unsure how to unit test this (without actually installing different kubectl / kube versions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, there is helm template --kube-version
.
$ helm template -h | grep kube-version
--kube-version string Kubernetes version used for Capabilities.KubeVersion
I'll add a unit test which uses --kube-version to validate this. edit: Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pglass added OpenShift versions here for future reference: hashicorp/consul#18307
7b95dd1
to
eddc97e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:chefkiss: This is awesome!
Thank you for bats testing both sides of the versioning.. that was going to be the only thing I was concerned about.
Changes proposed in this PR:
release/1.1.x
, and will be backported intorelease/1.0.x
because both of those Consul K8s versions support K8s < 1.23.x and therefore support OpenShift <= 4.10How I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: