Ceph: Make /etc/ceph and /run emptydirs uniformly across all pods

This PS updates the ceph charts to make /etc/ceph an emptydir
uniformly across all charts, both ensuring no default config is loaded,
and also permitting read-only filesystems to back the containers.

Additionally /run is uniformly applied across all long running pods
as a memory backed emptydir.

Change-Id: I00d1b15758b7eb4476fb950ddcb38db9a5149ad0
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2019-04-21 09:53:26 -05:00 committed by Pete Birley
parent b4f9df436f
commit dece008337
23 changed files with 160 additions and 70 deletions

View File

@ -89,6 +89,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-bin
mountPath: /tmp/utils-checkPGs.py
subPath: utils-checkPGs.py
@ -122,6 +124,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-client-bin
configMap:
name: ceph-client-bin

View File

@ -60,6 +60,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-bin
mountPath: /tmp/init-dirs.sh
subPath: init-dirs.sh
@ -67,9 +71,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
containers:
- name: ceph-mds
{{ tuple $envAll "ceph_mds" | include "helm-toolkit.snippets.image" | indent 10 }}
@ -102,6 +103,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-bin
mountPath: /tmp/mds-start.sh
subPath: mds-start.sh
@ -125,12 +130,14 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-client-etc
configMap:
name: ceph-client-etc
@ -141,9 +148,6 @@ spec:
defaultMode: 0555
- name: pod-var-lib-ceph
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-client-admin-keyring
secret:
secretName: {{ .Values.secrets.keyrings.admin }}

View File

@ -63,6 +63,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-bin
mountPath: /tmp/init-dirs.sh
subPath: init-dirs.sh
@ -70,11 +74,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: pod-etc-ceph
mountPath: /etc/ceph
containers:
- name: ceph-mgr
{{ tuple $envAll "ceph_mgr" | include "helm-toolkit.snippets.image" | indent 10 }}
@ -130,6 +129,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-bin
mountPath: /mgr-start.sh
subPath: mgr-start.sh
@ -142,8 +145,6 @@ spec:
mountPath: /tmp/utils-checkDNS.sh
subPath: utils-checkDNS.sh
readOnly: true
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-client-etc
mountPath: /etc/ceph/ceph.conf.template
subPath: ceph.conf
@ -159,9 +160,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: ceph-client-bin
mountPath: /tmp/utils-checkPGs.py
subPath: utils-checkPGs.py
@ -173,6 +171,9 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-client-bin
@ -185,9 +186,6 @@ spec:
defaultMode: 0444
- name: pod-var-lib-ceph
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-client-admin-keyring
secret:
secretName: {{ .Values.secrets.keyrings.admin }}

View File

@ -62,6 +62,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-client-bin
configMap:
name: ceph-client-bin

View File

@ -85,6 +85,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/init-dirs.sh
subPath: init-dirs.sh
@ -92,9 +96,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: ceph-log-ownership
{{ tuple $envAll "ceph_mon" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
@ -107,6 +108,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: pod-var-log
mountPath: /var/log/ceph
readOnly: false
@ -170,6 +175,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/mon-start.sh
subPath: mon-start.sh
@ -213,15 +222,17 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: pod-var-log
mountPath: /var/log/ceph
readOnly: false
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: pod-var-log
hostPath:
path: {{ print "/var/log/ceph/" $envAll.Release.Name }}
@ -236,9 +247,6 @@ spec:
- name: pod-var-lib-ceph
hostPath:
path: {{ .Values.conf.storage.mon.directory }}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-client-admin-keyring
secret:
secretName: {{ .Values.secrets.keyrings.admin }}

View File

@ -70,6 +70,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/moncheck-start.sh
subPath: moncheck-start.sh
@ -97,12 +101,14 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-mon-etc
configMap:
name: ceph-mon-etc
@ -113,9 +119,6 @@ spec:
defaultMode: 0555
- name: pod-var-lib-ceph
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-client-admin-keyring
secret:
secretName: {{ .Values.secrets.keyrings.admin }}

View File

@ -47,6 +47,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/bootstrap.sh
subPath: bootstrap.sh
@ -62,6 +64,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-mon-bin
configMap:
name: ceph-mon-bin

View File

@ -98,6 +98,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/keys-bootstrap-keyring-manager.sh
subPath: keys-bootstrap-keyring-manager.sh
@ -112,6 +114,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-mon-bin
configMap:
name: ceph-mon-bin

View File

@ -91,6 +91,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-mon-bin
mountPath: /tmp/keys-storage-keyring-manager.sh
subPath: keys-storage-keyring-manager.sh
@ -105,6 +107,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-mon-bin
configMap:
name: ceph-mon-bin

View File

@ -90,6 +90,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/utils-defragOSDs.sh
subPath: utils-defragOSDs.sh
@ -99,6 +101,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-osd-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}

View File

@ -78,6 +78,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/init-dirs.sh
subPath: init-dirs.sh
@ -96,9 +100,6 @@ spec:
- name: pod-var-lib-ceph-tmp
mountPath: /var/lib/ceph/tmp
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: ceph-log-ownership
{{ tuple $envAll "ceph_osd" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
@ -127,6 +128,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: pod-var-log
mountPath: /var/log/ceph
readOnly: false
@ -163,6 +168,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/osd-init.sh
subPath: osd-init.sh
@ -192,9 +201,6 @@ spec:
- name: pod-var-lib-ceph-tmp
mountPath: /var/lib/ceph/tmp
ReadOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: run-lvm
mountPath: /run/lvm
readOnly: false
@ -256,6 +262,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/osd-start.sh
subPath: osd-start.sh
@ -306,9 +316,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: run-lvm
mountPath: /run/lvm
readOnly: false
@ -324,6 +331,11 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: devices
hostPath:
path: /dev
@ -339,9 +351,6 @@ spec:
- name: pod-var-log
hostPath:
path: {{ print "/var/log/ceph/" $envAll.Release.Name }}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-osd-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}

View File

@ -47,6 +47,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/bootstrap.sh
subPath: bootstrap.sh
@ -62,6 +64,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-osd-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}

View File

@ -45,6 +45,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-osd-bin
mountPath: /tmp/helm-tests.sh
subPath: helm-tests.sh
@ -60,6 +62,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-osd-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}

View File

@ -174,6 +174,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin
mountPath: /tmp/provisioner-cephfs-start.sh
subPath: provisioner-cephfs-start.sh
@ -181,6 +185,11 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin" | quote }}

View File

@ -164,6 +164,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin
mountPath: /tmp/provisioner-rbd-start.sh
subPath: provisioner-rbd-start.sh
@ -171,6 +175,11 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin" | quote }}

View File

@ -47,6 +47,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin
mountPath: /tmp/bootstrap.sh
subPath: bootstrap.sh
@ -62,6 +64,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin" | quote }}

View File

@ -116,6 +116,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin
mountPath: /tmp/provisioner-cephfs-client-key-manager.sh
subPath: provisioner-cephfs-client-key-manager.sh
@ -123,6 +125,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin" | quote }}

View File

@ -83,6 +83,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin-clients
mountPath: /tmp/provisioner-rbd-namespace-client-key-cleaner.sh
subPath: provisioner-rbd-namespace-client-key-cleaner.sh
@ -90,6 +92,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin-clients
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin-clients" | quote }}

View File

@ -114,6 +114,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-provisioners-bin-clients
mountPath: /tmp/provisioner-rbd-namespace-client-key-manager.sh
subPath: provisioner-rbd-namespace-client-key-manager.sh
@ -121,6 +123,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-provisioners-bin-clients
configMap:
name: {{ printf "%s-%s" $envAll.Release.Name "ceph-prov-bin-clients" | quote }}

View File

@ -71,6 +71,10 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/init-dirs.sh
subPath: init-dirs.sh
@ -78,9 +82,6 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
- name: ceph-rgw-init
{{ tuple $envAll "ceph_rgw" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.rgw | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
@ -106,6 +107,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
@ -143,12 +146,14 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-run
mountPath: /run
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/rgw-start.sh
subPath: rgw-start.sh
readOnly: true
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-etc
mountPath: /etc/ceph/ceph.conf.template
subPath: ceph.conf
@ -160,12 +165,12 @@ spec:
- name: pod-var-lib-ceph
mountPath: /var/lib/ceph
readOnly: false
- name: pod-run
mountPath: /run
readOnly: false
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-rgw-bin
@ -178,9 +183,6 @@ spec:
defaultMode: 0444
- name: pod-var-lib-ceph
emptyDir: {}
- name: pod-run
emptyDir:
medium: "Memory"
- name: ceph-bootstrap-rgw-keyring
secret:
secretName: {{ .Values.secrets.keyrings.rgw }}

View File

@ -73,7 +73,7 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: etcceph
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/ceph-admin-keyring.sh
@ -99,6 +99,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/storage-init.sh
subPath: storage-init.sh
@ -106,8 +108,6 @@ spec:
- name: ceph-templates
mountPath: /tmp/ceph-templates
readOnly: true
- name: etcceph
mountPath: /etc/ceph
- name: ceph-etc
mountPath: /etc/ceph/ceph.conf
subPath: ceph.conf
@ -119,12 +119,12 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-rgw-bin
configMap:
name: ceph-rgw-bin
defaultMode: 0555
- name: etcceph
emptyDir: {}
- name: ceph-etc
configMap:
name: {{ .Values.ceph_client.configmap }}

View File

@ -78,7 +78,7 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: etcceph
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/ceph-admin-keyring.sh
@ -114,7 +114,7 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: etcceph
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/rgw-s3-admin.sh
@ -131,7 +131,7 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: etcceph
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-rgw-bin
configMap:

View File

@ -55,7 +55,7 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: etcceph
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/helm-tests.sh
@ -85,6 +85,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-etc-ceph
mountPath: /etc/ceph
- name: ceph-rgw-bin
mountPath: /tmp/helm-tests.sh
subPath: helm-tests.sh
@ -93,7 +95,7 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: etcceph
- name: pod-etc-ceph
emptyDir: {}
- name: ceph-rgw-bin
configMap: