[cinder] Enable volume backup for iSCSI based volumes
This patchset added the necessary hostPath, hostIpc and hostNetwork to enable the volume backup for iSCSI based Cinder volumes. Change-Id: Ief3cc723650a6c42e24dfd6159c0de6f81e56fce
This commit is contained in:
parent
73f6f5695b
commit
0a1d6aeb94
@ -14,7 +14,7 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Cinder
|
description: OpenStack-Helm Cinder
|
||||||
name: cinder
|
name: cinder
|
||||||
version: 0.1.5
|
version: 0.1.6
|
||||||
home: https://docs.openstack.org/cinder/latest/
|
home: https://docs.openstack.org/cinder/latest/
|
||||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png
|
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -53,6 +53,12 @@ spec:
|
|||||||
{{ tuple $envAll "cinder" "backup" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
{{ tuple $envAll "cinder" "backup" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.backup.node_selector_key }}: {{ .Values.labels.backup.node_selector_value }}
|
{{ .Values.labels.backup.node_selector_key }}: {{ .Values.labels.backup.node_selector_value }}
|
||||||
|
{{- if .Values.pod.useHostNetwork.backup }}
|
||||||
|
hostNetwork: true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.conf.enable_iscsi }}
|
||||||
|
hostIPC: true
|
||||||
|
{{- end }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "backup" $mounts_cinder_backup_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "backup" $mounts_cinder_backup_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
{{- if (contains "cinder.backup.drivers.ceph" .Values.conf.cinder.DEFAULT.backup_driver) }}
|
{{- if (contains "cinder.backup.drivers.ceph" .Values.conf.cinder.DEFAULT.backup_driver) }}
|
||||||
@ -151,6 +157,7 @@ spec:
|
|||||||
{{ dict "envAll" $envAll "application" "cinder_backup" "container" "cinder_backup" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
{{ dict "envAll" $envAll "application" "cinder_backup" "container" "cinder_backup" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
command:
|
command:
|
||||||
- /tmp/cinder-backup.sh
|
- /tmp/cinder-backup.sh
|
||||||
|
terminationMessagePath: /var/log/termination-log
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-tmp
|
- name: pod-tmp
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
@ -235,6 +242,30 @@ spec:
|
|||||||
mountPath: /etc/cinder/rootwrap.d/volume.filters
|
mountPath: /etc/cinder/rootwrap.d/volume.filters
|
||||||
subPath: volume.filters
|
subPath: volume.filters
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
{{- if .Values.conf.enable_iscsi }}
|
||||||
|
- name: host-rootfs
|
||||||
|
mountPath: /mnt/host-rootfs
|
||||||
|
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }}
|
||||||
|
mountPropagation: HostToContainer
|
||||||
|
{{- end }}
|
||||||
|
- name: host-dev
|
||||||
|
mountPath: /dev
|
||||||
|
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }}
|
||||||
|
mountPropagation: Bidirectional
|
||||||
|
{{- end }}
|
||||||
|
- name: runlock
|
||||||
|
mountPath: /run/lock
|
||||||
|
- name: etciscsi
|
||||||
|
mountPath: /etc/iscsi
|
||||||
|
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }}
|
||||||
|
mountPropagation: Bidirectional
|
||||||
|
{{- end }}
|
||||||
|
- name: usrlocalsbin
|
||||||
|
mountPath: /usr/local/sbin
|
||||||
|
- name: cinder-bin
|
||||||
|
mountPath: /usr/local/sbin/iscsiadm
|
||||||
|
subPath: iscsiadm
|
||||||
|
{{- end }}
|
||||||
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
|
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
|
||||||
{{ if $mounts_cinder_backup.volumeMounts }}{{ toYaml $mounts_cinder_backup.volumeMounts | indent 12 }}{{ end }}
|
{{ if $mounts_cinder_backup.volumeMounts }}{{ toYaml $mounts_cinder_backup.volumeMounts | indent 12 }}{{ end }}
|
||||||
volumes:
|
volumes:
|
||||||
@ -284,6 +315,22 @@ spec:
|
|||||||
- name: cinder-coordination
|
- name: cinder-coordination
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.conf.enable_iscsi }}
|
||||||
|
- name: host-rootfs
|
||||||
|
hostPath:
|
||||||
|
path: /
|
||||||
|
- name: host-dev
|
||||||
|
hostPath:
|
||||||
|
path: /dev
|
||||||
|
- name: runlock
|
||||||
|
hostPath:
|
||||||
|
path: /run/lock
|
||||||
|
- name: etciscsi
|
||||||
|
hostPath:
|
||||||
|
path: /etc/iscsi
|
||||||
|
- name: usrlocalsbin
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
|
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
|
||||||
{{ if $mounts_cinder_backup.volumes }}{{ toYaml $mounts_cinder_backup.volumes | indent 8 }}{{ end }}
|
{{ if $mounts_cinder_backup.volumes }}{{ toYaml $mounts_cinder_backup.volumes | indent 8 }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -175,6 +175,7 @@ pod:
|
|||||||
default: 10
|
default: 10
|
||||||
useHostNetwork:
|
useHostNetwork:
|
||||||
volume: false
|
volume: false
|
||||||
|
backup: false
|
||||||
mounts:
|
mounts:
|
||||||
cinder_api:
|
cinder_api:
|
||||||
init_container: null
|
init_container: null
|
||||||
|
@ -5,12 +5,17 @@
|
|||||||
pod:
|
pod:
|
||||||
useHostNetwork:
|
useHostNetwork:
|
||||||
volume: true
|
volume: true
|
||||||
|
backup: true
|
||||||
security_context:
|
security_context:
|
||||||
cinder_volume:
|
cinder_volume:
|
||||||
container:
|
container:
|
||||||
cinder_volume:
|
cinder_volume:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
privileged: true
|
privileged: true
|
||||||
|
cinder_backup:
|
||||||
|
container:
|
||||||
|
cinder_backup:
|
||||||
|
privileged: true
|
||||||
conf:
|
conf:
|
||||||
cinder:
|
cinder:
|
||||||
DEFAULT:
|
DEFAULT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user