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

Backport of NET-5947 Add NET_BIND_SERVICE capability in security context for api-gateway pod on OpenShift into release/1.2.x #3076

Conversation

hc-github-team-consul-core
Copy link
Collaborator

@hc-github-team-consul-core hc-github-team-consul-core commented Oct 12, 2023

Backport

This PR is auto-generated from #3070 to be assessed for backporting due to the inclusion of the label backport/1.2.x.

The below text is copied from the body of the original PR.


Why this change is needed:
This capability became a requirement for consul-dataplane, which api-gateway uses under the hood, as of hashicorp/consul-dataplane#238. Since the securityContext created for each consul-dataplane Pod was not requesting the NET_BIND_SERVICE capability specifically when deploying onto OpenShift, it was not being granted, and the Pod was failing to start with a permission denied error.

Changes proposed in this PR:

  • Always add required NET_BIND_SERVICE capability to the securityContext for each api-gateway Pod

How I've tested this PR:

  • Added unit test coverage verifying securityContext is always set appropriately on Pod
  • @missylbytes tested it live on OpenShift 4.11 and 4.12 clusters, verifying that the Pod starts up correctly now

How I expect reviewers to test this PR:

  • 🤖 tests passing

Checklist:


Overview of commits

@hashicorp-cla
Copy link

hashicorp-cla commented Oct 12, 2023

CLA assistant check
All committers have signed the CLA.

@nathancoleman nathancoleman force-pushed the backport/api-gateway-net-bind-service/monthly-guiding-coral branch from ae88b5b to d07c133 Compare October 12, 2023 20:24
@nathancoleman nathancoleman marked this pull request as ready for review October 12, 2023 20:24
@nathancoleman nathancoleman enabled auto-merge (squash) October 12, 2023 20:25
@nathancoleman nathancoleman force-pushed the backport/api-gateway-net-bind-service/monthly-guiding-coral branch from f535f97 to d07c133 Compare October 13, 2023 20:08
@nathancoleman
Copy link
Member

Enterprise tests are failing due to issues that are being addressed in #3077

@nathancoleman
Copy link
Member

The PR referenced above was merged into main. I've manually backported to release/1.2.x via #3082 and am waiting for that to merge.

…ext for api-gateway pod on OpenShift into release/1.2.x
@nathancoleman nathancoleman force-pushed the backport/api-gateway-net-bind-service/monthly-guiding-coral branch from d07c133 to 40c4121 Compare October 16, 2023 19:23
@nathancoleman
Copy link
Member

Rebasing now that #3082 has merged

@nathancoleman nathancoleman enabled auto-merge (squash) October 16, 2023 19:28
@nathancoleman nathancoleman merged commit f8a2341 into release/1.2.x Oct 16, 2023
@nathancoleman nathancoleman deleted the backport/api-gateway-net-bind-service/monthly-guiding-coral branch October 16, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants