@opencrvs/toolkit 2.0.0-rc.c389769 → 2.0.0-rc.c3ad341

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 (86) hide show
  1. package/README.md +15 -0
  2. package/build.sh +3 -2
  3. package/dist/application-config/index.js +17 -6
  4. package/dist/cli.js +3252 -46
  5. package/dist/commons/api/router.d.ts +10 -0
  6. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  8. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  9. package/dist/commons/events/EventConfig.d.ts +2 -0
  10. package/dist/commons/events/EventIndex.d.ts +25 -0
  11. package/dist/commons/events/EventMetadata.d.ts +26 -0
  12. package/dist/commons/events/FieldConfig.d.ts +10 -0
  13. package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
  14. package/dist/commons/events/locations.d.ts +1 -0
  15. package/dist/commons/events/state/index.d.ts +8 -0
  16. package/dist/commons/events/state/utils.d.ts +9 -0
  17. package/dist/conditionals/index.js +10 -5
  18. package/dist/environment/custom-types.d.ts +33 -0
  19. package/dist/environment/custom-types.d.ts.map +1 -0
  20. package/dist/environment/custom-types.js +12 -0
  21. package/dist/environment/derived-variables.d.ts +134 -0
  22. package/dist/environment/derived-variables.d.ts.map +1 -0
  23. package/dist/environment/derived-variables.js +169 -0
  24. package/dist/environment/editor-questions.d.ts +4 -0
  25. package/dist/environment/editor-questions.d.ts.map +1 -0
  26. package/dist/environment/editor-questions.js +67 -0
  27. package/dist/environment/git.d.ts +5 -0
  28. package/dist/environment/git.d.ts.map +1 -0
  29. package/dist/environment/git.js +38 -0
  30. package/dist/environment/github.d.ts +26 -0
  31. package/dist/environment/github.d.ts.map +1 -0
  32. package/dist/environment/github.js +247 -0
  33. package/dist/environment/index.d.ts +5 -0
  34. package/dist/environment/index.d.ts.map +1 -0
  35. package/dist/environment/index.js +71 -0
  36. package/dist/environment/logger.d.ts +15 -0
  37. package/dist/environment/logger.d.ts.map +1 -0
  38. package/dist/environment/logger.js +25 -0
  39. package/dist/environment/manage-users.d.ts +11 -0
  40. package/dist/environment/manage-users.d.ts.map +1 -0
  41. package/dist/environment/manage-users.js +497 -0
  42. package/dist/environment/questions-helper.d.ts +15 -0
  43. package/dist/environment/questions-helper.d.ts.map +1 -0
  44. package/dist/environment/questions-helper.js +70 -0
  45. package/dist/environment/questions.d.ts +199 -0
  46. package/dist/environment/questions.d.ts.map +1 -0
  47. package/dist/environment/questions.js +412 -0
  48. package/dist/environment/setup-environment.d.ts +2 -0
  49. package/dist/environment/setup-environment.d.ts.map +1 -0
  50. package/dist/environment/setup-environment.js +794 -0
  51. package/dist/environment/ssh-keygen.d.ts +5 -0
  52. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  53. package/dist/environment/ssh-keygen.js +21 -0
  54. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  55. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  56. package/dist/environment/swarm-to-k8s.js +173 -0
  57. package/dist/environment/templates.d.ts +27 -0
  58. package/dist/environment/templates.d.ts.map +1 -0
  59. package/dist/environment/templates.js +163 -0
  60. package/dist/environment/update-workflows.d.ts +2 -0
  61. package/dist/environment/update-workflows.d.ts.map +1 -0
  62. package/dist/environment/update-workflows.js +169 -0
  63. package/dist/environment/users.d.ts +2 -0
  64. package/dist/environment/users.d.ts.map +1 -0
  65. package/dist/environment/users.js +112 -0
  66. package/dist/environment/utils.d.ts +18 -0
  67. package/dist/environment/utils.d.ts.map +1 -0
  68. package/dist/environment/utils.js +100 -0
  69. package/dist/events/index.js +40 -6
  70. package/dist/migrations/v2.0/index.js +10 -5
  71. package/dist/notification/index.js +17 -6
  72. package/dist/scopes/index.d.ts +89 -1
  73. package/dist/scopes/index.js +10 -5
  74. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  75. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  76. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  77. package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
  78. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  79. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  80. package/dist/templates/inventory/inventory.template.yml +100 -0
  81. package/dist/templates/inventory/production.example.yml +77 -0
  82. package/dist/templates/inventory/qa.example.yml +48 -0
  83. package/opencrvs-toolkit-2.0.0-rc.c3ad341.tgz +0 -0
  84. package/package.json +15 -1
  85. package/tsconfig.tsbuildinfo +1 -1
  86. package/opencrvs-toolkit-2.0.0-rc.c389769.tgz +0 -0
@@ -14,7 +14,7 @@ export type UserFilter = z.infer<typeof UserFilter>;
14
14
  * The different types of scopes that can be used to control access to records. Each type has different options that can be used to further filter the records that the scope applies to.
15
15
  * When adding new scope types, they should be added to the appropriate section based on the options they require.
16
16
  *
17
- * @see scopeOptionsPlaceEvent @see scopeOptionsDeclared @see scopeOptionsFull
17
+ * @see scopeOptionsPlaceEvent @see scopeOptionsDeclaredOrNotified @see scopeOptionsFull
18
18
  */
19
19
  export declare const RecordScopeTypeV2: z.ZodEnum<{
20
20
  "record.search": "record.search";
@@ -48,6 +48,14 @@ declare const AllScopeOptions: z.ZodObject<{
48
48
  location: "location";
49
49
  all: "all";
50
50
  }>>;
51
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
52
+ administrativeArea: "administrativeArea";
53
+ location: "location";
54
+ all: "all";
55
+ }>>;
56
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
57
+ user: "user";
58
+ }>>;
51
59
  declaredIn: z.ZodOptional<z.ZodEnum<{
52
60
  administrativeArea: "administrativeArea";
53
61
  location: "location";
@@ -70,6 +78,8 @@ export declare const ScopeOptionKey: z.ZodEnum<{
70
78
  role: "role";
71
79
  event: "event";
72
80
  placeOfEvent: "placeOfEvent";
81
+ notifiedIn: "notifiedIn";
82
+ notifiedBy: "notifiedBy";
73
83
  declaredIn: "declaredIn";
74
84
  declaredBy: "declaredBy";
75
85
  registeredIn: "registeredIn";
@@ -126,6 +136,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
136
  location: "location";
127
137
  all: "all";
128
138
  }>>;
139
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
140
+ administrativeArea: "administrativeArea";
141
+ location: "location";
142
+ all: "all";
143
+ }>>;
144
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
145
+ user: "user";
146
+ }>>;
129
147
  declaredIn: z.ZodOptional<z.ZodEnum<{
130
148
  administrativeArea: "administrativeArea";
131
149
  location: "location";
@@ -150,6 +168,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
168
  location: "location";
151
169
  all: "all";
152
170
  }>>;
171
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
172
+ administrativeArea: "administrativeArea";
173
+ location: "location";
174
+ all: "all";
175
+ }>>;
176
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
177
+ user: "user";
178
+ }>>;
153
179
  declaredIn: z.ZodOptional<z.ZodEnum<{
154
180
  administrativeArea: "administrativeArea";
155
181
  location: "location";
@@ -176,6 +202,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
176
202
  location: "location";
177
203
  all: "all";
178
204
  }>>;
205
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
206
+ administrativeArea: "administrativeArea";
207
+ location: "location";
208
+ all: "all";
209
+ }>>;
210
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
211
+ user: "user";
212
+ }>>;
179
213
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
214
  administrativeArea: "administrativeArea";
181
215
  location: "location";
@@ -203,6 +237,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
203
237
  location: "location";
204
238
  all: "all";
205
239
  }>>;
240
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
241
+ administrativeArea: "administrativeArea";
242
+ location: "location";
243
+ all: "all";
244
+ }>>;
245
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
246
+ user: "user";
247
+ }>>;
206
248
  declaredIn: z.ZodOptional<z.ZodEnum<{
207
249
  administrativeArea: "administrativeArea";
208
250
  location: "location";
@@ -305,6 +347,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
305
347
  options: z.ZodOptional<z.ZodObject<{
306
348
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
307
349
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
350
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
351
+ notifiedBy: z.ZodOptional<z.ZodString>;
308
352
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
309
353
  declaredBy: z.ZodOptional<z.ZodString>;
310
354
  }, z.core.$strip>>;
@@ -319,6 +363,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
319
363
  options: z.ZodOptional<z.ZodObject<{
320
364
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
321
365
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
366
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
367
+ notifiedBy: z.ZodOptional<z.ZodString>;
322
368
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
323
369
  declaredBy: z.ZodOptional<z.ZodString>;
324
370
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -329,6 +375,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
329
375
  options: z.ZodOptional<z.ZodObject<{
330
376
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
331
377
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
378
+ notifiedIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
379
+ notifiedBy: z.ZodOptional<z.ZodString>;
332
380
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
333
381
  declaredBy: z.ZodOptional<z.ZodString>;
334
382
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -385,6 +433,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
385
433
  location: "location";
386
434
  all: "all";
387
435
  }>>;
436
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
437
+ administrativeArea: "administrativeArea";
438
+ location: "location";
439
+ all: "all";
440
+ }>>;
441
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
442
+ user: "user";
443
+ }>>;
388
444
  declaredIn: z.ZodOptional<z.ZodEnum<{
389
445
  administrativeArea: "administrativeArea";
390
446
  location: "location";
@@ -409,6 +465,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
465
  location: "location";
410
466
  all: "all";
411
467
  }>>;
468
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
469
+ administrativeArea: "administrativeArea";
470
+ location: "location";
471
+ all: "all";
472
+ }>>;
473
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
474
+ user: "user";
475
+ }>>;
412
476
  declaredIn: z.ZodOptional<z.ZodEnum<{
413
477
  administrativeArea: "administrativeArea";
414
478
  location: "location";
@@ -435,6 +499,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
435
499
  location: "location";
436
500
  all: "all";
437
501
  }>>;
502
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
503
+ administrativeArea: "administrativeArea";
504
+ location: "location";
505
+ all: "all";
506
+ }>>;
507
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
508
+ user: "user";
509
+ }>>;
438
510
  declaredIn: z.ZodOptional<z.ZodEnum<{
439
511
  administrativeArea: "administrativeArea";
440
512
  location: "location";
@@ -462,6 +534,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
462
534
  location: "location";
463
535
  all: "all";
464
536
  }>>;
537
+ notifiedIn: z.ZodOptional<z.ZodEnum<{
538
+ administrativeArea: "administrativeArea";
539
+ location: "location";
540
+ all: "all";
541
+ }>>;
542
+ notifiedBy: z.ZodOptional<z.ZodEnum<{
543
+ user: "user";
544
+ }>>;
465
545
  declaredIn: z.ZodOptional<z.ZodEnum<{
466
546
  administrativeArea: "administrativeArea";
467
547
  location: "location";
@@ -596,6 +676,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
596
676
  options?: {
597
677
  event?: string[] | undefined;
598
678
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
679
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
680
+ notifiedBy?: "user" | undefined;
599
681
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
600
682
  declaredBy?: "user" | undefined;
601
683
  } | undefined;
@@ -604,6 +686,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
604
686
  options?: {
605
687
  event?: string[] | undefined;
606
688
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
689
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
690
+ notifiedBy?: "user" | undefined;
607
691
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
608
692
  declaredBy?: "user" | undefined;
609
693
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -614,6 +698,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
614
698
  options?: {
615
699
  event?: string[] | undefined;
616
700
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
701
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
702
+ notifiedBy?: "user" | undefined;
617
703
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
618
704
  declaredBy?: "user" | undefined;
619
705
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -625,6 +711,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
625
711
  options?: {
626
712
  event?: string[] | undefined;
627
713
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
714
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
715
+ notifiedBy?: "user" | undefined;
628
716
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
629
717
  declaredBy?: "user" | undefined;
630
718
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -149,11 +149,13 @@ var scopeOptionsPlaceEvent = z3.object({
149
149
  event: scopeByEvent,
150
150
  placeOfEvent: JurisdictionFilter.optional()
151
151
  }).describe("Options applicable to all record scopes.");
152
- var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
152
+ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
153
+ notifiedIn: JurisdictionFilter.optional(),
154
+ notifiedBy: UserFilter.optional(),
153
155
  declaredIn: JurisdictionFilter.optional(),
154
156
  declaredBy: UserFilter.optional()
155
157
  }).describe("Options applicable to actions that may take place after DECLARE");
156
- var AllRecordScopeOptions = scopeOptionsDeclared.extend({
158
+ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
157
159
  registeredIn: JurisdictionFilter.optional(),
158
160
  registeredBy: UserFilter.optional()
159
161
  }).describe(
@@ -191,6 +193,8 @@ var ResolvedScopeOptionsPlaceEvent = z3.object({
191
193
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
192
194
  );
193
195
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
196
+ notifiedIn: UUID.nullish(),
197
+ notifiedBy: z3.string().optional(),
194
198
  declaredIn: UUID.nullish(),
195
199
  declaredBy: z3.string().optional()
196
200
  }).describe(
@@ -236,7 +240,7 @@ var RecordScopeV2 = z3.discriminatedUnion("type", [
236
240
  }),
237
241
  z3.object({
238
242
  type: ScopesWithDeclaredOptions,
239
- options: scopeOptionsDeclared.optional()
243
+ options: scopeOptionsDeclaredOrNotified.optional()
240
244
  }),
241
245
  z3.object({
242
246
  type: ScopesWithFullOptions,
@@ -372,8 +376,9 @@ var decodeScope = (encodedScope) => {
372
376
  var DEFAULT_SCOPE_OPTIONS = {
373
377
  placeOfEvent: JurisdictionFilter.enum.all,
374
378
  accessLevel: JurisdictionFilter.enum.all,
375
- registeredIn: JurisdictionFilter.enum.all,
376
- declaredIn: JurisdictionFilter.enum.all
379
+ notifiedIn: JurisdictionFilter.enum.all,
380
+ declaredIn: JurisdictionFilter.enum.all,
381
+ registeredIn: JurisdictionFilter.enum.all
377
382
  };
378
383
  function getScopeOptionValue(scope, option) {
379
384
  const options = "options" in scope ? scope.options : void 0;
@@ -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
+ # Default: storage_type: host_path
11
+ # host_path option is backward compatible with Docker Swarm,
12
+ # configured to use sub-directories within /data folder
13
+ # For new installations feel free to remove storage_type
14
+ storage_type: host_path
15
+
16
+ # All datastores are placed on first node (master1) for backward compatibility
17
+ # with Docker Swarm.
18
+ # For new installations feel free to remove node_selector
19
+ node_selector:
20
+ role: data1
21
+
22
+ minio:
23
+ use_default_credentials: false
24
+ {{#if restore_enabled}}
25
+ restore:
26
+ type: {{restore_type}}
27
+ {{/if}}
28
+ {{#if backup_enabled}}
29
+ backup:
30
+ type: {{backup_type}}
31
+ {{/if}}
32
+
33
+ elasticsearch:
34
+ use_default_credentials: false
35
+
36
+ mongodb:
37
+ use_default_credentials: false
38
+
39
+ postgres:
40
+ use_default_credentials: false
41
+ {{#if restore_enabled}}
42
+ restore:
43
+ type: {{restore_type}}
44
+ {{/if}}
45
+ {{#if backup_enabled}}
46
+ backup:
47
+ type: {{backup_type}}
48
+ {{/if}}
49
+
50
+ redis:
51
+ auth_mode: acl
52
+
53
+ monitoring:
54
+ enabled: true
55
+
56
+ elastalert:
57
+ env:
58
+ NOTIFICATION_TYPE: email
59
+ secrets:
60
+ smtp-config:
61
+ - ALERT_EMAIL
62
+ - SENDER_EMAIL_ADDRESS
63
+ - SMTP_HOST
64
+ - SMTP_PASSWORD
65
+ - SMTP_PORT
66
+ - SMTP_SECURE
67
+ - SMTP_USERNAME
68
+
69
+ # Backup configuration
70
+ backup:
71
+ enabled: {{backup_enabled}}
72
+ schedule: "0 1 * * *"
73
+ backup_server_secret: backup-server-ssh-credentials
74
+ backup_server_dir: /home/backup/{{env}}
75
+
76
+
77
+ # Restore configuration
78
+ restore:
79
+ enabled: {{restore_enabled}}
80
+ schedule: "0 0 * * *"
81
+ backup_server_secret: backup-server-ssh-credentials
82
+ backup_server_dir: /home/backup/{{restore_environment_name}}
83
+ backup_encryption_secret: restore-encryption-secret
@@ -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,81 @@
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
+ hpa:
21
+ enabled: false
22
+
23
+ env:
24
+ APN_SERVICE_URL: "http://apm-server.opencrvs-deps-{{env}}.svc.cluster.local:8200"
25
+ MINIO_BUCKET: ocrvs
26
+ OPENCRVS_ENVIRONMENT: {{opencrvs_environment}}
27
+
28
+ influxdb:
29
+ host: influxdb-0.influxdb.opencrvs-deps-{{env}}.svc.cluster.local
30
+
31
+ elasticsearch:
32
+ auth_mode: auto
33
+ host: elasticsearch.opencrvs-deps-{{env}}.svc.cluster.local
34
+
35
+ minio:
36
+ auth_mode: use_secret
37
+ host: minio-0.minio.opencrvs-deps-{{env}}.svc.cluster.local
38
+
39
+ mongodb:
40
+ auth_mode: auto
41
+ host: mongodb-0.mongodb.opencrvs-deps-{{env}}.svc.cluster.local
42
+
43
+ redis:
44
+ auth_mode: use_secret
45
+ host: redis-0.redis.opencrvs-deps-{{env}}.svc.cluster.local
46
+
47
+ postgres:
48
+ auth_mode: auto
49
+ host: postgres-0.postgres.opencrvs-deps-{{env}}.svc.cluster.local
50
+
51
+ platform:
52
+ imagePullSecrets:
53
+ # Default value for credentials created while yarn environment:init
54
+ - name: dockerhub-credentials
55
+
56
+
57
+ auth:
58
+ env:
59
+ TWO_FA_ENABLED: {{two_fa_enabled}}
60
+
61
+ events:
62
+ env:
63
+ TWO_FA_ENABLED: {{two_fa_enabled}}
64
+
65
+ countryconfig:
66
+ secrets:
67
+ smtp-config:
68
+ - ALERT_EMAIL
69
+ - SENDER_EMAIL_ADDRESS
70
+ - SMTP_HOST
71
+ - SMTP_PASSWORD
72
+ - SMTP_PORT
73
+ - SMTP_SECURE
74
+ - SMTP_USERNAME
75
+
76
+ dashboards:
77
+ use_default_credentials: false
78
+ enabled: true
79
+
80
+ on_restore_cronjob:
81
+ enabled: {{restore_enabled}}
@@ -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,115 @@
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
+ # Overwriting https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml
11
+ namespaceOverride: "traefik"
12
+ logs:
13
+ general:
14
+ # "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "PANIC"
15
+ level: "INFO"
16
+ # format: "common" # For local environment
17
+ format: "json" # For server environment
18
+ access:
19
+ # -- To enable access logs
20
+ enabled: true
21
+ format: "json"
22
+
23
+ ingressRoute:
24
+ dashboard:
25
+ enabled: false
26
+
27
+ # Be explicit that we only use CRDs, not ingress/gw support
28
+ providers:
29
+ kubernetesCRD:
30
+ enabled: true
31
+ kubernetesIngress:
32
+ enabled: false
33
+ kubernetesGateway:
34
+ enabled: false
35
+
36
+ service:
37
+ enabled: true
38
+ single: false
39
+ type: NodePort
40
+
41
+ ports:
42
+ web:
43
+ port: 8000
44
+ hostPort: 80
45
+ protocol: TCP
46
+ nodePort: 30080
47
+ http:
48
+ redirections:
49
+ entryPoint:
50
+ to: websecure
51
+ scheme: https
52
+ permanent: true
53
+
54
+ websecure:
55
+ port: 8443
56
+ hostPort: 443
57
+ protocol: TCP
58
+ nodePort: 30443
59
+ {{#if lets_encrypt}}
60
+ http:
61
+ tls:
62
+ enabled: true
63
+ certResolver: letsencrypt
64
+ {{/if}}
65
+
66
+
67
+ {{#if lets_encrypt}}
68
+ certificatesResolvers:
69
+ letsencrypt:
70
+ acme:
71
+ tlsChallenge: false
72
+ httpChallenge:
73
+ entryPoint: web
74
+ email: admin@opencrvs.org
75
+ # Storage for certificates:
76
+ storage: /certificates/acme.json
77
+ # NOTE: Sometimes Let's Encrypt hit production SSL certificate issuing limits
78
+ # If you are having issues, switch to staging
79
+ # Staging server
80
+ # caServer: https://acme-staging-v02.api.letsencrypt.org/directory
81
+ # Production server
82
+ caServer: https://acme-v02.api.letsencrypt.org/directory
83
+
84
+ additionalVolumeMounts:
85
+ - name: acme
86
+ mountPath: /certificates
87
+ {{/if}}
88
+ {{#if static_ssl}}
89
+ certificatesResolvers: {}
90
+
91
+ # 👇 Custom TLS configuration
92
+ tlsStore:
93
+ default:
94
+ defaultCertificate:
95
+ # Check documentation how to create secret with static SSL certificate
96
+ secretName: traefik-cert
97
+ {{/if}}
98
+
99
+ deployment:
100
+ hostNetwork: true
101
+ {{#if static_ssl}}
102
+ kind: DaemonSet
103
+ {{/if}}
104
+ {{#if lets_encrypt}}
105
+ additionalVolumes:
106
+ - name: acme
107
+ hostPath:
108
+ path: /data/traefik
109
+ {{/if}}
110
+
111
+ # If you need to run traefik on all cluster nodes
112
+ # Add this line to traefik/values.override.yaml
113
+ # nodeSelector: {}
114
+ nodeSelector:
115
+ traefik-role: ingress
@@ -0,0 +1,100 @@
1
+ ##################################################################################
2
+ # DON'T MODIFY THIS FILE
3
+ # File was generated by "yarn environment:init"
4
+ # File will be overwritten on next run of this script
5
+ # Please use values.override.yaml to modify helm chart behavior
6
+ # make sure your custom changes doesn't conflict with values.yaml
7
+ ##################################################################################
8
+ all:
9
+ vars:
10
+
11
+ # Domain/IP address for remote access to your cluster API
12
+ # Domain/IP address will be added as main endpoint to your ~/.kube/config
13
+ # - If you are behind VPN, use private IP address
14
+ # - If your server is exposed (not recommeded), use public IP address
15
+ # - If you would like to run kubectl commands from the remote server, leave this field empty
16
+ # kube_api_endpoint: ''
17
+
18
+ # IMPORTANT: If master VM has multiple ethernet interfaces, put private IP address at kube_api_host
19
+ # kube_api_host: 10.10.10.10
20
+ kube_api_host: {{kube_api_host}}
21
+
22
+ # Default ansible provision user, keep as is
23
+ ansible_user: provision
24
+ # single_node:
25
+ # For development/qa/testing/staging keep true
26
+ # For production keep false
27
+ # Defaults production configuration:
28
+ # - master node
29
+ # - 2 worker nodes
30
+ single_node: {{single_node}}
31
+ ################################################################
32
+ # DON'T MODIFY THIS SECTION BY HANDS
33
+ # Use: yarn environment:users
34
+ ################################################################
35
+ # users: Add as many users as you wish
36
+ # Configuration example
37
+ # - name: <login>
38
+ # ssh_keys:
39
+ # - <public ssh key 1>
40
+ # - <public ssh key 2>
41
+ # state: present
42
+ # role: admin
43
+ # Allowed roles:
44
+ # - operator: grant read only access to OS and full access to kubernetes cluster
45
+ # - admin: grant full access to OS and kubernetes cluster
46
+ # Allowed states:
47
+ # - present: user is allowed to login
48
+ # - absent: user account is disabled
49
+ # users: []
50
+ {{#if users}}
51
+ users:
52
+ {{#each users as |user|}}
53
+ - name: {{user.name}}
54
+ ssh_keys:
55
+ {{#each user.ssh_keys as |key| }}
56
+ - {{{key}}}
57
+ {{/each}}
58
+ state: {{user.state}}
59
+ role: {{user.role}}
60
+ {{/each}}
61
+ {{else}}
62
+ users: []
63
+ {{/if}}
64
+
65
+ children:
66
+ master:
67
+ hosts:
68
+ # Replace master with value returned by command: hostname
69
+ master:
70
+ # Keep values (ansible_host, ansible_connection) as is
71
+ # Ansible is executed on master node
72
+ ansible_host: localhost
73
+ ansible_connection: local
74
+ labels:
75
+ # traefik-role label is used to identify where to deploy traefik
76
+ traefik-role: ingress
77
+ # By default all datastores are deployed to node with role data1
78
+ role: data1
79
+ {{#if kube_worker_nodes}}
80
+ # Workers section is optional, for single node cluster feel free to remove this section
81
+ # section can be added later
82
+ # more workers can be added later as well
83
+ workers:
84
+ hosts:
85
+ {{#each kube_worker_nodes as |host idx|}}
86
+ worker{{idx}}:
87
+ ansible_host: {{host}}
88
+ labels:
89
+ # Labels have index + 2 for backward compatibility with existing swarm setup
90
+ role: data{{data_label_idx idx}}
91
+ {{/each}}
92
+ {{/if}}
93
+ {{#if backup_host}}
94
+ # backup section is optional, feel free to remove if backups are not enabled
95
+ # section can be added later
96
+ backup:
97
+ hosts:
98
+ backup0:
99
+ ansible_host: {{backup_host}}
100
+ {{/if}}