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

Don't set security context when on OpenShift #521

Merged
merged 3 commits into from
May 25, 2021
Merged

Conversation

ishustava
Copy link
Contributor

@ishustava ishustava commented May 19, 2021

  • Envoy container should not have security context set when on OpenShift
    and when tproxy is disabled because we want to let OpenShift set a random
    user/group. When tproxy is enabled though, we need to still set it on OpenShift
    because we require Envoy to have a specific user for the traffic redirection to work.
  • init-copy-container doesn't need to have security context set whenever running on OpenShift
    (regardless of whether tproxy is enabled or not) so that OpenShift can set its own random user/group.

How I've tested this PR:
acceptance tests on openshift

How I expect reviewers to test this PR:
code review

Checklist:

  • Tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

@ishustava ishustava requested review from a team, ndhanushkodi, thisisnotashwin and lkysow and removed request for a team and thisisnotashwin May 20, 2021 16:37
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

Nice work!

connect-inject/container_init_test.go Outdated Show resolved Hide resolved
connect-inject/envoy_sidecar.go Outdated Show resolved Hide resolved
* Envoy container should not have security context set when on OpenShift
  and when tproxy is disabled because we want to let OpenShift set a random
  user/group. When tproxy is enabled though, we need to still set it on OpenShift
  because we require Envoy to have a specific user for the traffic redirection to work.
* init-copy-container doesn't need to have security context set whenever running on OpenShift
  (regardless of whether tproxy is enabled or not) so that OpenShift can set its own random user/group.
Copy link
Contributor

@ndhanushkodi ndhanushkodi left a comment

Choose a reason for hiding this comment

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

Looks great!!

@ishustava ishustava merged commit 0bc1f55 into master May 25, 2021
@ishustava ishustava deleted the tproxy-openshift branch May 25, 2021 16:19
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.

None yet

3 participants