Merge "feat(tls): add tls to prometheus-openstack-exporter"

This commit is contained in:
Zuul 2020-08-04 14:54:26 +00:00 committed by Gerrit Code Review
commit 8d8d53c65c
4 changed files with 19 additions and 2 deletions

View File

@ -83,7 +83,7 @@ spec:
- name: LISTEN_PORT - name: LISTEN_PORT
value: {{ tuple "prometheus_openstack_exporter" "internal" "exporter" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} value: {{ tuple "prometheus_openstack_exporter" "internal" "exporter" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.conf.prometheus_openstack_exporter | indent 12 }} {{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.conf.prometheus_openstack_exporter | indent 12 }}
{{- with $env := dict "ksUserSecret" $ksUserSecret }} {{- with $env := dict "ksUserSecret" $ksUserSecret "useCA" .Values.manifests.certificates }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
@ -93,6 +93,7 @@ spec:
mountPath: /tmp/prometheus-openstack-exporter.sh mountPath: /tmp/prometheus-openstack-exporter.sh
subPath: prometheus-openstack-exporter.sh subPath: prometheus-openstack-exporter.sh
readOnly: true readOnly: true
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
volumes: volumes:
- name: pod-tmp - name: pod-tmp
emptyDir: {} emptyDir: {}
@ -100,4 +101,5 @@ spec:
configMap: configMap:
name: prometheus-openstack-exporter-bin name: prometheus-openstack-exporter-bin
defaultMode: 0555 defaultMode: 0555
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
{{- end }} {{- end }}

View File

@ -51,8 +51,9 @@ spec:
mountPath: /tmp/ks-user.sh mountPath: /tmp/ks-user.sh
subPath: ks-user.sh subPath: ks-user.sh
readOnly: true readOnly: true
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
env: env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin "useCA" .Values.manifests.certificates }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: SERVICE_OS_SERVICE_NAME - name: SERVICE_OS_SERVICE_NAME
@ -69,4 +70,5 @@ spec:
configMap: configMap:
name: prometheus-openstack-exporter-bin name: prometheus-openstack-exporter-bin
defaultMode: 0555 defaultMode: 0555
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
{{- end }} {{- end }}

View File

@ -134,6 +134,14 @@ secrets:
identity: identity:
admin: prometheus-openstack-exporter-keystone-admin admin: prometheus-openstack-exporter-keystone-admin
user: prometheus-openstack-exporter-keystone-user user: prometheus-openstack-exporter-keystone-user
tls:
identity:
api:
# This name should be same as in keystone. Keystone
# secret will be used in these charts
#
internal: keystone-tls-api
endpoints: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local
@ -212,6 +220,7 @@ network_policy:
- {} - {}
manifests: manifests:
certificates: false
configmap_bin: true configmap_bin: true
deployment: true deployment: true
job_image_repo_sync: true job_image_repo_sync: true

View File

@ -0,0 +1,4 @@
---
manifests:
certificates: true
...