64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: DaemonSet
|
||
|
metadata:
|
||
|
name: {{ include "pod-cleaner.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "pod-cleaner.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "pod-cleaner.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "pod-cleaner.selectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
serviceAccountName: {{ include "pod-cleaner.serviceAccountName" . }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
args:
|
||
|
- "--metric-path=/metrics"
|
||
|
- "--metric-port=0.0.0.0:{{ .Values.service.port }}"
|
||
|
- "--log-file={{ .Values.podCleaner.logfile }}"
|
||
|
- "--log={{ .Values.podCleaner.logLevel }}"
|
||
|
ports:
|
||
|
- name: http-metric
|
||
|
containerPort: {{ .Values.service.port }}
|
||
|
protocol: TCP
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /metrics
|
||
|
port: http-metric
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /metrics
|
||
|
port: http-metric
|
||
|
resources:
|
||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|