Files
smarter-device-manager/chart/templates/common.yaml
Alexandre Peixoto Ferreira d364c8b385 add support for valur for nodeSelector
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2022-11-04 09:55:56 -05:00

75 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ .Values.application.appName }}
namespace: {{ .Values.application.namespace }}
labels:
name: {{ .Values.application.appName }}
role: agent
spec:
selector:
matchLabels:
name: {{ .Values.application.appName }}
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
name: {{ .Values.application.appName }}
annotations:
node.kubernetes.io/bootstrap-checkpoint: "true"
spec:
nodeSelector:
{{- toYaml .Values.configuration.nodeSelector | nindent 8 }}
tolerations:
- key: "smarter.type"
operator: "Equal"
value: "edge"
effect: "NoSchedule"
priorityClassName: "system-node-critical"
hostname: {{ .Values.application.appName }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: {{ .Values.application.appName }}
image: {{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
resources:
limits:
cpu: 200m
memory: 15Mi
requests:
cpu: 10m
memory: 15Mi
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: dev-dir
mountPath: /dev
- name: sys-dir
mountPath: /sys
{{- if .Values.config }}
- name: config
mountPath: /root/config
{{- end }}
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
- name: dev-dir
hostPath:
path: /dev
- name: sys-dir
hostPath:
path: /sys
{{- if .Values.config }}
- name: config
configMap:
name: {{ .Values.application.appName }}
{{- end }}
terminationGracePeriodSeconds: 30