Merge "feat(aodh): allow users to provide configs in aodh.conf.d"

This commit is contained in:
Zuul
2026-02-21 00:07:17 +00:00
committed by Gerrit Code Review
11 changed files with 93 additions and 4 deletions

View File

@@ -16,4 +16,6 @@ limitations under the License.
set -ex
exec aodh-expirer
exec aodh-expirer \
--config-file=/etc/aodh/aodh.conf \
--config-dir=/etc/aodh/aodh.conf.d

View File

@@ -18,4 +18,6 @@ limitations under the License.
set -ex
exec aodh-evaluator --config-file=/etc/aodh/aodh.conf
exec aodh-evaluator \
--config-file=/etc/aodh/aodh.conf \
--config-dir=/etc/aodh/aodh.conf.d

View File

@@ -18,4 +18,6 @@ limitations under the License.
set -ex
exec aodh-listener --config-file=/etc/aodh/aodh.conf
exec aodh-listener \
--config-file=/etc/aodh/aodh.conf \
--config-dir=/etc/aodh/aodh.conf.d

View File

@@ -18,4 +18,6 @@ limitations under the License.
set -ex
exec aodh-notifier --config-file=/etc/aodh/aodh.conf
exec aodh-notifier \
--config-file=/etc/aodh/aodh.conf \
--config-dir=/etc/aodh/aodh.conf.d

View File

@@ -22,6 +22,8 @@ limitations under the License.
{{- $serviceAccountName := "aodh-alarms-cleaner" }}
{{ tuple $envAll "alarms_cleaner" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $etcSources := .Values.pod.etcSources.aodh_alarms_cleaner }}
---
apiVersion: batch/v1
kind: CronJob
@@ -72,6 +74,9 @@ spec:
mountPath: /etc/aodh/aodh.conf
subPath: aodh.conf
readOnly: true
- name: aodh-etc-snippets
mountPath: /etc/aodh/aodh.conf.d/
readOnly: true
{{- if .Values.conf.aodh.DEFAULT.log_config_append }}
- name: aodh-etc
mountPath: {{ .Values.conf.aodh.DEFAULT.log_config_append }}
@@ -88,6 +93,14 @@ spec:
secret:
secretName: aodh-etc
defaultMode: 0444
- name: aodh-et-etc-snippets
{{- if $etcSources }}
projected:
sources:
{{ toYaml $etcSources | indent 18 }}
{{- else }}
emptyDir: {}
{{ end }}
- name: aodh-bin
configMap:
name: aodh-bin

View File

@@ -22,6 +22,8 @@ limitations under the License.
{{- $serviceAccountName := "aodh-api" }}
{{ tuple $envAll "api" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $etcSources := .Values.pod.etcSources.aodh_api }}
---
apiVersion: apps/v1
kind: Deployment
@@ -90,6 +92,9 @@ spec:
mountPath: /etc/aodh/aodh.conf
subPath: aodh.conf
readOnly: true
- name: aodh-etc-snippets
mountPath: /etc/aodh/aodh.conf.d/
readOnly: true
{{- if .Values.conf.aodh.DEFAULT.log_config_append }}
- name: aodh-etc
mountPath: {{ .Values.conf.aodh.DEFAULT.log_config_append }}
@@ -124,6 +129,14 @@ spec:
secret:
secretName: aodh-etc
defaultMode: 0444
- name: aodh-etc-snippets
{{- if $etcSources }}
projected:
sources:
{{ toYaml $etcSources | indent 14 }}
{{- else }}
emptyDir: {}
{{ end }}
- name: aodh-bin
configMap:
name: aodh-bin

View File

@@ -22,6 +22,8 @@ limitations under the License.
{{- $serviceAccountName := "aodh-evaluator" }}
{{ tuple $envAll "evaluator" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $etcSources := .Values.pod.etcSources.aodh_evaluator }}
---
apiVersion: apps/v1
kind: Deployment
@@ -81,6 +83,9 @@ spec:
mountPath: /etc/aodh/aodh.conf
subPath: aodh.conf
readOnly: true
- name: aodh-etc-snippets
mountPath: /etc/aodh/aodh.conf.d/
readOnly: true
{{- if .Values.conf.aodh.DEFAULT.log_config_append }}
- name: aodh-etc
mountPath: {{ .Values.conf.aodh.DEFAULT.log_config_append }}
@@ -105,6 +110,14 @@ spec:
secret:
secretName: aodh-etc
defaultMode: 0444
- name: aodh-etc-snippets
{{- if $etcSources }}
projected:
sources:
{{ toYaml $etcSources | indent 14 }}
{{- else }}
emptyDir: {}
{{ end }}
- name: aodh-bin
configMap:
name: aodh-bin

View File

@@ -22,6 +22,8 @@ limitations under the License.
{{- $serviceAccountName := "aodh-listener" }}
{{ tuple $envAll "listener" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $etcSources := .Values.pod.etcSources.aodh_listener }}
---
apiVersion: apps/v1
kind: Deployment
@@ -81,6 +83,9 @@ spec:
mountPath: /etc/aodh/aodh.conf
subPath: aodh.conf
readOnly: true
- name: aodh-etc-snippets
mountPath: /etc/aodh/aodh.conf.d/
readOnly: true
{{- if .Values.conf.aodh.DEFAULT.log_config_append }}
- name: aodh-etc
mountPath: {{ .Values.conf.aodh.DEFAULT.log_config_append }}
@@ -105,6 +110,14 @@ spec:
secret:
secretName: aodh-etc
defaultMode: 0444
- name: aodh-etc-snippets
{{- if $etcSources }}
projected:
sources:
{{ toYaml $etcSources | indent 14 }}
{{- else }}
emptyDir: {}
{{ end }}
- name: aodh-bin
configMap:
name: aodh-bin

View File

@@ -22,6 +22,8 @@ limitations under the License.
{{- $serviceAccountName := "aodh-notifier" }}
{{ tuple $envAll "notifier" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $etcSources := .Values.pod.etcSources.aodh_notifier }}
---
apiVersion: apps/v1
kind: Deployment
@@ -81,6 +83,9 @@ spec:
mountPath: /etc/aodh/aodh.conf
subPath: aodh.conf
readOnly: true
- name: aodh-etc-snippets
mountPath: /etc/aodh/aodh.conf.d/
readOnly: true
{{- if .Values.conf.aodh.DEFAULT.log_config_append }}
- name: aodh-etc
mountPath: {{ .Values.conf.aodh.DEFAULT.log_config_append }}
@@ -105,6 +110,14 @@ spec:
secret:
secretName: aodh-etc
defaultMode: 0444
- name: aodh-etc-snippets
{{- if $etcSources }}
projected:
sources:
{{ toYaml $etcSources | indent 14 }}
{{- else }}
emptyDir: {}
{{ end }}
- name: aodh-bin
configMap:
name: aodh-bin

View File

@@ -148,6 +148,15 @@ pod:
aodh_db_sync:
volumeMounts:
volumes:
# -- This allows users to add Kubernetes Projected Volumes to be mounted at /etc/aodh/aodh.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:
aodh_api: []
aodh_evaluator: []
aodh_listener: []
aodh_notifier: []
aodh_alarms_cleaner: []
replicas:
api: 1
evaluator: 1

View File

@@ -0,0 +1,7 @@
---
aodh:
- |
Allow users to add additional sources to the Projected Volume that is mounted
at /etc/aodh/aodh.conf.d/ so they may more easily override configs or provide
additional configs for the various services in the chart.
...