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

[stable/mariadb] Update to mariadb non-root image #2423

Merged
merged 2 commits into from
Oct 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use securityContext to fix non-root permission issues
  • Loading branch information
tompizmor committed Oct 20, 2017
commit d59126d022d16a9c61a794f448dcf8d9ba75fc32
14 changes: 8 additions & 6 deletions stable/mariadb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ spec:
labels:
app: {{ template "mariadb.fullname" . }}
spec:
securityContext:
runAsUser: 1001
fsGroup: 1001
initContainers:
- name: "fix-non-root-permissions"
- name: "copy-custom-config"
image: "busybox"
imagePullPolicy: "Always"
command: [ "sh" , "-c", "mkdir -p /bitnami/mariadb/conf/ && chmod -R g+rwX /bitnami" ]
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
command: ["sh", "-c", "mkdir -p /bitnami/mariadb/conf && cp /bitnami/mariadb_config/my.cnf /bitnami/mariadb/conf/my_custom.cnf"]
volumeMounts:
- name: config
mountPath: /bitnami/mariadb_config
- name: data
mountPath: /bitnami/mariadb
containers:
Expand Down Expand Up @@ -67,9 +72,6 @@ spec:
resources:
{{ toYaml .Values.resources | indent 10 }}
volumeMounts:
- name: config
mountPath: /bitnami/mariadb/conf/my_custom.cnf
subPath: my.cnf
- name: data
mountPath: /bitnami/mariadb
{{- if .Values.metrics.enabled }}
Expand Down