120 lines
4.0 KiB
YAML
120 lines
4.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "prometheus-blackbox-exporter.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }}
|
|
spec:
|
|
replicas: {{ .Values.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
strategy:
|
|
{{ toYaml .Values.strategy | indent 4 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
{{- if .Values.podAnnotations }}
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml .Values.affinity | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml .Values.tolerations | indent 6 }}
|
|
{{- end }}
|
|
{{- if .Values.image.pullSecrets }}
|
|
imagePullSecrets:
|
|
{{- range .Values.image.pullSecrets }}
|
|
- name: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
restartPolicy: {{ .Values.restartPolicy }}
|
|
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
|
{{- end }}
|
|
containers:
|
|
- name: blackbox-exporter
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
securityContext:
|
|
readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }}
|
|
runAsNonRoot: {{ .Values.runAsNonRoot }}
|
|
runAsUser: {{ .Values.runAsUser }}
|
|
args:
|
|
{{- if .Values.config }}
|
|
- "--config.file=/config/blackbox.yaml"
|
|
{{- else }}
|
|
- "--config.file=/etc/blackbox_exporter/config.yml"
|
|
{{- end }}
|
|
{{- if .Values.extraArgs }}
|
|
{{ toYaml .Values.extraArgs | indent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
ports:
|
|
- containerPort: {{ .Values.service.port }}
|
|
name: http
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: config
|
|
{{- range .Values.extraConfigmapMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath | default "" }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- range .Values.extraSecretMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: config
|
|
{{- if .Values.secretConfig }}
|
|
secret:
|
|
secretName: {{ template "prometheus-blackbox-exporter.fullname" . }}
|
|
{{- else }}
|
|
configMap:
|
|
name: {{ template "prometheus-blackbox-exporter.fullname" . }}
|
|
{{- end }}
|
|
{{- range .Values.extraConfigmapMounts }}
|
|
- name: {{ .name }}
|
|
configMap:
|
|
name: {{ .configMap }}
|
|
defaultMode: {{ .defaultMode }}
|
|
{{- end }}
|
|
{{- range .Values.extraSecretMounts }}
|
|
- name: {{ .name }}
|
|
secret:
|
|
secretName: {{ .secretName }}
|
|
defaultMode: {{ .defaultMode }}
|
|
{{- end }} |