Skip to content

Commit

Permalink
improve: remove perm fix keycloak init container (#12137)
Browse files Browse the repository at this point in the history
Co-authored-by: Parker Mossman <[email protected]>
  • Loading branch information
perangel and pmossman committed Apr 16, 2024
1 parent 130c32d commit 5486249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
11 changes: 0 additions & 11 deletions charts/airbyte-keycloak/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,6 @@ spec:
{{- if .Values.extraInitContainers }}
{{- toYaml .Values.extraInitContainers | nindent 8 }}
{{- end }}
{{- if and .Values.containerSecurityContext.runAsUser .Values.containerSecurityContext.runAsGroup }}
- name: fix-volume-permissions
image: busybox
command: ["sh", "-c", "chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.containerSecurityContext.runAsGroup }} /opt/keycloak/data/infinispan"]
securityContext:
runAsUser: 0
privileged: true
volumeMounts:
- name: keycloak-storage
mountPath: /opt/keycloak/data/infinispan
{{- end }}
containers:
- name: airbyte-keycloak
image: {{ printf "%s:%s" .Values.image.repository (include "keycloak.imageTag" .) }}
Expand Down
10 changes: 5 additions & 5 deletions charts/airbyte/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1750,8 +1750,8 @@ keycloak:

# -- Security context for the container
podSecurityContext:
# gid=1000(airbyte)
fsGroup: 1000
# gid=0(root)
fsGroup: 0

initContainerSecurityContext:
allowPrivilegeEscalation: false
Expand All @@ -1769,10 +1769,10 @@ keycloak:
containerSecurityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
# uid=1000(airbyte)
# uid=1000(keycloak)
runAsUser: 1000
# gid=1000(airbyte)
runAsGroup: 1000
# gid=0(root)
runAsGroup: 0
readOnlyRootFilesystem: false
capabilities:
drop: ["ALL"]
Expand Down

0 comments on commit 5486249

Please sign in to comment.