Fix Collection Service Helm charts package
[demo.git] / vnfs / DAaaS / prometheus-operator / templates / prometheus-operator / deployment.yaml
1 {{- if .Values.prometheusOperator.enabled }}
2 apiVersion: apps/v1
3 kind: Deployment
4 metadata:
5   name: {{ template "prometheus-operator.fullname" . }}-operator
6   labels:
7     app: {{ template "prometheus-operator.name" . }}-operator
8 {{ include "prometheus-operator.labels" . | indent 4 }}
9 spec:
10   replicas: 1
11   selector:
12     matchLabels:
13       app: {{ template "prometheus-operator.name" . }}-operator
14       release: {{ .Release.Name | quote }}
15   template:
16     metadata:
17       labels:
18         app: {{ template "prometheus-operator.name" . }}-operator
19 {{ include "prometheus-operator.labels" . | indent 8 }}
20 {{- if .Values.prometheusOperator.podLabels }}
21 {{ toYaml .Values.prometheusOperator.podLabels | indent 8 }}
22 {{- end }}
23     spec:
24     {{- if .Values.prometheusOperator.priorityClassName }}
25       priorityClassName: {{ .Values.prometheusOperator.priorityClassName }}
26     {{- end }}
27       containers:
28         - name: {{ template "prometheus-operator.name" . }}
29           image: "{{ .Values.prometheusOperator.image.repository }}:{{ .Values.prometheusOperator.image.tag }}"
30           imagePullPolicy: "{{ .Values.prometheusOperator.image.pullPolicy }}"
31           args:
32           {{- if .Values.prometheusOperator.kubeletService.enabled }}
33             - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ template "prometheus-operator.fullname" . }}-kubelet
34           {{- end }}
35             - --logtostderr=true
36             - --crd-apigroup={{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
37             - --localhost=127.0.0.1
38             - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }}
39             - --config-reloader-image={{ .Values.prometheusOperator.configmapReloadImage.repository }}:{{ .Values.prometheusOperator.configmapReloadImage.tag }}
40           ports:
41             - containerPort: 8080
42               name: http
43           resources:
44 {{ toYaml .Values.prometheusOperator.resources | indent 12 }}
45           securityContext:
46             allowPrivilegeEscalation: false
47             readOnlyRootFilesystem: true
48 {{- if .Values.prometheusOperator.securityContext }}
49       securityContext:
50 {{ toYaml .Values.prometheusOperator.securityContext | indent 8 }}
51 {{- end }}
52       serviceAccountName: {{ template "prometheus-operator.operator.serviceAccountName" . }}
53     {{- with .Values.prometheusOperator.nodeSelector }}
54       nodeSelector:
55 {{ toYaml . | indent 8 }}
56     {{- end }}
57     {{- with .Values.prometheusOperator.affinity }}
58       affinity:
59 {{ toYaml . | indent 8 }}
60     {{- end }}
61     {{- with .Values.prometheusOperator.tolerations }}
62       tolerations:
63 {{ toYaml . | indent 8 }}
64     {{- end }}
65 {{- end }}