pod-volume-cleaner/helm/templates/daemonset.yaml

76 lines
2.7 KiB
YAML
Raw Normal View History

2022-09-12 14:34:34 +00:00
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 }}
2022-10-11 14:48:46 +00:00
{{- if .Values.updateStrategy }}
updateStrategy:
{{ toYaml .Values.updateStrategy | nindent 4 | trim }}
{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
2022-09-12 14:34:34 +00:00
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "pod-cleaner.selectorLabels" . | nindent 8 }}
spec:
2022-10-11 14:48:46 +00:00
{{- with .Values.image.pullSecrets }}
2022-09-12 14:34:34 +00:00
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:
2022-10-11 14:48:46 +00:00
- "--metric-path={{ .Values.podMonitor.path }}"
2022-09-12 14:34:34 +00:00
- "--metric-port=0.0.0.0:{{ .Values.service.port }}"
- "--log-file={{ .Values.podCleaner.logfile }}"
- "--log={{ .Values.podCleaner.logLevel }}"
ports:
2022-10-11 14:48:46 +00:00
- name: {{ include "pod-cleaner.metrics.portName" . }}
2022-09-12 14:34:34 +00:00
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
2022-10-11 14:48:46 +00:00
path: {{ .Values.podMonitor.path }}
port: {{ include "pod-cleaner.metrics.portName" . }}
2022-09-12 14:34:34 +00:00
readinessProbe:
httpGet:
2022-10-11 14:48:46 +00:00
path: {{ .Values.podMonitor.path }}
port: {{ include "pod-cleaner.metrics.portName" . }}
2022-09-12 14:34:34 +00:00
resources:
{{- toYaml .Values.resources | nindent 12 }}
2022-10-11 14:48:46 +00:00
{{- if or .Values.nodeAffinity }}
affinity:
{{- toYaml .Values.nodeAffinity | nindent 8 }}
{{- end }}
2022-09-12 14:34:34 +00:00
{{- with .Values.nodeSelector }}
nodeSelector:
2022-10-11 14:48:46 +00:00
{{ tpl (toYaml . ) $ | nindent 8 }}
2022-09-12 14:34:34 +00:00
{{- end }}
{{- with .Values.tolerations }}
tolerations:
2022-10-11 14:48:46 +00:00
{{- tpl (toYaml . ) $ | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{ tpl (toYaml . ) $ | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "pod-cleaner.serviceAccountName" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
2022-09-12 14:34:34 +00:00
{{- end }}