fix(cinder): provide a pod writeable space for state_path

Some cinder volume backends will need to write data or mount and they
will always do so relative to the state_path. This defaults the
state_path to the same value in the cinder.conf and provides an emptyDir
mount so that the path is writeable inside the pod. This is the same
behavior done in the neutron chart.

Change-Id: Iaa319e4b5f3aa1a18970f2f699804606301b0c92
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
Doug Goldstein
2025-07-25 16:51:33 -05:00
parent 2c187ac47d
commit 160cd22a32
3 changed files with 11 additions and 0 deletions

View File

@@ -162,6 +162,8 @@ spec:
volumeMounts:
- name: pod-tmp
mountPath: /tmp
- name: pod-var-cinder
mountPath: {{ .Values.conf.cinder.DEFAULT.state_path }}
- name: cinder-bin
mountPath: /tmp/cinder-volume.sh
subPath: cinder-volume.sh
@@ -293,6 +295,8 @@ spec:
volumes:
- name: pod-tmp
emptyDir: {}
- name: pod-var-cinder
emptyDir: {}
- name: cinder-bin
configMap:
name: cinder-bin

View File

@@ -835,6 +835,7 @@ conf:
app_name: cinder-volume
cinder:
DEFAULT:
state_path: /var/lib/cinder
volume_usage_audit_period: hour
resource_query_filters_file: /etc/cinder/resource_filters.json
log_config_append: /etc/cinder/logging.conf

View File

@@ -0,0 +1,6 @@
---
fixes:
- |
Some backends of cinder will write some temp data into the state_path
so it should be something available to be written to for the pod.
...