fix: Remove Invalid PodSecurityContext Values

What does this MR do?

#6398 (closed) points out that in !4683 (merged) some invalid PodSecurityContext fields were added. Per the PodSecurityContext Object Definition, privileged and allowPrivilegeEscalation are not valid at the pod level and should only be provided for containers.

I've attempted to make this as small of a change as possible - updating the podSecurityContext helpers to remove privileged and allowPrivilegeEscalation, and updating spec/configuration/gitaly_spec.rb to verify podSecurityContext after these changes. I don't believe this is a breaking change, as this is essentially reverting functionality that wouldn't have worked previously.

I ensured that helm template with no values provided and helm template with the values provided in the above issue both succeed and do not return the unwanted fields in the podSecurityContext.

Closes #6398 (closed)

Author checklist

For general guidance, please follow our Contributing guide.

Required

For anything in this list which will not be completed, please provide a reason in the MR discussion.

  • Merge Request Title and Description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline.
  • Documentation created/updated.
    • Happy to add additional documentation if needed, not sure if it's warranted by this change.
  • Tests added/updated, and test plan for scenarios not covered by automated tests.
  • Equivalent MR/issue for omnibus-gitlab opened.
    • I don't think this is relevant

Reviewers checklist

Edited by Jonathan Bowe

Merge request reports

Loading
Loading