@opencrvs/toolkit 2.2.0-rc.ab91cce → 2.2.0-rc.e6591c5

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/build.sh +17 -14
  2. package/dist/application-config/index.js +57 -14
  3. package/dist/authentication/index.d.ts +2 -1
  4. package/dist/authentication/index.js +34 -14
  5. package/dist/cli.js +2631 -377
  6. package/dist/commons/api/router.d.ts +1564 -248
  7. package/dist/commons/application-config/index.d.ts +3 -3
  8. package/dist/commons/conditionals/conditionals.d.ts +7 -7
  9. package/dist/commons/conditionals/index.d.ts +1 -0
  10. package/dist/commons/conditionals/validate.d.ts +6 -1
  11. package/dist/commons/events/ActionConfig.d.ts +68 -21
  12. package/dist/commons/events/ActionDocument.d.ts +89 -0
  13. package/dist/commons/events/ActionInput.d.ts +56 -4
  14. package/dist/commons/events/ActionStatus.d.ts +2 -2
  15. package/dist/commons/events/ActionType.d.ts +13 -1
  16. package/dist/commons/events/AdvancedSearchConfig.d.ts +15 -0
  17. package/dist/commons/events/AuditLog.d.ts +4 -0
  18. package/dist/commons/events/CompositeFieldValue.d.ts +5 -1
  19. package/dist/commons/events/CountryConfigQueryInput.d.ts +192 -18
  20. package/dist/commons/events/Draft.d.ts +36 -1
  21. package/dist/commons/events/EventConfig.d.ts +448 -1
  22. package/dist/commons/events/EventDocument.d.ts +90 -0
  23. package/dist/commons/events/EventIndex.d.ts +44 -6
  24. package/dist/commons/events/EventInput.d.ts +1 -0
  25. package/dist/commons/events/EventMetadata.d.ts +24 -1
  26. package/dist/commons/events/EventStatus.d.ts +1 -0
  27. package/dist/commons/events/FieldConfig.d.ts +11 -1
  28. package/dist/commons/events/FieldTypeMapping.d.ts +17 -17
  29. package/dist/commons/events/Flag.d.ts +1 -7
  30. package/dist/commons/events/PlainDate.d.ts +6 -0
  31. package/dist/commons/events/WorkqueueConfig.d.ts +224 -33
  32. package/dist/commons/events/defineConfig.d.ts +7 -2
  33. package/dist/commons/events/event.d.ts +4 -1
  34. package/dist/commons/events/eventConfigValidation.d.ts +9 -0
  35. package/dist/commons/events/field.d.ts +5 -0
  36. package/dist/commons/events/index.d.ts +3 -0
  37. package/dist/commons/events/locations.d.ts +1 -1
  38. package/dist/commons/events/scopes.d.ts +4 -1
  39. package/dist/commons/events/state/flags.d.ts +1 -1
  40. package/dist/commons/events/state/index.d.ts +11 -2
  41. package/dist/commons/events/state/utils.d.ts +11 -1
  42. package/dist/commons/events/test.utils.d.ts +85 -8
  43. package/dist/commons/events/toNotificationForm.d.ts +17 -0
  44. package/dist/commons/events/utils.d.ts +88 -8
  45. package/dist/commons/users/Role.d.ts +23 -0
  46. package/dist/commons/users/User.d.ts +263 -0
  47. package/dist/commons/users/authentication.d.ts +67 -0
  48. package/dist/commons/users/index.d.ts +5 -0
  49. package/dist/commons/users/roleValidations.d.ts +15 -0
  50. package/dist/commons/users/scopes.d.ts +1402 -0
  51. package/dist/commons/users/userReferences.d.ts +176 -0
  52. package/dist/conditionals/index.js +19 -7
  53. package/dist/configurator/index.d.ts +24 -0
  54. package/dist/configurator/index.d.ts.map +1 -0
  55. package/dist/configurator/index.js +161 -0
  56. package/dist/configurator/layout.d.ts +29 -0
  57. package/dist/configurator/layout.d.ts.map +1 -0
  58. package/dist/configurator/layout.js +78 -0
  59. package/dist/configurator/paths.d.ts +13 -0
  60. package/dist/configurator/paths.d.ts.map +1 -0
  61. package/dist/configurator/paths.js +48 -0
  62. package/dist/configurator/server/environments.d.ts +20 -0
  63. package/dist/configurator/server/environments.d.ts.map +1 -0
  64. package/dist/configurator/server/environments.js +143 -0
  65. package/dist/configurator/server/files.d.ts +11 -0
  66. package/dist/configurator/server/files.d.ts.map +1 -0
  67. package/dist/configurator/server/files.js +67 -0
  68. package/dist/configurator/server/github.d.ts +56 -0
  69. package/dist/configurator/server/github.d.ts.map +1 -0
  70. package/dist/configurator/server/github.js +239 -0
  71. package/dist/configurator/server/plugin.d.ts +39 -0
  72. package/dist/configurator/server/plugin.d.ts.map +1 -0
  73. package/dist/configurator/server/plugin.js +298 -0
  74. package/dist/configurator/server/seal.d.ts +2 -0
  75. package/dist/configurator/server/seal.d.ts.map +1 -0
  76. package/dist/configurator/server/seal.js +36 -0
  77. package/dist/configurator/server/sshKeys.d.ts +5 -0
  78. package/dist/configurator/server/sshKeys.d.ts.map +1 -0
  79. package/dist/configurator/server/sshKeys.js +28 -0
  80. package/dist/configurator/server/start.d.ts +12 -0
  81. package/dist/configurator/server/start.d.ts.map +1 -0
  82. package/dist/configurator/server/start.js +91 -0
  83. package/dist/configurator/testing.d.ts +11 -0
  84. package/dist/configurator/testing.d.ts.map +1 -0
  85. package/dist/configurator/testing.js +74 -0
  86. package/dist/configurator/ui/bindings/bindings.d.ts +35 -0
  87. package/dist/configurator/ui/bindings/bindings.d.ts.map +1 -0
  88. package/dist/configurator/ui/bindings/bindings.js +5 -0
  89. package/dist/configurator/ui/bindings/parsers.d.ts +7 -0
  90. package/dist/configurator/ui/bindings/parsers.d.ts.map +1 -0
  91. package/dist/configurator/ui/bindings/parsers.js +85 -0
  92. package/dist/configurator/ui/form/users.d.ts +11 -0
  93. package/dist/configurator/ui/form/users.d.ts.map +1 -0
  94. package/dist/configurator/ui/form/users.js +33 -0
  95. package/dist/configurator/ui/plan/dependencyHosts.d.ts +2 -0
  96. package/dist/configurator/ui/plan/dependencyHosts.d.ts.map +1 -0
  97. package/dist/configurator/ui/plan/dependencyHosts.js +36 -0
  98. package/dist/configurator/ui/plan/templateValues.d.ts +11 -0
  99. package/dist/configurator/ui/plan/templateValues.d.ts.map +1 -0
  100. package/dist/configurator/ui/plan/templateValues.js +70 -0
  101. package/dist/configurator/workflows.d.ts +54 -0
  102. package/dist/configurator/workflows.d.ts.map +1 -0
  103. package/dist/configurator/workflows.js +161 -0
  104. package/dist/configurator-assets/forms/bindings.yml +265 -0
  105. package/dist/configurator-assets/templates/README.md +18 -0
  106. package/dist/configurator-assets/templates/charts-values/dependencies/values.override.yaml +4 -0
  107. package/dist/configurator-assets/templates/charts-values/dependencies/values.yaml +96 -0
  108. package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  109. package/dist/configurator-assets/templates/charts-values/opencrvs-services/values.yaml +83 -0
  110. package/dist/configurator-assets/templates/charts-values/opentelemetry/values.yaml +102 -0
  111. package/dist/configurator-assets/templates/charts-values/traefik/values.override.yaml +4 -0
  112. package/dist/configurator-assets/templates/charts-values/traefik/values.yaml +130 -0
  113. package/dist/configurator-assets/templates/inventory/inventory.template.yml +98 -0
  114. package/dist/configurator-assets/ui/apple-touch-icon.png +0 -0
  115. package/dist/configurator-assets/ui/assets/index-CaqYFJUk.css +6 -0
  116. package/dist/configurator-assets/ui/assets/index-DU1Y6E0b.js +169 -0
  117. package/dist/configurator-assets/ui/assets/opencrvs-logo-sIjz08HT.svg +1 -0
  118. package/dist/configurator-assets/ui/assets/poppins-400-BwTUGeWf.woff2 +0 -0
  119. package/dist/configurator-assets/ui/assets/poppins-500-CWICHMj6.woff2 +0 -0
  120. package/dist/configurator-assets/ui/assets/poppins-600-DJVo7c07.woff2 +0 -0
  121. package/dist/configurator-assets/ui/assets/poppins-700-g9MkRaG0.woff2 +0 -0
  122. package/dist/configurator-assets/ui/favicon-32x32.png +0 -0
  123. package/dist/configurator-assets/ui/index.html +25 -0
  124. package/dist/environment/custom-types.d.ts +1 -0
  125. package/dist/environment/custom-types.d.ts.map +1 -1
  126. package/dist/environment/derived-variables.d.ts +18 -4
  127. package/dist/environment/derived-variables.d.ts.map +1 -1
  128. package/dist/environment/derived-variables.js +20 -4
  129. package/dist/environment/questions.d.ts +42 -9
  130. package/dist/environment/questions.d.ts.map +1 -1
  131. package/dist/environment/questions.js +71 -48
  132. package/dist/environment/registry.d.ts +15 -0
  133. package/dist/environment/registry.d.ts.map +1 -0
  134. package/dist/environment/registry.js +112 -0
  135. package/dist/environment/setup-environment.d.ts.map +1 -1
  136. package/dist/environment/setup-environment.js +145 -25
  137. package/dist/environment/templates.d.ts.map +1 -1
  138. package/dist/events/index.js +957 -215
  139. package/dist/migrations/add-notify-config.d.ts +40 -0
  140. package/dist/migrations/add-notify-config.d.ts.map +1 -0
  141. package/dist/migrations/add-notify-config.js +249 -0
  142. package/dist/migrations/index.d.ts +9 -0
  143. package/dist/migrations/index.d.ts.map +1 -0
  144. package/dist/migrations/index.js +1306 -0
  145. package/dist/migrations/move-declaration-to-declare-action.d.ts +38 -0
  146. package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -0
  147. package/dist/migrations/move-declaration-to-declare-action.js +260 -0
  148. package/dist/migrations/{add-translations.d.ts → persistent/add-translations.d.ts} +1 -1
  149. package/dist/migrations/persistent/add-translations.d.ts.map +1 -0
  150. package/dist/migrations/{add-translations.js → persistent/add-translations.js} +2 -2
  151. package/dist/migrations/persistent/check-upgrade-path.d.ts +36 -0
  152. package/dist/migrations/persistent/check-upgrade-path.d.ts.map +1 -0
  153. package/dist/migrations/persistent/check-upgrade-path.js +105 -0
  154. package/dist/migrations/persistent/update-toolkit-dependency.d.ts +7 -0
  155. package/dist/migrations/persistent/update-toolkit-dependency.d.ts.map +1 -0
  156. package/dist/migrations/persistent/update-toolkit-dependency.js +77 -0
  157. package/dist/migrations/{v2.2/read-declaration-through-helper.d.ts → read-declaration-through-helper.d.ts} +1 -1
  158. package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -0
  159. package/dist/migrations/{v2.2/read-declaration-through-helper.js → read-declaration-through-helper.js} +4 -62
  160. package/dist/migrations/replace-incomplete-flag.d.ts +26 -0
  161. package/dist/migrations/replace-incomplete-flag.d.ts.map +1 -0
  162. package/dist/migrations/replace-incomplete-flag.js +126 -0
  163. package/dist/migrations/resolve-versioned-event-config.d.ts +56 -0
  164. package/dist/migrations/resolve-versioned-event-config.d.ts.map +1 -0
  165. package/dist/migrations/resolve-versioned-event-config.js +353 -0
  166. package/dist/migrations/utils.d.ts +61 -0
  167. package/dist/migrations/utils.d.ts.map +1 -0
  168. package/dist/migrations/utils.js +218 -0
  169. package/dist/notification/index.js +810 -84
  170. package/dist/roles/index.d.ts +2 -0
  171. package/dist/roles/index.d.ts.map +1 -0
  172. package/dist/roles/index.js +730 -0
  173. package/dist/scopes/index.d.ts +83 -100
  174. package/dist/scopes/index.js +29 -13
  175. package/dist/templates/charts-values/dependencies/values.yaml +5 -2
  176. package/dist/templates/charts-values/opencrvs-services/values.yaml +5 -7
  177. package/dist/templates/charts-values/traefik/values.yaml +2 -0
  178. package/dist/verify/endpoints.d.ts +11 -0
  179. package/dist/verify/endpoints.d.ts.map +1 -1
  180. package/dist/verify/endpoints.js +21 -27
  181. package/opencrvs-toolkit-2.2.0-rc.e6591c5.tgz +0 -0
  182. package/package.json +17 -4
  183. package/tsconfig.build.json +11 -1
  184. package/tsconfig.build.tsbuildinfo +1 -1
  185. package/tsconfig.json +15 -6
  186. package/dist/migrations/add-translations.d.ts.map +0 -1
  187. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +0 -3
  188. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +0 -1
  189. package/dist/migrations/v2.1/add-explicit-correction-flags.js +0 -234
  190. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +0 -3
  191. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +0 -1
  192. package/dist/migrations/v2.1/add-recovery-link-notifications.js +0 -511
  193. package/dist/migrations/v2.1/enable-telemetry.d.ts +0 -3
  194. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +0 -1
  195. package/dist/migrations/v2.1/enable-telemetry.js +0 -455
  196. package/dist/migrations/v2.1/index.d.ts +0 -6
  197. package/dist/migrations/v2.1/index.d.ts.map +0 -1
  198. package/dist/migrations/v2.1/index.js +0 -50
  199. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +0 -17
  200. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +0 -1
  201. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +0 -348
  202. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +0 -2
  203. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +0 -1
  204. package/dist/migrations/v2.1/remove-metabase-package-installs.js +0 -161
  205. package/dist/migrations/v2.1/remove-sentry.d.ts +0 -3
  206. package/dist/migrations/v2.1/remove-sentry.d.ts.map +0 -1
  207. package/dist/migrations/v2.1/remove-sentry.js +0 -354
  208. package/dist/migrations/v2.1/rename-trigger-paths.d.ts +0 -3
  209. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +0 -1
  210. package/dist/migrations/v2.1/rename-trigger-paths.js +0 -216
  211. package/dist/migrations/v2.1/template-files.d.ts +0 -8
  212. package/dist/migrations/v2.1/template-files.d.ts.map +0 -1
  213. package/dist/migrations/v2.1/template-files.js +0 -49
  214. package/dist/migrations/v2.1/upgrade-tilt.d.ts +0 -11
  215. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +0 -1
  216. package/dist/migrations/v2.1/upgrade-tilt.js +0 -139
  217. package/dist/migrations/v2.2/index.d.ts +0 -6
  218. package/dist/migrations/v2.2/index.d.ts.map +0 -1
  219. package/dist/migrations/v2.2/index.js +0 -456
  220. package/dist/migrations/v2.2/read-declaration-through-helper.d.ts.map +0 -1
  221. package/dist/templates/countryconfig-template/.tiltignore +0 -1
  222. package/dist/templates/countryconfig-template/Dockerfile.assets +0 -7
  223. package/dist/templates/countryconfig-template/Tiltfile +0 -112
  224. package/dist/templates/countryconfig-template/assets/README.md +0 -1
  225. package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +0 -61
  226. package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +0 -455
  227. package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +0 -168
  228. package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +0 -67
  229. package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +0 -168
  230. package/dist/templates/countryconfig-template/assets/metabase/README.md +0 -34
  231. package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +0 -36
  232. package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +0 -46
  233. package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +0 -27737
  234. package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +0 -21
  235. package/dist/templates/countryconfig-template/assets/metabase/package.json +0 -13
  236. package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +0 -108
  237. package/dist/templates/countryconfig-template/assets/metabase/run.sh +0 -120
  238. package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +0 -40
  239. package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +0 -135
  240. package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +0 -108
  241. package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +0 -50
  242. package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +0 -35
  243. package/dist/templates/countryconfig-template/tilt/common.tilt +0 -145
  244. package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +0 -15
  245. package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +0 -56
  246. package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +0 -21
  247. package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +0 -38
  248. package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +0 -17
  249. package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +0 -16
  250. package/dist/templates/countryconfig-template/tilt/lib.tilt +0 -95
  251. package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +0 -136
  252. package/opencrvs-toolkit-2.2.0-rc.ab91cce.tgz +0 -0
@@ -0,0 +1,265 @@
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
+ #
5
+ # OpenCRVS is also distributed under the terms of the Civil Registration
6
+ # & Healthcare Disclaimer located at http://opencrvs.org/license.
7
+ #
8
+ # Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
9
+ # Which stored values feed which form question.
10
+ #
11
+ # github: a GitHub environment/repository variable or secret. The name defaults to the
12
+ # question name (the form uses the real variable names). Secrets can only be read
13
+ # by name, never by value, so a secret only marks a question as "defined".
14
+ # file: a variable of a template under templates/. scripts/check-bindings.ts finds where
15
+ # the template puts that variable in the rendered file; nothing here is a path.
16
+ #
17
+ # A question may list several targets. `precedence` decides which source wins when more
18
+ # than one has a value (first listed wins); a binding can override it with its own.
19
+ # `parse` names a conversion from src/bindings/parsers.ts.
20
+
21
+ precedence: [github, file]
22
+
23
+ # Template -> file inside environments/<name>/ (as written by `yarn environment:init`).
24
+ files:
25
+ inventory/inventory.template.yml: inventory.yml
26
+ charts-values/dependencies/values.yaml: dependencies/values.yaml
27
+ charts-values/traefik/values.yaml: traefik/values.yaml
28
+ charts-values/opencrvs-services/values.yaml: opencrvs-services/values.yaml
29
+
30
+ # In the flat layout (environments/<name>.yaml) an environment is a single file. This is the
31
+ # rendered file that file holds, both when it is read and when it is written; the other files
32
+ # have no place there and are not written.
33
+ flat: inventory.yml
34
+
35
+ # Template variables that no question feeds. When a template is rendered every variable needs
36
+ # a source: a question (below), a default from here, or a derived value (src/plan/templateValues.ts).
37
+ # Defaults are the CLI's; the form does not ask about them yet. `npm run check` fails if a
38
+ # variable of a template has none of the three.
39
+ #
40
+ # A host or endpoint question is not listed here even when it is hidden (a built-in component): a question that
41
+ # has an address in DEFAULT_HOSTS (src/plan/dependencyHosts.ts) gives it to every template variable it feeds
42
+ # below, whenever it has no answer.
43
+ templates:
44
+ inventory/inventory.template.yml:
45
+ derived: [single_node]
46
+ charts-values/dependencies/values.yaml:
47
+ defaults:
48
+ monitoring_enabled: true
49
+ s3_migrate_from_minio_to_rustfs: false
50
+ # The "Use built-in component" checkboxes; a dependency is deployed unless the form says it is not.
51
+ rustfs_enabled: true
52
+ elasticsearch_enabled: true
53
+ postgres_enabled: true
54
+ redis_enabled: true
55
+ derived: [env, backup_enabled, restore_enabled]
56
+ charts-values/traefik/values.yaml:
57
+ # `env` is in the tracing block, which is only there while monitoring is on. That block cannot be read
58
+ # back, so the monitoring question reaches this file as a derived value.
59
+ derived: [env, monitoring_enabled, lets_encrypt, static_ssl]
60
+ charts-values/opencrvs-services/values.yaml:
61
+ derived: [env, opencrvs_environment, restore_enabled]
62
+
63
+ # Questions that hold no stored value of their own.
64
+ ignore:
65
+ ENVIRONMENT_NAME: the environment being edited, chosen on the first page
66
+ CONFIGURE_EMAIL: page switch, inferred from the SMTP secrets that exist
67
+ CONFIGURE_INFRASTRUCTURE: page switch, inferred from the infrastructure values that exist
68
+ USE_SENTRY: checkbox, inferred from the SENTRY_DSN secret
69
+ USE_BUILTIN_OTEL_COLLECTOR: checkbox, inferred from OTEL_COLLECTOR_ENDPOINT (the opentelemetry chart is not written yet)
70
+ ENABLE_ENCRYPTION: inferred from ENCRYPTION_KEY and DISK_SPACE, which only exist for an encrypted disk
71
+ BACKUP_OR_RESTORE: inferred from BACKUP_HOST and RESTORE_HOST
72
+ GENERATE_BACKUP_SSH_KEYS: asks for a new SSH key pair; the backup secrets (BACKUP_HOST_PRIVATE_KEY, BACKUP_HOST_PUBLIC_KEY, BACKUP_ENCRYPTION_PASSPHRASE) have no question (src/plan/backupSecrets.ts)
73
+ USERS_WITHOUT_KEYS_WARNING: warning text
74
+ USERS_HELP: help text on the SSH users page
75
+
76
+ bindings:
77
+ # Environment
78
+ DOMAIN:
79
+ targets:
80
+ - { source: github, kind: variable, scope: environment }
81
+ ACTIVATE_USERS:
82
+ targets:
83
+ - { source: github, kind: variable, scope: environment, parse: boolean }
84
+ ENVIRONMENT_TYPE:
85
+ targets:
86
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: environment_type }
87
+ TWO_FA_ENABLED:
88
+ targets:
89
+ - { source: github, kind: variable, scope: environment, parse: boolean }
90
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: two_fa_enabled, parse: boolean }
91
+ APPROVAL_REQUIRED:
92
+ targets:
93
+ - { source: github, kind: variable, scope: environment, parse: boolean }
94
+ APPROVERS:
95
+ targets:
96
+ - { source: github, kind: variable, scope: repository }
97
+
98
+ # Container registry (repository level; the old DOCKER* names still count)
99
+ REGISTRY_HOST:
100
+ targets:
101
+ - { source: github, kind: variable, scope: repository }
102
+ REGISTRY_ORGANISATION:
103
+ targets:
104
+ - { source: github, kind: secret, scope: repository, legacy: [DOCKERHUB_ACCOUNT] }
105
+ REGISTRY_REPOSITORY:
106
+ targets:
107
+ - { source: github, kind: secret, scope: repository, legacy: [DOCKERHUB_REPO] }
108
+ REGISTRY_USERNAME:
109
+ targets:
110
+ - { source: github, kind: secret, scope: repository, legacy: [DOCKER_USERNAME] }
111
+ REGISTRY_TOKEN:
112
+ targets:
113
+ - { source: github, kind: secret, scope: repository, legacy: [DOCKER_TOKEN] }
114
+
115
+ # Email (all secrets)
116
+ SMTP_HOST:
117
+ targets: [{ source: github, kind: secret, scope: environment }]
118
+ SMTP_PORT:
119
+ targets: [{ source: github, kind: secret, scope: environment }]
120
+ SMTP_USERNAME:
121
+ targets: [{ source: github, kind: secret, scope: environment }]
122
+ SMTP_PASSWORD:
123
+ targets: [{ source: github, kind: secret, scope: environment }]
124
+ SMTP_SECURE:
125
+ targets: [{ source: github, kind: secret, scope: environment }]
126
+ SENDER_EMAIL_ADDRESS:
127
+ targets: [{ source: github, kind: secret, scope: environment }]
128
+ ALERT_EMAIL:
129
+ targets: [{ source: github, kind: secret, scope: environment }]
130
+
131
+ # Kubernetes
132
+ KUBE_MASTER_NODE:
133
+ targets:
134
+ - { source: github, kind: variable, scope: environment }
135
+ KUBE_API_HOST:
136
+ targets:
137
+ - { source: github, kind: variable, scope: environment }
138
+ - { source: file, template: inventory/inventory.template.yml, var: kube_api_host }
139
+ KUBE_API_ALLOWED_CIDRS:
140
+ targets:
141
+ - { source: github, kind: variable, scope: environment }
142
+ WORKER_NODES:
143
+ targets:
144
+ - { source: github, kind: variable, scope: environment, name: KUBE_WORKER_NODES, parse: csv-to-ip-rows }
145
+ - { source: file, template: inventory/inventory.template.yml, var: kube_worker_nodes, parse: ip-rows }
146
+
147
+ # SSH users live in the inventory only
148
+ USERS:
149
+ targets:
150
+ - { source: file, template: inventory/inventory.template.yml, var: users.name, collect: container, parse: users }
151
+
152
+ # Backup: one value, up to three places
153
+ BACKUP_HOST:
154
+ targets:
155
+ - { source: github, kind: variable, scope: environment }
156
+ - { source: file, template: inventory/inventory.template.yml, var: backup_host }
157
+ - { source: file, template: charts-values/dependencies/values.yaml, var: backup_host }
158
+ BACKUP_SERVER_USER:
159
+ targets: [{ source: github, kind: secret, scope: environment }]
160
+ BACKUP_ENVIRONMENT_MODE:
161
+ targets:
162
+ - { source: github, kind: variable, scope: environment }
163
+ - { source: file, template: charts-values/dependencies/values.yaml, var: backup_type }
164
+
165
+ # Restore
166
+ RESTORE_ENVIRONMENT_NAME:
167
+ targets:
168
+ - { source: github, kind: variable, scope: environment }
169
+ - { source: file, template: charts-values/dependencies/values.yaml, var: restore_environment_name }
170
+ RESTORE_ENVIRONMENT_MODE:
171
+ targets:
172
+ - { source: github, kind: variable, scope: environment }
173
+ - { source: file, template: charts-values/dependencies/values.yaml, var: restore_type }
174
+ RESTORE_HOST:
175
+ targets:
176
+ - { source: github, kind: variable, scope: environment }
177
+ - { source: file, template: charts-values/dependencies/values.yaml, var: restore_host }
178
+
179
+ # Traefik. The mode is a new variable; the old script only kept the certificate, so an environment
180
+ # made by it is read as static_ssl when SSL_CRT exists (see applySnapshot).
181
+ TRAEFIK_MODE:
182
+ targets:
183
+ - { source: github, kind: variable, scope: environment }
184
+ SSL_CRT:
185
+ targets: [{ source: github, kind: secret, scope: environment }]
186
+ SSL_KEY:
187
+ targets: [{ source: github, kind: secret, scope: environment }]
188
+
189
+ # Dependencies. "Use built-in component" is `<component>.enabled` of the dependencies chart: the chart
190
+ # deploys the component, or leaves it to the host that is entered.
191
+ USE_BUILTIN_ELASTICSEARCH:
192
+ targets:
193
+ - { source: file, template: charts-values/dependencies/values.yaml, var: elasticsearch_enabled, parse: boolean }
194
+ USE_BUILTIN_RUSTFS:
195
+ targets:
196
+ - { source: file, template: charts-values/dependencies/values.yaml, var: rustfs_enabled, parse: boolean }
197
+ USE_BUILTIN_POSTGRES:
198
+ targets:
199
+ - { source: file, template: charts-values/dependencies/values.yaml, var: postgres_enabled, parse: boolean }
200
+ USE_BUILTIN_REDIS:
201
+ targets:
202
+ - { source: file, template: charts-values/dependencies/values.yaml, var: redis_enabled, parse: boolean }
203
+ ELASTICSEARCH_HOST:
204
+ targets:
205
+ - { source: github, kind: variable, scope: environment }
206
+ - { source: file, template: charts-values/dependencies/values.yaml, var: elasticsearch_host }
207
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: elasticsearch_host }
208
+ ELASTICSEARCH_SUPERUSER:
209
+ targets: [{ source: github, kind: secret, scope: environment }]
210
+ ELASTICSEARCH_SUPERUSER_PASSWORD:
211
+ targets: [{ source: github, kind: secret, scope: environment }]
212
+ S3_HOST:
213
+ targets:
214
+ - { source: github, kind: variable, scope: environment }
215
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: s3_host }
216
+ S3_ADMIN_ACCESS_KEY:
217
+ targets: [{ source: github, kind: secret, scope: environment, legacy: [MINIO_ROOT_USER] }]
218
+ S3_ADMIN_SECRET_KEY:
219
+ targets:
220
+ - { source: github, kind: secret, scope: environment, legacy: [MINIO_ROOT_PASSWORD] }
221
+ POSTGRES_HOST:
222
+ targets:
223
+ - { source: github, kind: variable, scope: environment }
224
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: postgres_host }
225
+ POSTGRES_USER:
226
+ targets: [{ source: github, kind: secret, scope: environment }]
227
+ REDIS_HOST:
228
+ targets:
229
+ - { source: github, kind: variable, scope: environment }
230
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: redis_host }
231
+
232
+ # Monitoring. The stack is also switched on by the workflows, which read MONITORING_ENABLED.
233
+ MONITORING_ENABLED:
234
+ targets:
235
+ - { source: github, kind: variable, scope: environment, parse: boolean }
236
+ - { source: file, template: charts-values/dependencies/values.yaml, var: monitoring_enabled, parse: boolean }
237
+ KIBANA_USERNAME:
238
+ targets: [{ source: github, kind: secret, scope: environment }]
239
+ OTEL_ENABLED:
240
+ targets:
241
+ - { source: github, kind: variable, scope: environment, parse: boolean }
242
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: otel_enabled, parse: boolean }
243
+ OTEL_COLLECTOR_ENDPOINT:
244
+ targets:
245
+ - { source: github, kind: variable, scope: environment }
246
+ - { source: file, template: charts-values/opencrvs-services/values.yaml, var: exporter_otlp_endpoint }
247
+ - { source: file, template: charts-values/traefik/values.yaml, var: otel_collector_endpoint }
248
+ SENTRY_DSN:
249
+ targets: [{ source: github, kind: secret, scope: environment }]
250
+
251
+ # Disk encryption (the key is generated; the size is a variable)
252
+ DISK_SPACE:
253
+ targets: [{ source: github, kind: variable, scope: environment }]
254
+
255
+ # Other secrets (names only)
256
+ ENCRYPTION_KEY:
257
+ targets: [{ source: github, kind: secret, scope: environment }]
258
+ POSTGRES_PASSWORD:
259
+ targets: [{ source: github, kind: secret, scope: environment }]
260
+ KIBANA_PASSWORD:
261
+ targets: [{ source: github, kind: secret, scope: environment }]
262
+ OPENCRVS_METABASE_ADMIN_EMAIL:
263
+ targets: [{ source: github, kind: secret, scope: environment }]
264
+ OPENCRVS_METABASE_ADMIN_PASSWORD:
265
+ targets: [{ source: github, kind: secret, scope: environment }]
@@ -0,0 +1,18 @@
1
+ # Vendored templates
2
+
3
+ Copies of the templates of `opencrvs environment init` (`../../environment/templates`),
4
+ so the configurator keeps working when that command is removed.
5
+
6
+ Two files differ from the CLI's, because questions of the form feed them:
7
+ `charts-values/opencrvs-services/values.yaml` has `otel.enabled: {{otel_enabled}}` (the CLI uses
8
+ `monitoring_enabled`, so OpenTelemetry could not be switched off on its own), the OpenTelemetry
9
+ Collector endpoint is `{{exporter_otlp_endpoint}}`, and the hosts of Elasticsearch, S3, Redis and
10
+ Postgres are `{{elasticsearch_host}}`, `{{s3_host}}`, `{{redis_host}}` and `{{postgres_host}}`
11
+ instead of the fixed in-cluster addresses (see `ui/plan/dependencyHosts.ts`).
12
+ `charts-values/traefik/values.yaml` has the same collector endpoint as `{{otel_collector_endpoint}}`
13
+ in its tracing block.
14
+ Carry these changes over when copying the templates again.
15
+
16
+ `../forms/bindings.yml` says which of these files are read back, and `../scripts/check-bindings.ts`
17
+ walks this folder to find where each template variable ends up in the rendered file.
18
+ When the CLI templates change, copy them again and run `pnpm configurator:bindings` from `packages/toolkit`.
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,96 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ network_policy:
11
+ ingress_mode: deny
12
+ egress_mode: deny
13
+ allowed_namespaces:
14
+ - opencrvs-{{env}}
15
+
16
+ # Default: storage_type: host_path
17
+ # host_path option is backward compatible with Docker Swarm,
18
+ # configured to use sub-directories within /data folder
19
+ # For new installations feel free to remove storage_type
20
+ storage_type: host_path
21
+
22
+ # All datastores are placed on first node (master1) for backward compatibility
23
+ # with Docker Swarm.
24
+ # For new installations feel free to remove node_selector
25
+ node_selector:
26
+ role: data1
27
+
28
+ rustfs:
29
+ enabled: {{rustfs_enabled}}
30
+ use_default_credentials: false
31
+ {{#if s3_migrate_from_minio_to_rustfs}}
32
+ host_data_path: /data/minio
33
+ {{/if}}
34
+ {{#if restore_enabled}}
35
+ restore:
36
+ type: {{restore_type}}
37
+ {{/if}}
38
+ {{#if backup_enabled}}
39
+ backup:
40
+ type: {{backup_type}}
41
+ {{/if}}
42
+
43
+
44
+ elasticsearch:
45
+ enabled: {{elasticsearch_enabled}}
46
+ use_default_credentials: false
47
+ host: {{elasticsearch_host}}
48
+ postgres:
49
+ enabled: {{postgres_enabled}}
50
+ use_default_credentials: false
51
+ {{#if restore_enabled}}
52
+ restore:
53
+ type: {{restore_type}}
54
+ {{/if}}
55
+ {{#if backup_enabled}}
56
+ backup:
57
+ type: {{backup_type}}
58
+ {{/if}}
59
+
60
+ redis:
61
+ enabled: {{redis_enabled}}
62
+ auth_mode: acl
63
+
64
+ monitoring:
65
+ enabled: {{monitoring_enabled}}
66
+
67
+ elastalert:
68
+ env:
69
+ NOTIFICATION_TYPE: email
70
+ secrets:
71
+ smtp-config:
72
+ - ALERT_EMAIL
73
+ - SENDER_EMAIL_ADDRESS
74
+ - SMTP_HOST
75
+ - SMTP_PASSWORD
76
+ - SMTP_PORT
77
+ - SMTP_SECURE
78
+ - SMTP_USERNAME
79
+
80
+ # Backup configuration
81
+ backup:
82
+ enabled: {{backup_enabled}}
83
+ schedule: "0 1 * * *"
84
+ backup_server_secret: backup-server-ssh-credentials
85
+ backup_server_dir: /home/backup/{{env}}
86
+ host: {{backup_host}}
87
+
88
+
89
+ # Restore configuration
90
+ restore:
91
+ enabled: {{restore_enabled}}
92
+ schedule: "0 0 * * *"
93
+ backup_server_secret: backup-server-ssh-credentials
94
+ backup_server_dir: /home/backup/{{restore_environment_name}}
95
+ backup_encryption_secret: restore-encryption-secret
96
+ host: {{restore_host}}
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################
@@ -0,0 +1,83 @@
1
+ ##################################################################################
2
+ # GENERATED FILE — DO NOT EDIT
3
+ #
4
+ # This file is managed by `opencrvs environment init` and may be overwritten.
5
+ # Put all custom Helm values in values.override.yaml, preserving the same YAML
6
+ # hierarchy used here. To remove a generated section, set its top-level key to
7
+ # null in values.override.yaml.
8
+ ##################################################################################
9
+
10
+ ########################################################################################
11
+ # Initial configuration file for OpenCRVS installation
12
+ ########################################################################################
13
+ # Some properties are not defined in this file and should be provided as key/value at
14
+ # installation time:
15
+ # - hostname: valid DNS name for opencrvs
16
+ # - countryconfig.image.name: Countryconfig image repository
17
+ # - countryconfig.image.tag: Countryconfig image tag
18
+ environment_type: {{environment_type}}
19
+
20
+ network_policy:
21
+ ingress_mode: deny
22
+ egress_mode: deny
23
+ allowed_namespaces:
24
+ - opencrvs-deps-{{env}}
25
+
26
+ hpa:
27
+ enabled: false
28
+
29
+ env:
30
+ S3_BUCKET: ocrvs
31
+ OPENCRVS_ENVIRONMENT: {{opencrvs_environment}}
32
+
33
+ otel:
34
+ enabled: {{otel_enabled}}
35
+ deployment_environment: {{env}}
36
+ exporter_otlp_endpoint: "{{exporter_otlp_endpoint}}"
37
+
38
+ elasticsearch:
39
+ auth_mode: auto
40
+ host: {{elasticsearch_host}}
41
+
42
+ s3:
43
+ auth_mode: use_secret
44
+ host: {{s3_host}}
45
+
46
+ redis:
47
+ auth_mode: use_secret
48
+ host: {{redis_host}}
49
+
50
+ postgres:
51
+ auth_mode: auto
52
+ host: {{postgres_host}}
53
+
54
+ platform:
55
+ imagePullSecrets:
56
+ # Default value for credentials created while yarn environment:init
57
+ - name: registry-credentials
58
+
59
+ auth:
60
+ env:
61
+ TWO_FA_ENABLED: {{two_fa_enabled}}
62
+
63
+ events:
64
+ env:
65
+ TWO_FA_ENABLED: {{two_fa_enabled}}
66
+
67
+ countryconfig:
68
+ secrets:
69
+ smtp-config:
70
+ - ALERT_EMAIL
71
+ - SENDER_EMAIL_ADDRESS
72
+ - SMTP_HOST
73
+ - SMTP_PASSWORD
74
+ - SMTP_PORT
75
+ - SMTP_SECURE
76
+ - SMTP_USERNAME
77
+
78
+ dashboards:
79
+ use_default_credentials: false
80
+ enabled: true
81
+
82
+ on_restore_cronjob:
83
+ enabled: {{restore_enabled}}
@@ -0,0 +1,102 @@
1
+ mode: deployment
2
+
3
+ image:
4
+ repository: otel/opentelemetry-collector-k8s
5
+
6
+ networkPolicy:
7
+ enabled: true
8
+ presets:
9
+ kubernetesObjects:
10
+ networking:
11
+ enabled: true
12
+
13
+ resources:
14
+ requests:
15
+ cpu: 100m
16
+ memory: 128Mi
17
+ limits:
18
+ cpu: 500m
19
+ memory: 512Mi
20
+
21
+ ports:
22
+ jaeger-compact:
23
+ enabled: false
24
+ jaeger-thrift:
25
+ enabled: false
26
+ jaeger-grpc:
27
+ enabled: false
28
+ zipkin:
29
+ enabled: false
30
+
31
+ config:
32
+ receivers:
33
+ otlp:
34
+ protocols:
35
+ grpc:
36
+ endpoint: ${env:MY_POD_IP}:4317
37
+ http:
38
+ endpoint: ${env:MY_POD_IP}:4318
39
+ prometheus: null
40
+ jaeger: null
41
+ zipkin: null
42
+
43
+ exporters:
44
+ otlp/elastic:
45
+ endpoint: apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200
46
+ tls:
47
+ insecure: true
48
+ processors:
49
+ batch:
50
+ timeout: 15s
51
+ send_batch_size: 1024
52
+
53
+ memory_limiter:
54
+ check_interval: 5s
55
+ limit_percentage: 80
56
+ spike_limit_percentage: 25
57
+
58
+ transform/traces:
59
+ error_mode: ignore
60
+ trace_statements:
61
+ # Start with the raw path.
62
+ - set(span.attributes["http.route"], span.attributes["url.path"]) where resource.attributes["service.name"] == "traefik" and span.attributes["url.path"] != nil
63
+
64
+ # Match getTracePath(): collapse repeated slashes.
65
+ - replace_pattern(span.attributes["http.route"], "/+", "/") where resource.attributes["service.name"] == "traefik" and span.attributes["http.route"] != nil
66
+
67
+ # Match getTracePath(): replace dynamic-looking segments with "#".
68
+ - replace_pattern(span.attributes["http.route"], "/([^/]*\\.[^/]*|[0-9]+|[0-9a-fA-F]{24}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})(/|$)", "/#$$2") where resource.attributes["service.name"] == "traefik" and span.attributes["http.route"] != nil
69
+
70
+ # Concatenate Request method and normalized URL to conform same format as NodeJs.
71
+ - set(span.name, Concat([span.attributes["http.request.method"], span.attributes["http.route"]], " ")) where resource.attributes["service.name"] == "traefik" and span.attributes["http.request.method"] != nil and span.attributes["http.route"] != nil
72
+
73
+ # SDK language to avoid errors in Kibana on APM -> Service Inventory -> Traefik -> Metrics.
74
+ - delete_key(resource.attributes, "telemetry.sdk.language") where resource.attributes["service.name"] == "traefik"
75
+
76
+ # Nginx OTEL module uses older HTTP semantic convention names, so build the span name from http.method and http.route.
77
+ - set(span.name, Concat([span.attributes["http.method"], span.attributes["http.route"]], " ")) where (resource.attributes["service.name"] == "opencrvs_client" or resource.attributes["service.name"] == "opencrvs_login") and span.attributes["http.method"] != nil and span.attributes["http.route"] != nil
78
+
79
+ service:
80
+ telemetry:
81
+ metrics:
82
+ level: none
83
+ readers: null
84
+ pipelines:
85
+ logs: null
86
+ metrics:
87
+ receivers:
88
+ - otlp
89
+ processors:
90
+ - memory_limiter
91
+ - batch
92
+ exporters:
93
+ - otlp/elastic
94
+ traces:
95
+ receivers:
96
+ - otlp
97
+ processors:
98
+ - memory_limiter
99
+ - transform/traces
100
+ - batch
101
+ exporters:
102
+ - otlp/elastic
@@ -0,0 +1,4 @@
1
+ ##################################################################################
2
+ # Use this file to customize helm chart behavior
3
+ # Please make sure your custom changes doesn't conflict with values.yaml
4
+ ##################################################################################