_npm.tpl 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. {{- define "npm.workload" -}}
  2. workload:
  3. npm:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: false
  9. securityContext:
  10. fsGroup: 1000
  11. containers:
  12. npm:
  13. enabled: true
  14. primary: true
  15. imageSelector: image
  16. securityContext:
  17. runAsUser: 0
  18. runAsGroup: 0
  19. readOnlyRootFilesystem: false
  20. runAsNonRoot: false
  21. capabilities:
  22. add:
  23. # Needed for: s6-applyuidgid: fatal: unable to setuid: Operation not permitted
  24. - SETUID
  25. # Needed for: s6-applyuidgid: fatal: unable to set supplementary group list: Operation not permitted
  26. - SETGID
  27. # Needed for: Used in some s6-overlay startup scripts
  28. - CHOWN
  29. - DAC_OVERRIDE
  30. # Needed for: Nginx Service
  31. - FOWNER
  32. fixedEnv:
  33. # FIXME: Revisit once upstream irons out some issues in regarids with PUID.
  34. # Make sure 568 PUID works before exposing
  35. PUID: 1000
  36. env:
  37. DISABLE_IPV6: true
  38. DB_SQLITE_FILE: /data/database.sqlite
  39. {{ with .Values.npmConfig.additionalEnvs }}
  40. envList:
  41. {{ range $env := . }}
  42. - name: {{ $env.name }}
  43. value: {{ $env.value }}
  44. {{ end }}
  45. {{ end }}
  46. probes:
  47. liveness:
  48. enabled: true
  49. type: exec
  50. command: /bin/check-health
  51. readiness:
  52. enabled: true
  53. type: exec
  54. command: /bin/check-health
  55. startup:
  56. enabled: true
  57. type: exec
  58. command: /bin/check-health
  59. {{/* Service */}}
  60. service:
  61. npm:
  62. enabled: true
  63. primary: true
  64. type: NodePort
  65. targetSelector: npm
  66. ports:
  67. webui:
  68. enabled: true
  69. primary: true
  70. port: {{ .Values.npmNetwork.webPort }}
  71. nodePort: {{ .Values.npmNetwork.webPort }}
  72. targetPort: 81
  73. targetSelector: npm
  74. http:
  75. enabled: true
  76. port: {{ .Values.npmNetwork.httpPort }}
  77. nodePort: {{ .Values.npmNetwork.httpPort }}
  78. targetPort: 80
  79. targetSelector: npm
  80. https:
  81. enabled: true
  82. port: {{ .Values.npmNetwork.httpsPort }}
  83. nodePort: {{ .Values.npmNetwork.httpsPort }}
  84. targetPort: 443
  85. targetSelector: npm
  86. {{/* Persistence */}}
  87. persistence:
  88. data:
  89. enabled: true
  90. type: {{ .Values.npmStorage.data.type }}
  91. datasetName: {{ .Values.npmStorage.data.datasetName | default "" }}
  92. hostPath: {{ .Values.npmStorage.data.hostPath | default "" }}
  93. targetSelector:
  94. npm:
  95. npm:
  96. mountPath: /data
  97. certs:
  98. enabled: true
  99. type: {{ .Values.npmStorage.certs.type }}
  100. datasetName: {{ .Values.npmStorage.certs.datasetName | default "" }}
  101. hostPath: {{ .Values.npmStorage.certs.hostPath | default "" }}
  102. targetSelector:
  103. npm:
  104. npm:
  105. mountPath: /etc/letsencrypt
  106. {{- end -}}