7f20bcd938
This PS fixes the use of the security context macros for the rabbitmq chart Change-Id: I91499757bd7af95132d0aee33a16d642e26439bb
72 lines
3.9 KiB
YAML
72 lines
3.9 KiB
YAML
{{/*
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- $rcControllerName := printf "%s-%s" $envAll.Release.Name "rabbitmq-exporter" }}
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" $rcControllerName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ $rcControllerName | quote }}
|
|
labels:
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
|
spec:
|
|
replicas: {{ $envAll.Values.pod.replicas.prometheus_rabbitmq_exporter }}
|
|
selector:
|
|
matchLabels:
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
namespace: {{ $envAll.Values.endpoints.prometheus_rabbitmq_exporter.namespace }}
|
|
spec:
|
|
{{ dict "envAll" $envAll "application" "exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
serviceAccountName: {{ $rcControllerName | quote }}
|
|
nodeSelector:
|
|
{{ $envAll.Values.labels.prometheus_rabbitmq_exporter.node_selector_key }}: {{ $envAll.Values.labels.prometheus_rabbitmq_exporter.node_selector_value | quote }}
|
|
terminationGracePeriodSeconds: {{ $envAll.Values.pod.lifecycle.termination_grace_period.prometheus_rabbitmq_exporter.timeout | default "30" }}
|
|
initContainers:
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
- name: rabbitmq-exporter
|
|
{{ tuple $envAll "prometheus_rabbitmq_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
|
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_rabbitmq_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
{{ dict "envAll" $envAll "application" "exporter" "container" "rabbitmq_exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
|
ports:
|
|
- name: metrics
|
|
containerPort: {{ $envAll.Values.network.prometheus_rabbitmq_exporter.port }}
|
|
env:
|
|
- name: RABBIT_URL
|
|
value: http://{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}:15672
|
|
- name: RABBIT_USER
|
|
value: {{ $envAll.Values.endpoints.oslo_messaging.auth.user.username | quote }}
|
|
- name: RABBIT_PASSWORD
|
|
value: {{ $envAll.Values.endpoints.oslo_messaging.auth.user.password | quote }}
|
|
- name: RABBIT_CAPABILITIES
|
|
value: {{ include "helm-toolkit.utils.joinListWithComma" $envAll.Values.conf.prometheus_exporter.capabilities | quote }}
|
|
- name: PUBLISH_PORT
|
|
value: {{ $envAll.Values.network.prometheus_rabbitmq_exporter.port | quote }}
|
|
- name: LOG_LEVEL
|
|
value: {{ $envAll.Values.conf.prometheus_exporter.log_level | quote }}
|
|
- name: SKIPVERIFY
|
|
value: {{ $envAll.Values.conf.prometheus_exporter.skipverify | quote }}
|
|
{{- end }}
|