From 0de6dd6a903d219be72bc5465507d59a08cf265a Mon Sep 17 00:00:00 2001 From: Ondrej Vasko Date: Thu, 4 Feb 2021 18:12:53 +0100 Subject: [PATCH] Allow adding extra volumes to openstack-exporter deployment Signed-off-by: Ondrej Vasko --- .../templates/deployment.yaml | 10 ++++++++-- charts/prometheus-openstack-exporter/values.yaml | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-openstack-exporter/templates/deployment.yaml b/charts/prometheus-openstack-exporter/templates/deployment.yaml index e806c3151..f13f303af 100644 --- a/charts/prometheus-openstack-exporter/templates/deployment.yaml +++ b/charts/prometheus-openstack-exporter/templates/deployment.yaml @@ -27,8 +27,11 @@ spec: {{- . | toYaml | nindent 8 }} {{- end }} volumeMounts: - - name: openstack-config - mountPath: /etc/openstack + - name: openstack-config + mountPath: /etc/openstack + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 8 }} + {{- end }} ports: - name: metrics containerPort: 9180 @@ -36,6 +39,9 @@ spec: - name: openstack-config secret: secretName: openstack-config + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 6 }} + {{- end }} {{- with .Values.hostAliases }} hostAliases: {{ toYaml . | indent 8 }} diff --git a/charts/prometheus-openstack-exporter/values.yaml b/charts/prometheus-openstack-exporter/values.yaml index 49b0d6b51..ceb7fcb26 100644 --- a/charts/prometheus-openstack-exporter/values.yaml +++ b/charts/prometheus-openstack-exporter/values.yaml @@ -23,6 +23,21 @@ serviceMonitor: #commonLabels: # prometheus.io/monitor: "true" +# Add extra volumes mounted to openstack-exporter deployment +# Useful for mounting CA Certificates +#extraVolumes: +#- name: company-ca +# configMap: +# name: my-company-ca +# items: +# - key: ca +# path: my-company-ca +# +#extraVolumeMounts: +#- mountPath: /etc/ssl/certs/my-company-ca +# name: company-ca +# subPath: my-company-ca + # Generate a secret for clouds.yaml # Doc: https://github.com/openstack-exporter/openstack-exporter#openstack-configuration clouds_yaml_config: |