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

add support for openshift security context #2027

Merged
merged 25 commits into from
Dec 30, 2023

Conversation

pgvishnuram
Copy link
Contributor

@pgvishnuram pgvishnuram commented Oct 17, 2023

Description

This PR adds support to native openshift installation by allowing customer to disable securityContext and podSecurityContext
Components affected

  • alertmanager
  • elasticsearch (es-client-deployment, es-data-statefulset, es-master-statefulset)
  • external-es-proxy-deployment
  • kibana
  • kube-state
  • nats (statefulset)
  • prometheus-node-exporter
  • prometheus
  • stan

Related Issues

https://github.com/astronomer/issues/issues/5919

Testing

Do not merge this PR until this text is replaced with details about how these changes were tested.

Merging

Do not merge this PR until it lists which release branches this PR should be merged / cherry-picked into.

@vishwas-astro
Copy link
Contributor

@pgvishnuram can we create an issue for this with the description of the problem we are trying to solve here. And also tag it with the releases we are planning to ship this to.

@pgvishnuram pgvishnuram marked this pull request as ready for review October 25, 2023 14:42
@pgvishnuram pgvishnuram requested a review from a team as a code owner October 25, 2023 14:42
Copy link
Member

@danielhoherd danielhoherd left a comment

Choose a reason for hiding this comment

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

Looks good so far. We need to ensure these are all covered by tests.

Copy link
Contributor

@rishkarajgi rishkarajgi left a comment

Choose a reason for hiding this comment

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

lgtm. We should add/update the tests

@pgvishnuram pgvishnuram marked this pull request as draft October 27, 2023 17:24
Comment on lines +162 to +166
{{ if .Values.global.openshiftEnabled }}
securityContexts:
pod:
runAsNonRoot: true
{{ end }}
Copy link
Member

Choose a reason for hiding this comment

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

If this works for openshift, can we just use it as the standard config? Is there any good reason to run it without this setting when we are running in a non-openshift cluster? Same question for all the changes in this file, and most of this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking on the same lines. We can keep changes agnostic to environoment as the standard config and openshift deployment specific config under the flag

Copy link

Choose a reason for hiding this comment

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

Agreed on Daniels point. I think the biggest shift is switching logging from FluentD to Vector as a default which would probably cause issues to existing customers.

Copy link
Member

Choose a reason for hiding this comment

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

We should reduce the variety between openshift and non-openshift as much as possible. The more we reduce that diff, the less code we have to maintain, and the less things there are that can break, and the less QA testing needs to be done.

@pgvishnuram pgvishnuram marked this pull request as ready for review October 27, 2023 19:47
@pgvishnuram pgvishnuram self-assigned this Oct 27, 2023
@rishkarajgi
Copy link
Contributor

pre-commit failing

@pgvishnuram
Copy link
Contributor Author

pre-commit failing

Its fixed

@pgvishnuram pgvishnuram merged commit c573817 into master Dec 30, 2023
5 of 6 checks passed
@pgvishnuram pgvishnuram deleted the add-native-openshift-support branch December 30, 2023 17:36
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

5 participants