Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Openshift #214

Merged
merged 15 commits into from
Nov 19, 2020
Merged

Openshift #214

merged 15 commits into from
Nov 19, 2020

Conversation

namloc2001
Copy link

@namloc2001 namloc2001 commented Nov 13, 2020

Hi, I've been reworking this chart to function in an OpenShift cluster. The changes look to do a number of things:

  • Auto-create SCC for SonarQube with privilege so that initsysctl runs
  • postgres runs (by default) with arbitrary UID, under restricted SCC
  • add postgres serviceAccount into SCC if UID is specified, instead of using arbitrary UID

I've got it working on my OpenShift cluster with:

helm install <release_name> . --set serviceAccount.create=true,\
                                              postgresql.serviceAccount.enabled=true,\
                                              OpenShift.enabled=true,\
                                              postgresql.securityContext.enabled=false,\
                                              postgresql.volumePermissions.enabled=true,\
                                              postgresql.volumePermissions.securityContext.runAsUser="auto"

It runs postgreSQL under the default restricted SCC and creates the stripped-down "privileged" SCC for SonarQube.

SCC creation is invoked by using a new key in values.yaml (OpenShift.enabled) which asserts whether OpenShift SCC resources need to be created.

I've also:

  • exposed some additional postgreSQL keys in values.yaml
  • added an initContainer to monitor postgreSQL is up before starting SonarQube.

Just wanted to see if there is any interest in this, and any validation you'd like to apply.

@namloc2001 namloc2001 mentioned this pull request Nov 13, 2020
Copy link
Contributor

@rjkernick rjkernick 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. Any chance you could add to the CHANGELOG.md?

@namloc2001
Copy link
Author

@rjkernick I've updated the CHANGELOG and also added a brief explanation into the README.

@rjkernick rjkernick merged commit 192a8e5 into Oteemo:master Nov 19, 2020
@rjkernick
Copy link
Contributor

Thanks for the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants