123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- {{- define "netboot.workload" -}}
- workload:
- netboot:
- enabled: true
- primary: true
- type: Deployment
- podSpec:
- hostNetwork: {{ .Values.netbootNetwork.hostNetwork }}
- containers:
- netboot:
- enabled: true
- primary: true
- imageSelector: image
- securityContext:
- runAsNonRoot: false
- runAsUser: 0
- runAsGroup: 0
- readOnlyRootFilesystem: false
- capabilities:
- add:
- - CHOWN
- - DAC_OVERRIDE
- - FOWNER
- - SETGID
- - SETUID
- - SYS_CHROOT
- - NET_BIND_SERVICE
- - KILL
- env:
- NGINX_PORT: {{ .Values.netbootNetwork.webAssetsPort }}
- TFTPD_OPTS: {{ join " " .Values.netbootConfig.tftpdOpts }}
- WEB_APP_PORT: {{ .Values.netbootNetwork.webHttpPort }}
- {{ with .Values.netbootConfig.additionalEnvs }}
- envList:
- {{ range $env := . }}
- - name: {{ $env.name }}
- value: {{ $env.value }}
- {{ end }}
- {{ end }}
- probes:
- {{- $cmd := "dnsmasq" -}}
- {{- if eq .Values.image.tag "0.7.1-nbxyz3" -}}
- {{- $cmd = "in.tftpd" -}}
- {{- end }}
- liveness:
- enabled: true
- type: exec
- command:
- - /bin/sh
- - -c
- - |
- pgrep {{ $cmd }}
- readiness:
- enabled: true
- type: exec
- command:
- - /bin/sh
- - -c
- - |
- pgrep {{ $cmd }}
- startup:
- enabled: true
- type: exec
- command:
- - /bin/sh
- - -c
- - |
- pgrep {{ $cmd }}
- {{- end -}}
|