@nathapp/na-cli 1.0.0-rc.4 → 1.0.0-rc.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/.gitlab-ci.yml +135 -0
  2. package/Makefile +16 -9
  3. package/README.md +18 -2
  4. package/alias-script.sh +30 -0
  5. package/dist/index.js +106 -128
  6. package/dist/index.js.map +1 -1
  7. package/dist/templates/db-schema/.gitignore-rename +1 -0
  8. package/dist/templates/db-schema/.gitlab-ci.yml +139 -0
  9. package/dist/templates/db-schema/001_Schema.sql +1 -0
  10. package/dist/templates/db-schema/DEV_MODE.txt +1 -0
  11. package/dist/templates/db-schema/Dockerfile +3 -0
  12. package/dist/templates/db-schema/Email-Templates/Individual/README.md +1 -0
  13. package/dist/templates/db-schema/GET_VERSION.sql +47 -0
  14. package/dist/templates/db-schema/Makefile +885 -0
  15. package/dist/templates/db-schema/README.md +117 -0
  16. package/dist/templates/db-schema/SET_VERSION.sql +5 -0
  17. package/dist/templates/db-schema/docker-compose.yaml +47 -0
  18. package/dist/templates/db-schema/package.json +3 -0
  19. package/dist/templates/db-schema/push.sh +0 -0
  20. package/dist/templates/db-schema/samples/899_DB_Grant_User.sql +9 -0
  21. package/dist/templates/db-schema/samples/990_SAMPLE_Init_Data.sql +27 -0
  22. package/dist/templates/k8s-deployment/.gitignore-rename +1 -0
  23. package/dist/templates/k8s-deployment/.gitlab-ci.yml +128 -0
  24. package/dist/templates/k8s-deployment/.helmignore +23 -0
  25. package/dist/templates/k8s-deployment/Chart.yaml +23 -0
  26. package/dist/templates/k8s-deployment/Makefile +196 -0
  27. package/dist/templates/k8s-deployment/README.md +32 -0
  28. package/dist/templates/k8s-deployment/resources/charts/mysql/Chart.yaml +23 -0
  29. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/Chart.yaml +23 -0
  30. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/script/Makefile +12 -0
  31. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/templates/_helpers.tpl +62 -0
  32. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/templates/configmap.yaml +1 -0
  33. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/templates/job.yaml +1 -0
  34. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/templates/secret.yaml +1 -0
  35. package/dist/templates/k8s-deployment/resources/charts/mysql/charts/mysql-install/values.yaml +51 -0
  36. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/_helpers.tpl +62 -0
  37. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/configmap.yaml +1 -0
  38. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/deployment.yaml +1 -0
  39. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/ingress.yaml +1 -0
  40. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/job.yaml +1 -0
  41. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/pv.yaml +1 -0
  42. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/pvc.yaml +1 -0
  43. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/sc.yaml +1 -0
  44. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/secret.yaml +1 -0
  45. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/service.yaml +1 -0
  46. package/dist/templates/k8s-deployment/resources/charts/mysql/templates/statefulset.yaml +1 -0
  47. package/dist/templates/k8s-deployment/resources/charts/mysql/values.yaml +15 -0
  48. package/dist/templates/k8s-deployment/resources/charts/redis/Chart.yaml +23 -0
  49. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/Chart.yaml +23 -0
  50. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/script/Makefile +8 -0
  51. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/templates/_helpers.tpl +62 -0
  52. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/templates/configmap.yaml +1 -0
  53. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/templates/job.yaml +1 -0
  54. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/templates/secret.yaml +1 -0
  55. package/dist/templates/k8s-deployment/resources/charts/redis/charts/redis-install/values.yaml +42 -0
  56. package/dist/templates/k8s-deployment/resources/charts/redis/templates/_helpers.tpl +62 -0
  57. package/dist/templates/k8s-deployment/resources/charts/redis/templates/configmap.yaml +1 -0
  58. package/dist/templates/k8s-deployment/resources/charts/redis/templates/deployment.yaml +1 -0
  59. package/dist/templates/k8s-deployment/resources/charts/redis/templates/ingress.yaml +1 -0
  60. package/dist/templates/k8s-deployment/resources/charts/redis/templates/job.yaml +1 -0
  61. package/dist/templates/k8s-deployment/resources/charts/redis/templates/pv.yaml +1 -0
  62. package/dist/templates/k8s-deployment/resources/charts/redis/templates/pvc.yaml +1 -0
  63. package/dist/templates/k8s-deployment/resources/charts/redis/templates/sc.yaml +1 -0
  64. package/dist/templates/k8s-deployment/resources/charts/redis/templates/secret.yaml +1 -0
  65. package/dist/templates/k8s-deployment/resources/charts/redis/templates/service.yaml +1 -0
  66. package/dist/templates/k8s-deployment/resources/charts/redis/templates/statefulset.yaml +1 -0
  67. package/dist/templates/k8s-deployment/resources/charts/redis/values.yaml +12 -0
  68. package/dist/templates/k8s-deployment/services/charts/hooks/Chart.yaml +23 -0
  69. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/Chart.yaml +23 -0
  70. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/Makefile +49 -0
  71. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/script/_env.yaml +2 -0
  72. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/templates/_helpers.tpl +62 -0
  73. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/templates/configmap.yaml +1 -0
  74. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/templates/job.yaml +1 -0
  75. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/templates/secret.yaml +1 -0
  76. package/dist/templates/k8s-deployment/services/charts/hooks/charts/pre-delete-rsc/values.yaml +36 -0
  77. package/dist/templates/k8s-deployment/services/charts/sample-nginx/Chart.yaml +23 -0
  78. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/_helpers.tpl +62 -0
  79. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/cluster-role-binding.yaml +1 -0
  80. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/configmap.yaml +1 -0
  81. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/cronjob.yaml +1 -0
  82. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/deployment.yaml +1 -0
  83. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/ingress.yaml +1 -0
  84. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/pv.yaml +1 -0
  85. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/pvc.yaml +1 -0
  86. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/sc.yaml +1 -0
  87. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/secret.yaml +1 -0
  88. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/service-account.yaml +1 -0
  89. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/service.yaml +1 -0
  90. package/dist/templates/k8s-deployment/services/charts/sample-nginx/templates/statefulset.yaml +1 -0
  91. package/dist/templates/k8s-deployment/services/charts/sample-nginx/values.yaml +47 -0
  92. package/dist/templates/k8s-deployment/services/charts/tests/Chart.yaml +23 -0
  93. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Chart.yaml +23 -0
  94. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/Makefile +9 -0
  95. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/fixtures/index.json +1 -0
  96. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/login/login-spec.js +47 -0
  97. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/login/loginEmailWrong-spec.js +14 -0
  98. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/login/loginPasswordWrong-spec.js +14 -0
  99. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/profile/updatePassword-spec.js +15 -0
  100. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/profile/updateProfile-spec.js +25 -0
  101. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/integration/test-script.spec.js +9 -0
  102. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/plugins/index.js +22 -0
  103. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/support/commands.js +258 -0
  104. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/support/index.js +35 -0
  105. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress/support/misc.js +8 -0
  106. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/cypress.json +4 -0
  107. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/templates/_helpers.tpl +62 -0
  108. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/templates/configmap.yaml +1 -0
  109. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/templates/pod.yaml +1 -0
  110. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/templates/secret.yaml +1 -0
  111. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-cypress/values.yaml +70 -0
  112. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/.helmignore +2 -0
  113. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/Chart.yaml +23 -0
  114. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/script/Makefile +14 -0
  115. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/templates/_helpers.tpl +62 -0
  116. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/templates/configmap.yaml +1 -0
  117. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/templates/pod.yaml +1 -0
  118. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/templates/secret.yaml +1 -0
  119. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/_t-0100-readiness-liveness.ts +84 -0
  120. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/hub.ts +372 -0
  121. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contact.ts +158 -0
  122. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-contract.ts +328 -0
  123. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-kyc.ts +304 -0
  124. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-app.ts +823 -0
  125. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-onboard-web.ts +493 -0
  126. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-profile.ts +277 -0
  127. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/individual-whitelist.ts +133 -0
  128. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/resources/live.jpg +0 -0
  129. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/resources/mykad_front.jpg +0 -0
  130. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/resources/profile.jpg +0 -0
  131. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/tests/t-0200-start.ts +172 -0
  132. package/dist/templates/k8s-deployment/services/charts/tests/charts/e2e-test-js/values.yaml +59 -0
  133. package/dist/templates/k8s-deployment/templates/_cluster-role-binding.tpl +20 -0
  134. package/dist/templates/k8s-deployment/templates/_configmap.tpl +37 -0
  135. package/dist/templates/k8s-deployment/templates/_cronjob.tpl +225 -0
  136. package/dist/templates/k8s-deployment/templates/_deployment.tpl +246 -0
  137. package/dist/templates/k8s-deployment/templates/_helpers.tpl +31 -0
  138. package/dist/templates/k8s-deployment/templates/_ingress.tpl +77 -0
  139. package/dist/templates/k8s-deployment/templates/_job.tpl +233 -0
  140. package/dist/templates/k8s-deployment/templates/_pod.tpl +214 -0
  141. package/dist/templates/k8s-deployment/templates/_pv.tpl +42 -0
  142. package/dist/templates/k8s-deployment/templates/_pvc.tpl +27 -0
  143. package/dist/templates/k8s-deployment/templates/_root.tpl +314 -0
  144. package/dist/templates/k8s-deployment/templates/_sc.tpl +19 -0
  145. package/dist/templates/k8s-deployment/templates/_secret.tpl +15 -0
  146. package/dist/templates/k8s-deployment/templates/_service-account.tpl +8 -0
  147. package/dist/templates/k8s-deployment/templates/_service.tpl +40 -0
  148. package/dist/templates/k8s-deployment/templates/_statefulset.tpl +244 -0
  149. package/dist/templates/k8s-deployment/templates/root-cm.yaml +10 -0
  150. package/dist/templates/k8s-deployment/templates/root-pull-secret.yaml +11 -0
  151. package/dist/templates/k8s-deployment/templates/root-secret.yaml +24 -0
  152. package/dist/templates/k8s-deployment/values.yaml +38 -0
  153. package/dist/templates/k8s-helm-chart/Chart.yaml +23 -0
  154. package/dist/templates/k8s-helm-chart/templates/_helpers.tpl +62 -0
  155. package/dist/templates/k8s-helm-chart/templates/cluster-role-binding.yaml +1 -0
  156. package/dist/templates/k8s-helm-chart/templates/configmap.yaml +1 -0
  157. package/dist/templates/k8s-helm-chart/templates/cronjob.yaml +1 -0
  158. package/dist/templates/k8s-helm-chart/templates/deployment.yaml +1 -0
  159. package/dist/templates/k8s-helm-chart/templates/ingress.yaml +1 -0
  160. package/dist/templates/k8s-helm-chart/templates/pv.yaml +1 -0
  161. package/dist/templates/k8s-helm-chart/templates/pvc.yaml +1 -0
  162. package/dist/templates/k8s-helm-chart/templates/sc.yaml +1 -0
  163. package/dist/templates/k8s-helm-chart/templates/secret.yaml +1 -0
  164. package/dist/templates/k8s-helm-chart/templates/service-account.yaml +1 -0
  165. package/dist/templates/k8s-helm-chart/templates/service.yaml +1 -0
  166. package/dist/templates/k8s-helm-chart/templates/statefulset.yaml +1 -0
  167. package/dist/templates/k8s-helm-chart/values.yaml +41 -0
  168. package/dist/templates/mxw-base-api-express/.dockerignore +2 -0
  169. package/dist/templates/mxw-base-api-express/.env +10 -0
  170. package/dist/templates/mxw-base-api-express/.gitignore-rename +3 -0
  171. package/dist/templates/mxw-base-api-express/.gitlab-ci.yml +174 -0
  172. package/dist/templates/mxw-base-api-express/.nvmrc +1 -0
  173. package/dist/templates/mxw-base-api-express/Dockerfile +14 -0
  174. package/dist/templates/mxw-base-api-express/Makefile +84 -0
  175. package/dist/templates/mxw-base-api-express/README.md +71 -0
  176. package/dist/templates/mxw-base-api-express/package.json +55 -0
  177. package/dist/templates/mxw-base-api-express/src/app-service.test.ts +94 -0
  178. package/dist/templates/mxw-base-api-express/src/app-service.ts +498 -0
  179. package/dist/templates/mxw-base-api-express/src/auth/auth-user.test.ts +215 -0
  180. package/dist/templates/mxw-base-api-express/src/auth/auth-user.ts +86 -0
  181. package/dist/templates/mxw-base-api-express/src/auth/auth.ts +81 -0
  182. package/dist/templates/mxw-base-api-express/src/core-service.ts +72 -0
  183. package/dist/templates/mxw-base-api-express/src/crud.ts +84 -0
  184. package/dist/templates/mxw-base-api-express/src/http-handler.ts +71 -0
  185. package/dist/templates/mxw-base-api-express/src/server.ts +54 -0
  186. package/dist/templates/mxw-base-api-express/src/test.ts +38 -0
  187. package/dist/templates/mxw-base-api-express/src/utils/api-utilities.ts +52 -0
  188. package/dist/templates/mxw-base-api-express/src/utils/file-utilities.ts +55 -0
  189. package/dist/templates/mxw-base-api-express/tsconfig.json +32 -0
  190. package/dist/templates/nestjs-api/.dockerignore +2 -0
  191. package/dist/templates/nestjs-api/.env +12 -0
  192. package/dist/templates/nestjs-api/.eslintrc.js +25 -0
  193. package/dist/templates/nestjs-api/.gitignore-rename +35 -0
  194. package/dist/templates/nestjs-api/.gitlab-ci.yml +174 -0
  195. package/dist/templates/nestjs-api/.nvmrc +1 -0
  196. package/dist/templates/nestjs-api/.prettierrc +4 -0
  197. package/dist/templates/nestjs-api/Dockerfile +19 -0
  198. package/dist/templates/nestjs-api/Makefile +84 -0
  199. package/dist/templates/nestjs-api/README.md +67 -0
  200. package/dist/templates/nestjs-api/nest-cli.json +8 -0
  201. package/dist/templates/nestjs-api/package.json +75 -0
  202. package/dist/templates/nestjs-api/src/app.controller.spec.ts +22 -0
  203. package/dist/templates/nestjs-api/src/app.controller.ts +27 -0
  204. package/dist/templates/nestjs-api/src/app.module.ts +10 -0
  205. package/dist/templates/nestjs-api/src/app.service.ts +12 -0
  206. package/dist/templates/nestjs-api/src/main.ts +31 -0
  207. package/dist/templates/nestjs-api/test/app.e2e-spec.ts +24 -0
  208. package/dist/templates/nestjs-api/test/jest-e2e.json +9 -0
  209. package/dist/templates/nestjs-api/tsconfig.build.json +4 -0
  210. package/dist/templates/nestjs-api/tsconfig.json +22 -0
  211. package/dist/templates/nestjs-library/.eslintrc.js +24 -0
  212. package/dist/templates/nestjs-library/.gitignore-rename +39 -0
  213. package/dist/templates/nestjs-library/.gitlab-ci.yml +135 -0
  214. package/dist/templates/nestjs-library/.npmignore-rename +30 -0
  215. package/dist/templates/nestjs-library/.prettierrc +6 -0
  216. package/dist/templates/nestjs-library/LICENSE +21 -0
  217. package/dist/templates/nestjs-library/Makefile +60 -0
  218. package/dist/templates/nestjs-library/README.md +3 -0
  219. package/dist/templates/nestjs-library/index.d.ts +1 -0
  220. package/dist/templates/nestjs-library/index.js +6 -0
  221. package/dist/templates/nestjs-library/index.ts +1 -0
  222. package/dist/templates/nestjs-library/lib/index.ts +2 -0
  223. package/dist/templates/nestjs-library/package.json +43 -0
  224. package/dist/templates/nestjs-library/tsconfig.build.json +4 -0
  225. package/dist/templates/nestjs-library/tsconfig.json +18 -0
  226. package/dist/templates/ts-library/.dockerignore +2 -0
  227. package/dist/templates/ts-library/.eslintrc.js +24 -0
  228. package/dist/templates/ts-library/.gitignore-rename +37 -0
  229. package/dist/templates/ts-library/.gitlab-ci.yml +135 -0
  230. package/dist/templates/ts-library/.npmignore-rename +30 -0
  231. package/dist/templates/ts-library/.prettierrc +6 -0
  232. package/dist/templates/ts-library/LICENSE +21 -0
  233. package/dist/templates/ts-library/Makefile +58 -0
  234. package/dist/templates/ts-library/README.md +1 -0
  235. package/dist/templates/ts-library/index.d.ts +1 -0
  236. package/dist/templates/ts-library/index.js +6 -0
  237. package/dist/templates/ts-library/index.ts +1 -0
  238. package/dist/templates/ts-library/lib/index.ts +1 -0
  239. package/dist/templates/ts-library/lib/samples/index.ts +5 -0
  240. package/dist/templates/ts-library/lib/samples/samples-function.ts +3 -0
  241. package/dist/templates/ts-library/package.json +34 -0
  242. package/dist/templates/ts-library/test/jest-e2e.json +9 -0
  243. package/dist/templates/ts-library/test/sample.e2e-spec.ts +10 -0
  244. package/dist/templates/ts-library/tsconfig.build.json +4 -0
  245. package/dist/templates/ts-library/tsconfig.json +18 -0
  246. package/dist/utils/env.js +146 -0
  247. package/dist/utils/env.js.map +1 -0
  248. package/dist/utils/template.js +362 -1
  249. package/dist/utils/template.js.map +1 -1
  250. package/package.json +9 -5
  251. package/src/index.ts +0 -182
  252. package/src/utils/template.ts +0 -9
@@ -0,0 +1,37 @@
1
+ {{- define "root.configmap" -}}
2
+ {{- if and .Values.enabled .Values.config -}}
3
+ apiVersion: v1
4
+ kind: ConfigMap
5
+ metadata:
6
+ name: {{ include (print $.Chart.Name ".fullname") . }}
7
+ data:
8
+ {{- with .Values.config }}
9
+ {{- range $key, $value := . }}
10
+ {{- if eq (typeOf $value) "string" }}
11
+ {{- $key | nindent 2 }}: {{ include "root.globalMap" (list $ $value) | quote }}
12
+ {{- end }}
13
+ {{- end }}
14
+ {{- end }}
15
+
16
+ {{- if .Values.configFiles -}}
17
+ {{- "---" | nindent 0 }}
18
+ {{- end }}
19
+ {{- end }}
20
+
21
+ {{- if and .Values.enabled .Values.configFiles -}}
22
+ {{- range .Values.configFiles }}
23
+ apiVersion: v1
24
+ kind: ConfigMap
25
+ metadata:
26
+ name: {{ include (print $.Chart.Name ".fullname") $ }}-{{ .name }}
27
+ data:
28
+ {{- range $key, $value := .files }}
29
+ {{- if eq (typeOf $value) "string" }}
30
+ {{- ($.Files.Glob $value).AsConfig | nindent 2 }}
31
+ {{- end }}
32
+ {{- end }}
33
+ {{- "---" | nindent 0 }}
34
+ {{- end }}
35
+ {{- end }}
36
+
37
+ {{- end }}
@@ -0,0 +1,225 @@
1
+ {{- define "root.cronjob" -}}
2
+ {{- if and .Values.enabled (.Values.kind | default "" | lower | eq "cronjob") -}}
3
+ {{- if semverCompare ">=1.25-0" .Capabilities.KubeVersion.GitVersion -}}
4
+ apiVersion: batch/v1
5
+ {{- else -}}
6
+ apiVersion: batch/v1beta1
7
+ {{- end }}
8
+ kind: CronJob
9
+ metadata:
10
+ name: {{ include (print $.Chart.Name ".fullname") . }}
11
+ {{- if .Values.annotations }}
12
+ {{- with .Values.annotations }}
13
+ annotations:
14
+ {{- toYaml . | nindent 4 }}
15
+ {{- end }}
16
+ {{- end }}
17
+ spec:
18
+ schedule: {{ .Values.schedule | quote }}
19
+ concurrencyPolicy: {{ .Values.concurrencyPolicy | default "Replace" }}
20
+ successfulJobsHistoryLimit: {{ .Values.successfulJobsHistoryLimit | default "1" }}
21
+ failedJobsHistoryLimit: {{ .Values.failedJobsHistoryLimit | default "5" }}
22
+ suspend: {{ .Values.suspend | default "false" }}
23
+ jobTemplate:
24
+ spec:
25
+ template:
26
+ metadata:
27
+ labels:
28
+ {{- include (print $.Chart.Name ".selectorLabels") . | nindent 12 }}
29
+ annotations:
30
+ {{- $dict := (dict "local" "") }}
31
+ {{- if .Values.secret }}
32
+ {{- $value := get $dict "local" }}
33
+ {{- $value := print $value (include (print $.Template.BasePath "/secret.yaml") .) | sha256sum }}
34
+ {{- $_ := set $dict "local" $value }}
35
+ {{- end }}
36
+ {{- if .Values.config }}
37
+ {{- $value := get $dict "local" }}
38
+ {{- $value := print $value (include (print $.Template.BasePath "/configmap.yaml") .) | sha256sum }}
39
+ {{- $_ := set $dict "local" $value }}
40
+ {{- end }}
41
+ kubernetes.io/change-cause: {{ get $dict "local" | sha256sum }}
42
+ spec:
43
+ {{- if and (hasKey .Values "serviceAccountName") }}
44
+ serviceAccountName: {{ include "root.globalMap" (list $ .Values.serviceAccountName) | default (include (print $.Chart.Name ".fullname") $) | quote }}
45
+ {{- end }}
46
+ {{- with .Values.imagePullSecrets }}
47
+ imagePullSecrets:
48
+ - name: {{ include "root.globalMap" (list $ .) | quote }}
49
+ {{- end }}
50
+ {{- if .Values.nodeSelector }}
51
+ {{- with .Values.nodeSelector }}
52
+ nodeSelector:
53
+ {{- toYaml . | nindent 12 }}
54
+ {{- end }}
55
+ {{- end }}
56
+ {{- if .Values.initContainers }}
57
+ {{- with .Values.initContainers }}
58
+ initContainers:
59
+ {{- toYaml . | nindent 12 }}
60
+ {{- end }}
61
+ {{- end }}
62
+ containers:
63
+ - name: {{ include (print $.Chart.Name ".fullname") . }}
64
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag | default $.Chart.AppVersion }}
65
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
66
+ {{- if .Values.resources }}
67
+ resources:
68
+ {{- toYaml .Values.resources | nindent 14 }}
69
+ {{- end }}
70
+ {{- if or .Values.script (or .Values.beforeScript .Values.afterScript) }}
71
+ command: ["/bin/sh"]
72
+ {{- $dict := (dict "key" "") -}}
73
+
74
+ {{- if .Values.beforeScript }}
75
+ {{- range .Values.beforeScript -}}
76
+ {{- if eq (typeOf .) "string" -}}
77
+ {{ $n := include "root.globalMap" (list $ .) }}
78
+ {{- $script := print (get $dict "key") $n ";" -}}
79
+ {{- $_ := set $dict "key" $script -}}
80
+ {{- end -}}
81
+ {{- end -}}
82
+ {{- end -}}
83
+
84
+ {{- if .Values.script }}
85
+ {{- range .Values.script -}}
86
+ {{- if eq (typeOf .) "string" -}}
87
+ {{ $n := include "root.globalMap" (list $ .) }}
88
+ {{- $script := print (get $dict "key") $n ";" -}}
89
+ {{- $_ := set $dict "key" $script -}}
90
+ {{- end -}}
91
+ {{- end -}}
92
+ {{- end -}}
93
+
94
+ {{- if .Values.afterScript }}
95
+ {{- range .Values.afterScript -}}
96
+ {{- if eq (typeOf .) "string" -}}
97
+ {{ $n := include "root.globalMap" (list $ .) }}
98
+ {{- $script := print (get $dict "key") $n ";" -}}
99
+ {{- $_ := set $dict "key" $script -}}
100
+ {{- end -}}
101
+ {{- end -}}
102
+ {{- end -}}
103
+
104
+ {{- $script := get $dict "key" -}}
105
+ {{- if not (empty $script) }}
106
+ args: ["-c", {{ print $script | quote }}]
107
+ {{- end }}
108
+ {{- else }}
109
+ {{- if .Values.command }}
110
+ command:
111
+ {{- toYaml .Values.command | nindent 14 }}
112
+ {{- end }}
113
+ {{- end }}
114
+ env:
115
+ {{- range $key, $value := .Values.secret }}
116
+ - name: {{ $key }}
117
+ valueFrom:
118
+ secretKeyRef:
119
+ {{- if eq (typeOf $value) "string" }}
120
+ name: {{ include (print $.Chart.Name ".fullname") $ }}
121
+ key: {{ $key }}
122
+ {{- else }}
123
+ name: {{ include "root.globalMap" (list $ .fromKeyRef) | trimSuffix "-" }}
124
+ {{- if .key }}
125
+ key: {{ .key }}
126
+ {{- else }}
127
+ key: {{ $key }}
128
+ {{- end }}
129
+ {{- end }}
130
+ {{- end }}
131
+ {{- range $key, $value := .Values.config }}
132
+ - name: {{ $key }}
133
+ valueFrom:
134
+ configMapKeyRef:
135
+ {{- if eq (typeOf $value) "string" }}
136
+ name: {{ include (print $.Chart.Name ".fullname") $ }}
137
+ key: {{ $key }}
138
+ {{- else }}
139
+ name: {{ include "root.globalMap" (list $ .fromKeyRef) | trimSuffix "-" }}
140
+ {{- if .key }}
141
+ key: {{ .key }}
142
+ {{- else }}
143
+ key: {{ $key }}
144
+ {{- end }}
145
+ {{- end }}
146
+ {{- end }}
147
+ {{- range $key, $value := .Values.env }}
148
+ - name: {{ $key }}
149
+ value: {{ include "root.globalMap" (list $ $value) | quote }}
150
+ {{- end }}
151
+ {{- if $.Values.volumeMounts }}
152
+ volumeMounts:
153
+ {{- range $.Values.volumeMounts }}
154
+ - name: {{ .name }}
155
+ {{- if .mountPath }}
156
+ mountPath: {{ include "root.globalMap" (list $ .mountPath) | quote }}
157
+ {{- end }}
158
+ {{- if .subPath }}
159
+ subPath: {{ include "root.globalMap" (list $ .subPath) | quote }}
160
+ {{- end }}
161
+ {{- if .readOnly }}
162
+ readOnly: {{ .readOnly }}
163
+ {{- end }}
164
+ {{- end }}
165
+ {{- end }}
166
+ restartPolicy: {{ .Values.restartPolicy | default "Never" }}
167
+ {{- if $.Values.volumes }}
168
+ volumes:
169
+ {{- range $.Values.volumes }}
170
+ {{- if .secret }}
171
+ - name: {{ .name }}
172
+ {{- with .secret }}
173
+ secret:
174
+ {{- if .defaultMode }}
175
+ defaultMode: {{ .defaultMode }}
176
+ {{- end }}
177
+ {{- if .items }}
178
+ items:
179
+ {{- range .items }}
180
+ - key: {{ .key }}
181
+ path: {{ .path }}
182
+ {{- end }}
183
+ {{- end }}
184
+ {{- if .secretName }}
185
+ secretName: {{ .secretName }}
186
+ {{- else }}
187
+ secretName: {{ include (print $.Chart.Name ".fullname") $ }}
188
+ {{- end }}
189
+ {{- end }}
190
+ {{- else if .configMap }}
191
+ - name: {{ .name }}
192
+ {{- with .configMap }}
193
+ configMap:
194
+ name: {{ include "root.globalMap" (list $ .name) | default (include (print $.Chart.Name ".fullname") $) | quote }}
195
+ {{- if .defaultMode }}
196
+ defaultMode: {{ .defaultMode }}
197
+ {{- end }}
198
+ {{- end }}
199
+ {{- else if .hostPath }}
200
+ - name: {{ .name }}
201
+ {{- with .hostPath }}
202
+ hostPath:
203
+ path: {{ include "root.globalMap" (list $ .path) }}
204
+ type: {{ .type }}
205
+ {{- end }}
206
+ {{- else if .nfs }}
207
+ - name: {{ .name }}
208
+ {{- with .nfs }}
209
+ nfs:
210
+ server: {{ include "root.globalMap" (list $ .server) }}
211
+ path: {{ include "root.globalMap" (list $ .path) }}
212
+ {{- end }}
213
+ {{- else if .persistentVolumeClaim }}
214
+ - name: {{ .name }}
215
+ {{- with .persistentVolumeClaim }}
216
+ persistentVolumeClaim:
217
+ claimName: {{ include (print $.Chart.Name ".fullname") $ }}-{{ .claimName }}
218
+ {{- end }}
219
+ {{- else }}
220
+ {{- toYaml . | nindent 12 }}
221
+ {{- end }}
222
+ {{- end }}
223
+ {{- end }}
224
+ {{- end }}
225
+ {{- end }}
@@ -0,0 +1,246 @@
1
+ {{- define "root.deployment" -}}
2
+ {{- if and .Values.enabled (.Values.kind | default "deployment" | lower | eq "deployment") -}}
3
+ apiVersion: apps/v1
4
+ kind: Deployment
5
+ metadata:
6
+ name: {{ include (print $.Chart.Name ".fullname") . }}
7
+ {{- if .Values.annotations }}
8
+ {{- with .Values.annotations }}
9
+ annotations:
10
+ {{- toYaml . | nindent 4 }}
11
+ {{- end }}
12
+ {{- end }}
13
+ spec:
14
+ replicas: {{ .Values.replicaCount }}
15
+ selector:
16
+ matchLabels:
17
+ {{- include (print $.Chart.Name ".selectorLabels") . | nindent 6 }}
18
+ strategy:
19
+ type: RollingUpdate
20
+ rollingUpdate:
21
+ maxSurge: 1
22
+ maxUnavailable: 0
23
+ minReadySeconds: 1
24
+ template:
25
+ metadata:
26
+ labels:
27
+ {{- include (print $.Chart.Name ".selectorLabels") . | nindent 8 }}
28
+ annotations:
29
+ {{- $dict := (dict "local" "") }}
30
+ {{- if .Values.secret }}
31
+ {{- $value := get $dict "local" }}
32
+ {{- $value := print $value (include (print $.Template.BasePath "/secret.yaml") .) | sha256sum }}
33
+ {{- $_ := set $dict "local" $value }}
34
+ {{- end }}
35
+ {{- if .Values.config }}
36
+ {{- $value := get $dict "local" }}
37
+ {{- $value := print $value (include (print $.Template.BasePath "/configmap.yaml") .) | sha256sum }}
38
+ {{- $_ := set $dict "local" $value }}
39
+ {{- end }}
40
+ kubernetes.io/change-cause: {{ get $dict "local" | sha256sum }}
41
+ spec:
42
+ {{- if .Values.securityContext }}
43
+ {{- with .Values.securityContext }}
44
+ securityContext:
45
+ {{- toYaml . | nindent 8 }}
46
+ {{- end }}
47
+ {{- end }}
48
+ {{- if and (hasKey .Values "serviceAccountName") }}
49
+ serviceAccountName: {{ include "root.globalMap" (list $ .Values.serviceAccountName) | default (include (print $.Chart.Name ".fullname") $) | quote }}
50
+ {{- end }}
51
+ {{- with .Values.imagePullSecrets }}
52
+ imagePullSecrets:
53
+ - name: {{ include "root.globalMap" (list $ .) | quote }}
54
+ {{- end }}
55
+ {{- if .Values.nodeSelector }}
56
+ {{- with .Values.nodeSelector }}
57
+ nodeSelector:
58
+ {{- toYaml . | nindent 8 }}
59
+ {{- end }}
60
+ {{- end }}
61
+ {{- if .Values.initContainers }}
62
+ {{- with .Values.initContainers }}
63
+ initContainers:
64
+ {{- toYaml . | nindent 8 }}
65
+ {{- end }}
66
+ {{- end }}
67
+ containers:
68
+ - name: {{ include (print $.Chart.Name ".fullname") . }}
69
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag | default $.Chart.AppVersion }}
70
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
71
+ {{- if .Values.resources }}
72
+ resources:
73
+ {{- toYaml .Values.resources | nindent 10 }}
74
+ {{- end }}
75
+ {{- if or .Values.script (or .Values.beforeScript .Values.afterScript) }}
76
+ command: ["/bin/sh"]
77
+ {{- $dict := (dict "key" "") -}}
78
+
79
+ {{- if .Values.beforeScript }}
80
+ {{- range .Values.beforeScript -}}
81
+ {{- if eq (typeOf .) "string" -}}
82
+ {{ $n := include "root.globalMap" (list $ .) }}
83
+ {{- $script := print (get $dict "key") $n ";" -}}
84
+ {{- $_ := set $dict "key" $script -}}
85
+ {{- end -}}
86
+ {{- end -}}
87
+ {{- end -}}
88
+
89
+ {{- if .Values.script }}
90
+ {{- range .Values.script -}}
91
+ {{- if eq (typeOf .) "string" -}}
92
+ {{ $n := include "root.globalMap" (list $ .) }}
93
+ {{- $script := print (get $dict "key") $n ";" -}}
94
+ {{- $_ := set $dict "key" $script -}}
95
+ {{- end -}}
96
+ {{- end -}}
97
+ {{- end -}}
98
+
99
+ {{- if .Values.afterScript }}
100
+ {{- range .Values.afterScript -}}
101
+ {{- if eq (typeOf .) "string" -}}
102
+ {{ $n := include "root.globalMap" (list $ .) }}
103
+ {{- $script := print (get $dict "key") $n ";" -}}
104
+ {{- $_ := set $dict "key" $script -}}
105
+ {{- end -}}
106
+ {{- end -}}
107
+ {{- end -}}
108
+
109
+ {{- $script := get $dict "key" -}}
110
+ {{- if not (empty $script) }}
111
+ args: ["-c", {{ print $script | quote }}]
112
+ {{- end }}
113
+ {{- else }}
114
+ {{- if .Values.command }}
115
+ command:
116
+ {{- toYaml .Values.command | nindent 10 }}
117
+ {{- end }}
118
+ {{- end }}
119
+ {{- if and (hasKey .Values "service") }}
120
+ {{- if .Values.service.ports }}
121
+ ports:
122
+ {{- range $.Values.service.ports }}
123
+ - containerPort: {{ .targetPort | default .port }}
124
+ {{- end }}
125
+ {{- end }}
126
+ {{- if .Values.service.port }}
127
+ ports:
128
+ - containerPort: {{ .Values.service.targetPort | default .Values.service.port | default "" }}
129
+ {{- end }}
130
+ {{- end }}
131
+ {{- if .Values.readinessProbe }}
132
+ readinessProbe:
133
+ {{- toYaml .Values.readinessProbe | nindent 10 }}
134
+ {{- end }}
135
+ {{- if .Values.livenessProbe }}
136
+ livenessProbe:
137
+ {{- toYaml .Values.livenessProbe | nindent 10 }}
138
+ {{- end }}
139
+ env:
140
+ {{- range $key, $value := .Values.secret }}
141
+ - name: {{ $key }}
142
+ valueFrom:
143
+ secretKeyRef:
144
+ {{- if eq (typeOf $value) "string" }}
145
+ name: {{ include (print $.Chart.Name ".fullname") $ }}
146
+ key: {{ $key }}
147
+ {{- else }}
148
+ name: {{ include "root.globalMap" (list $ .fromKeyRef) | trimSuffix "-" }}
149
+ {{- if .key }}
150
+ key: {{ .key }}
151
+ {{- else }}
152
+ key: {{ $key }}
153
+ {{- end }}
154
+ {{- end }}
155
+ {{- end }}
156
+ {{- range $key, $value := .Values.config }}
157
+ - name: {{ $key }}
158
+ valueFrom:
159
+ configMapKeyRef:
160
+ {{- if eq (typeOf $value) "string" }}
161
+ name: {{ include (print $.Chart.Name ".fullname") $ }}
162
+ key: {{ $key }}
163
+ {{- else }}
164
+ name: {{ include "root.globalMap" (list $ .fromKeyRef) | trimSuffix "-" }}
165
+ {{- if .key }}
166
+ key: {{ .key }}
167
+ {{- else }}
168
+ key: {{ $key }}
169
+ {{- end }}
170
+ {{- end }}
171
+ {{- end }}
172
+ {{- range $key, $value := .Values.env }}
173
+ - name: {{ $key }}
174
+ value: {{ include "root.globalMap" (list $ $value) | quote }}
175
+ {{- end }}
176
+ {{- if $.Values.volumeMounts }}
177
+ volumeMounts:
178
+ {{- range $.Values.volumeMounts }}
179
+ - name: {{ .name }}
180
+ {{- if .mountPath }}
181
+ mountPath: {{ include "root.globalMap" (list $ .mountPath) | quote }}
182
+ {{- end }}
183
+ {{- if .subPath }}
184
+ subPath: {{ include "root.globalMap" (list $ .subPath) | quote }}
185
+ {{- end }}
186
+ {{- if .readOnly }}
187
+ readOnly: {{ .readOnly }}
188
+ {{- end }}
189
+ {{- end }}
190
+ {{- end }}
191
+ {{- if $.Values.volumes }}
192
+ volumes:
193
+ {{- range $.Values.volumes }}
194
+ {{- if .secret }}
195
+ - name: {{ .name }}
196
+ {{- with .secret }}
197
+ secret:
198
+ {{- if .defaultMode }}
199
+ defaultMode: {{ .defaultMode }}
200
+ {{- end }}
201
+ {{- if .items }}
202
+ items:
203
+ {{- range .items }}
204
+ - key: {{ .key }}
205
+ path: {{ .path }}
206
+ {{- end }}
207
+ {{- end }}
208
+ {{- if .secretName }}
209
+ secretName: {{ .secretName }}
210
+ {{- else }}
211
+ secretName: {{ include (print $.Chart.Name ".fullname") $ }}
212
+ {{- end }}
213
+ {{- end }}
214
+ {{- else if .configMap }}
215
+ - name: {{ .name }}
216
+ {{- with .configMap }}
217
+ configMap:
218
+ name: {{ include "root.globalMap" (list $ .name) | default (include (print $.Chart.Name ".fullname") $) | quote }}
219
+ {{- end }}
220
+ {{- else if .hostPath }}
221
+ - name: {{ .name }}
222
+ {{- with .hostPath }}
223
+ hostPath:
224
+ path: {{ include "root.globalMap" (list $ .path) }}
225
+ type: {{ .type }}
226
+ {{- end }}
227
+ {{- else if .nfs }}
228
+ - name: {{ .name }}
229
+ {{- with .nfs }}
230
+ nfs:
231
+ server: {{ include "root.globalMap" (list $ .server) }}
232
+ path: {{ include "root.globalMap" (list $ .path) }}
233
+ {{- end }}
234
+ {{- else if .persistentVolumeClaim }}
235
+ - name: {{ .name }}
236
+ {{- with .persistentVolumeClaim }}
237
+ persistentVolumeClaim:
238
+ claimName: {{ include (print $.Chart.Name ".fullname") $ }}-{{ .claimName }}
239
+ {{- end }}
240
+ {{- else }}
241
+ {{- toYaml . | nindent 8 }}
242
+ {{- end }}
243
+ {{- end }}
244
+ {{- end }}
245
+ {{- end }}
246
+ {{- end }}
@@ -0,0 +1,31 @@
1
+ {{/*
2
+ Expand the name of the chart.
3
+ */}}
4
+ {{- define "chart.name" -}}
5
+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6
+ {{- end }}
7
+
8
+ {{/*
9
+ Create a default fully qualified app name.
10
+ We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11
+ If release name contains chart name it will be used as a full name.
12
+ */}}
13
+ {{- define "chart.fullname" -}}
14
+ {{- if .Values.fullnameOverride }}
15
+ {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16
+ {{- else }}
17
+ {{- $name := default .Chart.Name .Values.nameOverride }}
18
+ {{- if contains $name .Release.Name }}
19
+ {{- .Release.Name | trunc 63 | trimSuffix "-" }}
20
+ {{- else }}
21
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22
+ {{- end }}
23
+ {{- end }}
24
+ {{- end }}
25
+
26
+ {{/*
27
+ Create chart name and version as used by the chart label.
28
+ */}}
29
+ {{- define "chart.chart" -}}
30
+ {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31
+ {{- end }}
@@ -0,0 +1,77 @@
1
+ {{- define "root.ingress" -}}
2
+ {{- if and .Values.enabled .Values.ingress -}}
3
+ {{- $fullName := include (print $.Chart.Name ".fullname") . -}}
4
+ {{- $svcPort := .Values.service.port -}}
5
+ {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
6
+ apiVersion: networking.k8s.io/v1
7
+ {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
8
+ apiVersion: networking.k8s.io/v1beta1
9
+ {{- else -}}
10
+ apiVersion: extensions/v1beta1
11
+ {{- end }}
12
+ kind: Ingress
13
+ metadata:
14
+ name: {{ $fullName }}
15
+ labels:
16
+ {{- include (print $.Chart.Name ".labels") . | nindent 4 }}
17
+ {{- with .Values.ingress.annotations }}
18
+ annotations:
19
+ {{- toYaml . | nindent 4 }}
20
+ {{- end }}
21
+ spec:
22
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
23
+ ingressClassName: {{ .Values.ingress.className }}
24
+ {{- end }}
25
+ {{- if .Values.ingress.tls }}
26
+ tls:
27
+ {{- range .Values.ingress.tls }}
28
+ - hosts:
29
+ {{- range .hosts }}
30
+ - {{ include "root.global" (list $ .) | quote }}
31
+ {{- end }}
32
+ secretName: {{ include "root.global" (list $ .secretName) | quote }}
33
+ {{- end }}
34
+ {{- end }}
35
+ rules:
36
+ {{- range .Values.ingress.hosts }}
37
+ - host: {{ include "root.global" (list $ .host) | quote }}
38
+ http:
39
+ paths:
40
+ {{- range .excludes }}
41
+ - path: {{ include "root.global" (list $ .path) | lower }}
42
+ {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
43
+ pathType: {{ include "root.global" (list $ .pathType) | default "Prefix" }}
44
+ {{- end }}
45
+ backend:
46
+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
47
+ service:
48
+ name: default-http-backend
49
+ port:
50
+ number: 8080
51
+ {{- else }}
52
+ serviceName: default-http-backend
53
+ servicePort: 8080
54
+ {{- end }}
55
+ {{- end }}
56
+ {{- range .paths }}
57
+ - path: {{ include "root.global" (list $ .path) | lower }}
58
+ {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
59
+ pathType: {{ include "root.global" (list $ .pathType) | default "Prefix" }}
60
+ {{- end }}
61
+ backend:
62
+ {{- $backend := .backend | default dict }}
63
+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
64
+ {{- $services := $backend.service | default dict }}
65
+ service:
66
+ name: {{ include "root.global" (list $ $services.name) | default $fullName }}
67
+ port:
68
+ {{- $servicesPort := $services.port | default dict }}
69
+ number: {{ include "root.global" (list $ $servicesPort.number) | default $svcPort }}
70
+ {{- else }}
71
+ serviceName: {{ $backend.serviceName | default $fullName }}
72
+ servicePort: {{ $backend.servicePort | default $svcPort }}
73
+ {{- end }}
74
+ {{- end }}
75
+ {{- end }}
76
+ {{- end }}
77
+ {{- end }}