From 82a6fbd77865238297e6ca02de4ab1863dcfb30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Gagn=C3=A9?= Date: Thu, 19 Feb 2026 14:22:56 -0500 Subject: [PATCH] feat(glance): allow users to provide configs in glance.conf.d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow users to provide additional projected volumes to be mounted into the various deployments, statefulsets, and jobs that the glance chart has in the /etc/glance/glance.conf.d/ path. This allows for users to provide service account or database secrets via different operators as well as provide ways to use the chart to define common deployments while being able to have site specific overrides. Change-Id: Ie5f9b3cbfa22711205f2658cfe3eea3e3a75a14d Signed-off-by: Mathieu Gagné --- glance/templates/deployment-api.yaml | 13 +++++++++++++ glance/values.yaml | 5 +++++ releasenotes/notes/glance-cbd61a1ae1e902b5.yaml | 7 +++++++ 3 files changed, 25 insertions(+) create mode 100644 releasenotes/notes/glance-cbd61a1ae1e902b5.yaml diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index d402eddadd..26ffdf4a38 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -37,6 +37,8 @@ httpGet: {{- $serviceAccountName := "glance-api" }} {{ tuple $envAll "api" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} + +{{- $etcSources := .Values.pod.etcSources.glance_api }} --- apiVersion: apps/v1 kind: Deployment @@ -203,6 +205,9 @@ spec: mountPath: /etc/glance/glance-api.conf subPath: glance-api.conf readOnly: true + - name: glance-etc-snippets + mountPath: /etc/glance/glance.conf.d/ + readOnly: true - name: glance-etc mountPath: /etc/glance/glance-api-uwsgi.ini subPath: glance-api-uwsgi.ini @@ -323,6 +328,14 @@ spec: secret: secretName: glance-etc defaultMode: 0444 + - name: glance-etc-snippets +{{- if $etcSources }} + projected: + sources: +{{ toYaml $etcSources | indent 14 }} +{{- else }} + emptyDir: {} +{{ end }} {{- if eq .Values.storage "pvc" }} - name: glance-images persistentVolumeClaim: diff --git a/glance/values.yaml b/glance/values.yaml index a1ca402a25..d0d8dcdefd 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -908,6 +908,11 @@ pod: glance_db_sync: volumeMounts: volumes: + # -- This allows users to add Kubernetes Projected Volumes to be mounted at /etc/glance/glance.conf.d/ + ## This is a list of projected volume source objects for each deployment/statefulset/daemonset/cronjob + ## https://kubernetes.io/docs/concepts/storage/projected-volumes/ + etcSources: + glance_api: replicas: api: 1 lifecycle: diff --git a/releasenotes/notes/glance-cbd61a1ae1e902b5.yaml b/releasenotes/notes/glance-cbd61a1ae1e902b5.yaml new file mode 100644 index 0000000000..c5a6b5b4a0 --- /dev/null +++ b/releasenotes/notes/glance-cbd61a1ae1e902b5.yaml @@ -0,0 +1,7 @@ +--- +glance: + - | + Allow users to add additional sources to the Projected Volume that is mounted + at /etc/glance/glance.conf.d/ so they may more easily override configs or provide + additional configs for the various services in the chart. +...