_netboot.tpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {{- define "netboot.workload" -}}
  2. workload:
  3. netboot:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.netbootNetwork.hostNetwork }}
  9. containers:
  10. netboot:
  11. enabled: true
  12. primary: true
  13. imageSelector: image
  14. securityContext:
  15. runAsNonRoot: false
  16. runAsUser: 0
  17. runAsGroup: 0
  18. readOnlyRootFilesystem: false
  19. capabilities:
  20. add:
  21. - CHOWN
  22. - DAC_OVERRIDE
  23. - FOWNER
  24. - SETGID
  25. - SETUID
  26. - SYS_CHROOT
  27. - NET_BIND_SERVICE
  28. - KILL
  29. env:
  30. NGINX_PORT: {{ .Values.netbootNetwork.webAssetsPort }}
  31. TFTPD_OPTS: {{ join " " .Values.netbootConfig.tftpdOpts }}
  32. WEB_APP_PORT: {{ .Values.netbootNetwork.webHttpPort }}
  33. {{ with .Values.netbootConfig.additionalEnvs }}
  34. envList:
  35. {{ range $env := . }}
  36. - name: {{ $env.name }}
  37. value: {{ $env.value }}
  38. {{ end }}
  39. {{ end }}
  40. probes:
  41. {{- $cmd := "dnsmasq" -}}
  42. {{- if eq .Values.image.tag "0.7.1-nbxyz3" -}}
  43. {{- $cmd = "in.tftpd" -}}
  44. {{- end }}
  45. liveness:
  46. enabled: true
  47. type: exec
  48. command:
  49. - /bin/sh
  50. - -c
  51. - |
  52. pgrep {{ $cmd }}
  53. readiness:
  54. enabled: true
  55. type: exec
  56. command:
  57. - /bin/sh
  58. - -c
  59. - |
  60. pgrep {{ $cmd }}
  61. startup:
  62. enabled: true
  63. type: exec
  64. command:
  65. - /bin/sh
  66. - -c
  67. - |
  68. pgrep {{ $cmd }}
  69. {{- end -}}