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

OpenShift deployment testing #558

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willdollman
Copy link
Contributor

@willdollman willdollman commented Oct 3, 2024

Emulate some OpenShift behaviour with our helm charts to make testing using k8s easier:

  • Use high uid/gids
  • Add user to the root group
  • Set fsGroup 0 to ensure files are owned by root group
  • Set fsGroupChangePolicy: always

Running this locally with helm works fine (older version from my shell history, but should also work on newer instances):

$ helm upgrade --install sourcegraph --version 5.6.2535 ./ --values ../../override.yaml --namespace default

This PR is just for sharing helm charts for OpenShift testing - it shouldn't be merged

Issues

  • This relies on created files' group permissions matching owner permissions. If files are created with 744 or 755, then the user will lack execute/write permissions on the file after a pod restart. I've checked a few containers and quite a few do this:
    • Gitserver writes files with 755
    • Redis writes with 755

Checklist

Test plan

- Use high uid/gids
- Add user to the root group
- Set fsGroup 0 to ensure files are owned by root group
- Set fsGroupChangePolicy: always
@willdollman willdollman self-assigned this Oct 3, 2024
@willdollman willdollman changed the title Emulate openshift behaviour as much as possible OpenShift deployment testing Oct 3, 2024
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.

1 participant