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 {{- if .Values.global.prometheus.enabled -}}
19 apiVersion: extensions/v1beta1
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
30 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
39 name: {{ include "common.name" . }}
42 - image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 name: {{ include "common.name" . }}-chown-init
45 command: ["chown", "-R", "65534:65534", "{{ .Values.persistence.containerMountPath }}"]
47 - name: {{ include "common.fullname" . }}-storage
48 mountPath: {{ .Values.persistence.containerMountPath }}
50 - name: {{ include "common.name" . }}-configmap-reload
51 image: "{{ .Values.global.configmapReload.image.repository }}:{{ .Values.global.configmapReload.image.tag }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 - --volume-dir=/etc/config
55 - --webhook-url=http://localhost:9090/-/reload
57 - name: {{ include "common.fullname" . }}-config
58 mountPath: /etc/config
61 - name: {{ include "common.name" . }}-server
62 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
65 - --config.file=/etc/config/prometheus.yml
66 - --storage.tsdb.path={{ .Values.persistence.containerMountPath }}
67 - --web.console.libraries=/etc/prometheus/console_libraries
68 - --web.console.templates=/etc/prometheus/consoles
69 - --web.enable-lifecycle
70 {{- if .Values.server.enableAdminApi }}
71 - --web.enable-admin-api
74 {{ toYaml .Values.resources | indent 10 }}
76 - containerPort: {{ .Values.service.internalPort }}
77 # disable liveness probe when breakpoints set in debugger
78 # so K8s doesn't restart unresponsive container
79 {{- if .Values.liveness.enabled }}
83 port: {{ .Values.service.internalPort }}
84 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
85 periodSeconds: {{ .Values.liveness.periodSeconds }}
86 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
88 {{- if .Values.readiness.enabled }}
92 port: {{ .Values.service.internalPort }}
93 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.readiness.periodSeconds }}
95 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
98 - name: {{ include "common.fullname" . }}-config
99 mountPath: /etc/config
100 - name: {{ include "common.fullname" . }}-storage
101 mountPath: {{ .Values.persistence.containerMountPath }}
102 {{- if .Values.nodeSelector }}
104 {{ toYaml .Values.nodeSelector | indent 8 }}
106 {{- if .Values.affinity }}
108 {{ toYaml .Values.affinity | indent 8 }}
111 - name: {{ include "common.fullname" . }}-config
113 name: {{ include "common.fullname" . }}
114 - name: {{ include "common.fullname" . }}-storage
115 {{- if .Values.persistence.enabled }}
116 persistentVolumeClaim:
117 claimName: {{ include "common.fullname" . }}
122 - name: "{{ include "common.namespace" . }}-docker-registry-key"
123 restartPolicy: Always