Files
duino-miner-helm/templates/daemonset.yaml

114 lines
3.1 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "duino-miner.fullname" . }}
labels:
{{- include "duino-miner.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "duino-miner.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "duino-miner.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
priorityClassName: {{ .Values.priorityClassName | quote }}
serviceAccountName: {{ include "duino-miner.serviceAccountName" . }}
securityContext:
{{- with .Values.podSecurityContext }}
{{- toYaml . | nindent 8 }}
{{- else }}
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- with .Values.securityContext }}
{{- toYaml . | nindent 12 }}
{{- else }}
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
capabilities:
drop:
- ALL
{{- end }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: DUCO_DIR
value: {{ .Values.ducoDir | quote }}
volumeMounts:
- name: duco-data
mountPath: {{ .Values.ducoDir | quote }}
readOnly: false
- name: tmp
mountPath: /tmp
readOnly: false
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: duco-data
emptyDir: {}
- name: tmp
emptyDir: {}
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}