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.
17 apiVersion: extensions/v1beta1
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ .Release.Name }}
26 heritage: {{ .Release.Service }}
28 replicas: {{ .Values.replicaCount }}
31 app: {{ include "common.name" . }}
35 app: {{ include "common.name" . }}
36 release: {{ .Release.Name }}
37 name: {{ include "common.name" . }}
40 - image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 name: {{ include "common.name" . }}-chown-init
43 command: ["chown", "-R", "65534:65534", "{{ .Values.persistence.containerMountPath }}"]
45 - name: {{ include "common.fullname" . }}-storage
46 mountPath: {{ .Values.persistence.containerMountPath }}
48 - name: {{ include "common.name" . }}-configmap-reload
49 image: "{{ .Values.global.configmapReload.image.repository }}:{{ .Values.global.configmapReload.image.tag }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 - --volume-dir=/etc/config
53 - --webhook-url=http://localhost:9090/-/reload
55 - name: {{ include "common.fullname" . }}-config
56 mountPath: /etc/config
59 - name: {{ include "common.name" . }}-server
60 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 - --config.file=/etc/config/prometheus.yml
64 - --storage.tsdb.path={{ .Values.persistence.containerMountPath }}
65 - --web.console.libraries=/etc/prometheus/console_libraries
66 - --web.console.templates=/etc/prometheus/consoles
67 - --web.enable-lifecycle
68 {{- if .Values.server.enableAdminApi }}
69 - --web.enable-admin-api
72 {{ toYaml .Values.resources | indent 10 }}
74 - containerPort: {{ .Values.service.internalPort }}
75 # disable liveness probe when breakpoints set in debugger
76 # so K8s doesn't restart unresponsive container
77 {{- if .Values.liveness.enabled }}
81 port: {{ .Values.service.internalPort }}
82 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.liveness.periodSeconds }}
84 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
86 {{- if .Values.readiness.enabled }}
90 port: {{ .Values.service.internalPort }}
91 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
92 periodSeconds: {{ .Values.readiness.periodSeconds }}
93 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
96 - name: {{ include "common.fullname" . }}-config
97 mountPath: /etc/config
98 - name: {{ include "common.fullname" . }}-storage
99 mountPath: {{ .Values.persistence.containerMountPath }}
100 {{- if .Values.nodeSelector }}
102 {{ toYaml .Values.nodeSelector | indent 8 }}
104 {{- if .Values.affinity }}
106 {{ toYaml .Values.affinity | indent 8 }}
109 - name: {{ include "common.fullname" . }}-config
111 name: {{ include "common.fullname" . }}
112 - name: {{ include "common.fullname" . }}-storage
113 {{- if .Values.persistence.enabled }}
114 persistentVolumeClaim:
115 claimName: {{ include "common.fullname" . }}
120 - name: "{{ include "common.namespace" . }}-docker-registry-key"
121 restartPolicy: Always