Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / operator / charts / 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           {{- if .Values.prometheusOperator.logFormat }}
36             - --log-format={{ .Values.prometheusOperator.logFormat }}
37           {{- end }}
38           {{- if .Values.prometheusOperator.logLevel }}
39             - --log-level={{ .Values.prometheusOperator.logLevel }}
40           {{- end }}
41             - --logtostderr=true
42             - --crd-apigroup={{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
43             - --localhost=127.0.0.1
44             - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }}
45             - --config-reloader-image={{ .Values.prometheusOperator.configmapReloadImage.repository }}:{{ .Values.prometheusOperator.configmapReloadImage.tag }}
46           ports:
47             - containerPort: 8080
48               name: http
49           resources:
50 {{ toYaml .Values.prometheusOperator.resources | indent 12 }}
51           securityContext:
52             allowPrivilegeEscalation: false
53             readOnlyRootFilesystem: true
54 {{- if .Values.prometheusOperator.securityContext }}
55       securityContext:
56 {{ toYaml .Values.prometheusOperator.securityContext | indent 8 }}
57 {{- end }}
58       serviceAccountName: {{ template "prometheus-operator.operator.serviceAccountName" . }}
59     {{- with .Values.prometheusOperator.nodeSelector }}
60       nodeSelector:
61 {{ toYaml . | indent 8 }}
62     {{- end }}
63     {{- with .Values.prometheusOperator.affinity }}
64       affinity:
65 {{ toYaml . | indent 8 }}
66     {{- end }}
67     {{- with .Values.prometheusOperator.tolerations }}
68       tolerations:
69 {{ toYaml . | indent 8 }}
70     {{- end }}
71 {{- end }}