_whoogle.tpl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {{- define "whoogle.workload" -}}
  2. {{- $redirects := list -}}
  3. {{- range $r := .Values.whoogleConfig.redirects -}}
  4. {{- $redirects = append $redirects (printf "%s:%s" $r.src $r.dst) -}}
  5. {{- end }}
  6. workload:
  7. whoogle:
  8. enabled: true
  9. primary: true
  10. type: Deployment
  11. podSpec:
  12. hostNetwork: {{ .Values.whoogleNetwork.hostNetwork }}
  13. securityContext:
  14. fsGroup: 927
  15. containers:
  16. whoogle:
  17. enabled: true
  18. primary: true
  19. imageSelector: image
  20. securityContext:
  21. runAsUser: 927
  22. runAsGroup: 927
  23. readOnlyRootFilesystem: false
  24. env:
  25. EXPOSE_PORT: {{ .Values.whoogleNetwork.webPort }}
  26. {{- with $redirects }}
  27. WHOOGLE_REDIRECTS: {{ join "," $redirects }}
  28. {{- end -}}
  29. {{ with .Values.whoogleConfig.additionalEnvs }}
  30. envList:
  31. {{ range $env := . }}
  32. - name: {{ $env.name }}
  33. value: {{ $env.value }}
  34. {{ end }}
  35. {{ end }}
  36. probes:
  37. liveness:
  38. enabled: true
  39. type: http
  40. port: {{ .Values.whoogleNetwork.webPort }}
  41. path: /healthz
  42. readiness:
  43. enabled: true
  44. type: http
  45. port: {{ .Values.whoogleNetwork.webPort }}
  46. path: /healthz
  47. startup:
  48. enabled: true
  49. type: http
  50. port: {{ .Values.whoogleNetwork.webPort }}
  51. path: /healthz
  52. initContainers:
  53. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  54. "UID" 927
  55. "GID" 927
  56. "mode" "check"
  57. "type" "init") | nindent 8 }}
  58. {{- end -}}