feat(glance): allow users to provide configs in glance.conf.d
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é <mgagne@calavera.ca>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
7
releasenotes/notes/glance-cbd61a1ae1e902b5.yaml
Normal file
7
releasenotes/notes/glance-cbd61a1ae1e902b5.yaml
Normal file
@@ -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.
|
||||
...
|
||||
Reference in New Issue
Block a user