Skip to content

Backport of do not set securityContext on Openshift < 4.11 (#2678)#2705

Merged
pglass merged 1 commit intorelease/1.0.xfrom
backport/NET-185/fix-psa-openshift-10x
Aug 2, 2023
Merged

Backport of do not set securityContext on Openshift < 4.11 (#2678)#2705
pglass merged 1 commit intorelease/1.0.xfrom
backport/NET-185/fix-psa-openshift-10x

Conversation

@pglass
Copy link
Copy Markdown
Contributor

@pglass pglass commented Aug 1, 2023

Backport of #2678 to release/1.0.x

Changes proposed in this PR:

  • This is going into release/1.1.x, and will be backported into release/1.0.x because both of those Consul K8s versions support K8s < 1.23.x and therefore support OpenShift <= 4.10
  • Do not set securityContext on OpenShift < 4.11 because the restricted SCC disallows setting some of those settings. I broke this in Support running with restricted PSA enforcement enabled (part 1) #2572. In OpenShift >= 4.11, setting the securityContext is okay because the new restricted-v2 SCC is available to all users/accounts and allows setting the fields we want to set, and doing so avoids warnings.
  • We determine the OpenShift version in Helm using the Kube version because there is a 1:1 mapping of OpenShift to Kube versions.

How I've tested this PR:

How I expect reviewers to test this PR:

👀

@pglass pglass added the pr/no-backport signals that a PR will not contain a backport label label Aug 1, 2023
@pglass pglass requested a review from curtbushko August 1, 2023 17:12
Copy link
Copy Markdown
Contributor

@curtbushko curtbushko left a comment

Choose a reason for hiding this comment

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

LGTM!

@pglass pglass merged commit 4a9c2ef into release/1.0.x Aug 2, 2023
@pglass pglass deleted the backport/NET-185/fix-psa-openshift-10x branch August 2, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport signals that a PR will not contain a backport label theme/openshift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants