d14d826b26
The current copyright refers to a non-existent group "openstack helm authors" with often out-of-date references that are confusing when adding a new file to the repo. This change removes all references to this copyright by the non-existent group and any blank lines underneath. Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
82 lines
4.2 KiB
YAML
82 lines
4.2 KiB
YAML
{{/*
|
|
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 "memcached-exporter" }}
|
|
{{- $configMapBinName := printf "%s-%s" $envAll.Release.Name "memcached-exporter-bin" }}
|
|
|
|
{{ tuple $envAll "prometheus_memcached_exporter" $rcControllerName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ $rcControllerName | quote }}
|
|
labels:
|
|
{{ tuple $envAll "prometheus_memcached_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.pod.replicas.prometheus_memcached_exporter }}
|
|
selector:
|
|
matchLabels:
|
|
{{ tuple $envAll "prometheus_memcached_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_memcached_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
namespace: {{ .Values.endpoints.prometheus_memcached_exporter.namespace }}
|
|
annotations:
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
|
{{ dict "envAll" $envAll "podName" "prometheus_memcached_exporter" "containerNames" (list "init" "memcached-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
|
spec:
|
|
{{ dict "envAll" $envAll "application" "memcached_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
shareProcessNamespace: true
|
|
serviceAccountName: {{ $rcControllerName | quote }}
|
|
nodeSelector:
|
|
{{ .Values.labels.prometheus_memcached_exporter.node_selector_key }}: {{ .Values.labels.prometheus_memcached_exporter.node_selector_value | quote }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_memcached_exporter.timeout | default "30" }}
|
|
initContainers:
|
|
{{ tuple $envAll "prometheus_memcached_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
- name: memcached-exporter
|
|
image: {{ .Values.images.tags.prometheus_memcached_exporter }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_memcached_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
{{ dict "envAll" $envAll "application" "memcached_exporter" "container" "memcached_exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
|
command:
|
|
- /tmp/memcached-exporter.sh
|
|
- start
|
|
ports:
|
|
- name: metrics
|
|
containerPort: {{ tuple "prometheus_memcached_exporter" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
env:
|
|
- name: MEMCACHED_HOST
|
|
value: {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
|
|
volumeMounts:
|
|
- name: pod-tmp
|
|
mountPath: /tmp
|
|
- name: memcached-exporter-bin
|
|
mountPath: /tmp/memcached-exporter.sh
|
|
subPath: memcached-exporter.sh
|
|
readOnly: true
|
|
volumes:
|
|
- name: pod-tmp
|
|
emptyDir: {}
|
|
- name: memcached-exporter-bin
|
|
configMap:
|
|
name: {{ $configMapBinName | quote }}
|
|
defaultMode: 0555
|
|
{{- end }}
|