2 # Copyright 2018 Intel Corporation, Inc
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21 selector: {{- include "common.selectors" . | nindent 4 }}
22 replicas: {{ .Values.replicaCount }}
24 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
27 - image: {{ include "repositoryGenerator.image.busybox" . }}
28 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
29 name: {{ include "common.name" . }}-chown-init
30 command: ["chown", "-R", "65534:65534", "{{ .Values.persistence.containerMountPath }}"]
32 - name: {{ include "common.fullname" . }}-storage
33 mountPath: {{ .Values.persistence.containerMountPath }}
35 - name: {{ include "common.name" . }}-configmap-reload
36 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.global.configmapReload.image.repository }}:{{ .Values.global.configmapReload.image.tag }}
37 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 - --volume-dir=/etc/config
40 - --webhook-url=http://localhost:9090/-/reload
42 - name: {{ include "common.fullname" . }}-config
43 mountPath: /etc/config
46 - name: {{ include "common.name" . }}-server
47 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}
48 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 - --config.file=/etc/config/prometheus.yml
51 - --storage.tsdb.path={{ .Values.persistence.containerMountPath }}
52 - --web.console.libraries=/etc/prometheus/console_libraries
53 - --web.console.templates=/etc/prometheus/consoles
54 - --web.enable-lifecycle
55 {{- if .Values.server.enableAdminApi }}
56 - --web.enable-admin-api
59 {{ toYaml .Values.resources | indent 10 }}
60 ports: {{ include "common.containerPorts" . | nindent 10 }}
61 # disable liveness probe when breakpoints set in debugger
62 # so K8s doesn't restart unresponsive container
63 {{- if .Values.liveness.enabled }}
67 port: {{ .Values.service.internalPort }}
68 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.liveness.periodSeconds }}
70 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
72 {{- if .Values.readiness.enabled }}
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.readiness.periodSeconds }}
79 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
82 - name: {{ include "common.fullname" . }}-config
83 mountPath: /etc/config
84 - name: {{ include "common.fullname" . }}-storage
85 mountPath: {{ .Values.persistence.containerMountPath }}
86 {{- if .Values.nodeSelector }}
88 {{ toYaml .Values.nodeSelector | indent 8 }}
90 {{- if .Values.affinity }}
92 {{ toYaml .Values.affinity | indent 8 }}
94 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
96 - name: {{ include "common.fullname" . }}-config
98 name: {{ include "common.fullname" . }}
99 - name: {{ include "common.fullname" . }}-storage
100 {{- if .Values.persistence.enabled }}
101 persistentVolumeClaim:
102 claimName: {{ include "common.fullname" . }}
106 {{- include "common.imagePullSecrets" . | nindent 6 }}
107 restartPolicy: Always