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 container securityContext #93

Merged
merged 1 commit into from
May 31, 2023

Conversation

eugene-davis
Copy link
Contributor

This allows setting securityContext within a container.
Although most settings can be done at the pod level, a few cannot, such as allowPrivilegeEscalation and capabilities, both settings which are required if running with pod security set to restricted.

@BeryJu BeryJu force-pushed the main branch 2 times, most recently from e5d41ff to 2913c32 Compare January 11, 2023 17:40
@jacksgt
Copy link

jacksgt commented Mar 19, 2023

Hi @eugene-davis , I believe an issue occured while re-basing this PR. The securityContext section moved into the volumes section:

          volumeMounts:
          {{- if $.Values.geoip.enabled }}
            - name: geoip-db
              mountPath: /geoip
          {{- end }}
            {{- with $.Values.volumeMounts }}
            {{- toYaml . | nindent 12 }}
            {{- end }}
      {{ if eq . "worker" }}
          securityContext:
            {{- toYaml $.Values.worker.containerSecurityContext | nindent 12 }}
            {{- with $.Values.blueprints }}
              {{- range $name := . }}
            - name: blueprints-{{ $name }}
              mountPath: /blueprints/mounted/{{ $name }}
              {{- end }}
            {{- end }}
      {{- end }}

Could you take another look? I'd also really like to see this enhancement :-)

@eugene-davis
Copy link
Contributor Author

I've fixed this - looks when the deployment template files were split Github got very confused.
I tentatively added support as well to the new GeoIP sidecars - but I've not tested that as I'm not running the sidecars.

@BeryJu BeryJu merged commit b29a646 into goauthentik:main May 31, 2023
@BeryJu
Copy link
Member

BeryJu commented May 31, 2023

Well I meant to merge this correctly but accidentally pushed this directly into main..anyways, thanks for the PR!

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