mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 06:58:50 +08:00
[bitnami/etcd] fix snapshots directory ownership when security context is enabled (#7498)
This commit is contained in:
committed by
GitHub
parent
894484fac9
commit
831eed7501
@@ -9,7 +9,6 @@ dependencies:
|
||||
- bitnami-common
|
||||
version: 1.x.x
|
||||
description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines
|
||||
engine: gotpl
|
||||
home: https://github.com/bitnami/charts/tree/master/bitnami/etcd
|
||||
icon: https://bitnami.com/assets/stacks/etcd/img/etcd-stack-220x234.png
|
||||
keywords:
|
||||
@@ -25,4 +24,4 @@ name: etcd
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-etcd
|
||||
- https://coreos.com/etcd/
|
||||
version: 6.8.1
|
||||
version: 6.8.2
|
||||
|
||||
@@ -30,6 +30,25 @@ spec:
|
||||
{{- if .Values.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled (or .Values.podSecurityContext.enabled .Values.containerSecurityContext.enabled) }}
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: {{ include "etcd.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /snapshots
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- include "common.tplvalues.render" (dict "value" .Values.volumePermissions.resources "context" $) | nindent 16 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: snapshot-volume
|
||||
mountPath: /snapshots
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: etcd-snapshotter
|
||||
image: {{ include "etcd.image" . }}
|
||||
|
||||
Reference in New Issue
Block a user