70 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "pi-temperature-monitoring.fullname" . }}
labels:
{{- include "pi-temperature-monitoring.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "pi-temperature-monitoring.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "pi-temperature-monitoring.selectorLabels" . | nindent 8 }}
spec:
nodeSelector:
kubernetes.io/arch: arm64
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{ if .Values.image.tag }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{ else }}
image: "{{ .Values.image.repository }}"
{{ end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
ports:
- name: prometheus
containerPort: 8555
protocol: TCP
livenessProbe:
httpGet:
path: /
port: prometheus
readinessProbe:
httpGet:
path: /
port: prometheus
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: usrbin
mountPath: /usr/bin
readOnly: true
- name: libs
mountPath: /lib/aarch64-linux-gnu
readOnly: true
# Not clear how to do `--device /dev/vchiq` -
# https://stackoverflow.com/questions/59290752/how-to-use-device-dev-video0-with-kubernetes says
# it might not be possible?
volumes:
- name: usrbin
hostPath:
path: /usr/bin
- name: libs
hostPath:
path: /lib/aarch64-linux-gnu