feat(placement): allow users to provide configs in placement.conf.d
Allow users to provide additional projected volumes to be mounted into the various deployments, statefulsets, and jobs that the placement chart has in the /etc/placement/placement.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: I5c9e766c179e362a18832d09130d11cc1bab4944 Signed-off-by: Mathieu Gagné <mgagne@calavera.ca>
This commit is contained in:
@@ -22,6 +22,8 @@ limitations under the License.
|
||||
|
||||
{{- $serviceAccountName := "placement-api" }}
|
||||
{{ tuple $envAll "api" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
|
||||
{{- $etcSources := .Values.pod.etcSources.placement }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -128,6 +130,9 @@ spec:
|
||||
mountPath: /etc/placement/placement.conf
|
||||
subPath: placement.conf
|
||||
readOnly: true
|
||||
- name: placement-etc-snippets
|
||||
mountPath: /etc/placement/placement.conf.d/
|
||||
readOnly: true
|
||||
- name: placement-etc
|
||||
mountPath: /etc/placement/placement-api-uwsgi.ini
|
||||
subPath: placement-api-uwsgi.ini
|
||||
@@ -166,6 +171,14 @@ spec:
|
||||
secret:
|
||||
secretName: placement-etc
|
||||
defaultMode: 0444
|
||||
- name: placement-etc-snippets
|
||||
{{- if $etcSources }}
|
||||
projected:
|
||||
sources:
|
||||
{{ toYaml $etcSources | indent 14 }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{ end }}
|
||||
{{- if .Values.conf.placement.DEFAULT.log_dir }}
|
||||
- name: log
|
||||
hostPath:
|
||||
|
||||
@@ -309,6 +309,11 @@ pod:
|
||||
placement:
|
||||
volumeMounts:
|
||||
volumes:
|
||||
# -- This allows users to add Kubernetes Projected Volumes to be mounted at /etc/placement/placement.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:
|
||||
placement: []
|
||||
replicas:
|
||||
api: 1
|
||||
lifecycle:
|
||||
|
||||
7
releasenotes/notes/placement-a180f4e88ed81d30.yaml
Normal file
7
releasenotes/notes/placement-a180f4e88ed81d30.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
placement:
|
||||
- |
|
||||
Allow users to add additional sources to the Projected Volume that is mounted
|
||||
at /etc/placement/placement.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