@opencrvs/toolkit 2.0.0-rc.e260b0b → 2.0.0-rc.e290634

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 (103) hide show
  1. package/README.md +15 -0
  2. package/build.sh +3 -2
  3. package/create-countryconfig/index.js +50 -20
  4. package/dist/application-config/index.js +70 -40
  5. package/dist/cli.js +3262 -50
  6. package/dist/commons/api/router.d.ts +102 -17
  7. package/dist/commons/application-config/index.d.ts +1 -0
  8. package/dist/commons/conditionals/conditionals.d.ts +357 -7
  9. package/dist/commons/conditionals/validate.d.ts +51 -2
  10. package/dist/commons/events/ActionConfig.d.ts +28 -2
  11. package/dist/commons/events/ActionDocument.d.ts +6 -0
  12. package/dist/commons/events/ActionInput.d.ts +6 -0
  13. package/dist/commons/events/AdvancedSearchConfig.d.ts +354 -0
  14. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  15. package/dist/commons/events/EventConfig.d.ts +2 -0
  16. package/dist/commons/events/EventDocument.d.ts +3 -0
  17. package/dist/commons/events/EventIndex.d.ts +25 -0
  18. package/dist/commons/events/EventMetadata.d.ts +26 -0
  19. package/dist/commons/events/FieldConfig.d.ts +388 -50
  20. package/dist/commons/events/FieldType.d.ts +1 -0
  21. package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
  22. package/dist/commons/events/FieldValue.d.ts +6 -0
  23. package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
  24. package/dist/commons/events/field.d.ts +53 -1
  25. package/dist/commons/events/index.d.ts +2 -0
  26. package/dist/commons/events/locations.d.ts +1 -0
  27. package/dist/commons/events/state/flags.d.ts +16 -0
  28. package/dist/commons/events/state/index.d.ts +8 -0
  29. package/dist/commons/events/state/utils.d.ts +21 -287
  30. package/dist/commons/events/utils.d.ts +12 -1
  31. package/dist/conditionals/index.js +62 -6
  32. package/dist/environment/custom-types.d.ts +33 -0
  33. package/dist/environment/custom-types.d.ts.map +1 -0
  34. package/dist/environment/custom-types.js +12 -0
  35. package/dist/environment/derived-variables.d.ts +134 -0
  36. package/dist/environment/derived-variables.d.ts.map +1 -0
  37. package/dist/environment/derived-variables.js +169 -0
  38. package/dist/environment/editor-questions.d.ts +4 -0
  39. package/dist/environment/editor-questions.d.ts.map +1 -0
  40. package/dist/environment/editor-questions.js +67 -0
  41. package/dist/environment/git.d.ts +5 -0
  42. package/dist/environment/git.d.ts.map +1 -0
  43. package/dist/environment/git.js +38 -0
  44. package/dist/environment/github.d.ts +26 -0
  45. package/dist/environment/github.d.ts.map +1 -0
  46. package/dist/environment/github.js +247 -0
  47. package/dist/environment/index.d.ts +5 -0
  48. package/dist/environment/index.d.ts.map +1 -0
  49. package/dist/environment/index.js +71 -0
  50. package/dist/environment/logger.d.ts +15 -0
  51. package/dist/environment/logger.d.ts.map +1 -0
  52. package/dist/environment/logger.js +25 -0
  53. package/dist/environment/manage-users.d.ts +11 -0
  54. package/dist/environment/manage-users.d.ts.map +1 -0
  55. package/dist/environment/manage-users.js +497 -0
  56. package/dist/environment/questions-helper.d.ts +15 -0
  57. package/dist/environment/questions-helper.d.ts.map +1 -0
  58. package/dist/environment/questions-helper.js +70 -0
  59. package/dist/environment/questions.d.ts +199 -0
  60. package/dist/environment/questions.d.ts.map +1 -0
  61. package/dist/environment/questions.js +412 -0
  62. package/dist/environment/setup-environment.d.ts +2 -0
  63. package/dist/environment/setup-environment.d.ts.map +1 -0
  64. package/dist/environment/setup-environment.js +794 -0
  65. package/dist/environment/ssh-keygen.d.ts +5 -0
  66. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  67. package/dist/environment/ssh-keygen.js +21 -0
  68. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  69. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  70. package/dist/environment/swarm-to-k8s.js +173 -0
  71. package/dist/environment/templates.d.ts +27 -0
  72. package/dist/environment/templates.d.ts.map +1 -0
  73. package/dist/environment/templates.js +163 -0
  74. package/dist/environment/update-workflows.d.ts +2 -0
  75. package/dist/environment/update-workflows.d.ts.map +1 -0
  76. package/dist/environment/update-workflows.js +169 -0
  77. package/dist/environment/users.d.ts +2 -0
  78. package/dist/environment/users.d.ts.map +1 -0
  79. package/dist/environment/users.js +112 -0
  80. package/dist/environment/utils.d.ts +18 -0
  81. package/dist/environment/utils.d.ts.map +1 -0
  82. package/dist/environment/utils.js +100 -0
  83. package/dist/events/index.js +817 -147
  84. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  85. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  86. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  87. package/dist/migrations/v2.0/index.js +20 -9
  88. package/dist/notification/index.js +628 -45
  89. package/dist/scopes/index.d.ts +93 -7
  90. package/dist/scopes/index.js +19 -8
  91. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  92. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  93. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  94. package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
  95. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  96. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  97. package/dist/templates/inventory/inventory.template.yml +100 -0
  98. package/dist/templates/inventory/production.example.yml +77 -0
  99. package/dist/templates/inventory/qa.example.yml +48 -0
  100. package/opencrvs-toolkit-2.0.0-rc.e290634.tgz +0 -0
  101. package/package.json +16 -2
  102. package/tsconfig.tsbuildinfo +1 -1
  103. package/opencrvs-toolkit-2.0.0-rc.e260b0b.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";
@@ -580,14 +660,12 @@ export type EncodedScope = z.infer<typeof EncodedScope>;
580
660
  */
581
661
  export declare const encodeScope: (scope: Scope) => EncodedScope;
582
662
  /**
583
- * Converts a scope object into an encoded query string representation.
663
+ * Converts an encoded scope string into a scope object.
584
664
  *
585
- * @TODO scope param could be defined as EncodedScope instead of string.
586
- *
587
- * @param scope - The scope object to encode.
588
- * @returns The encoded scope as a branded string (`EncodedScope`).
665
+ * @param scope - The encoded scope string to decode.
666
+ * @returns The decoded scope object.
589
667
  */
590
- export declare const decodeScope: (query: EncodedScope) => {
668
+ export declare const decodeScope: (encodedScope: EncodedScope) => {
591
669
  type: "record.create" | "record.declare" | "record.notify";
592
670
  options?: {
593
671
  event?: string[] | undefined;
@@ -598,6 +676,8 @@ export declare const decodeScope: (query: EncodedScope) => {
598
676
  options?: {
599
677
  event?: string[] | undefined;
600
678
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
679
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
680
+ notifiedBy?: "user" | undefined;
601
681
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
602
682
  declaredBy?: "user" | undefined;
603
683
  } | undefined;
@@ -606,6 +686,8 @@ export declare const decodeScope: (query: EncodedScope) => {
606
686
  options?: {
607
687
  event?: string[] | undefined;
608
688
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
689
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
690
+ notifiedBy?: "user" | undefined;
609
691
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
610
692
  declaredBy?: "user" | undefined;
611
693
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -616,6 +698,8 @@ export declare const decodeScope: (query: EncodedScope) => {
616
698
  options?: {
617
699
  event?: string[] | undefined;
618
700
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
701
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
702
+ notifiedBy?: "user" | undefined;
619
703
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
620
704
  declaredBy?: "user" | undefined;
621
705
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -627,6 +711,8 @@ export declare const decodeScope: (query: EncodedScope) => {
627
711
  options?: {
628
712
  event?: string[] | undefined;
629
713
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
714
+ notifiedIn?: "administrativeArea" | "location" | "all" | undefined;
715
+ notifiedBy?: "user" | undefined;
630
716
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
631
717
  declaredBy?: "user" | undefined;
632
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,
@@ -354,20 +358,27 @@ var encodeScope = (scope) => {
354
358
  encode: false
355
359
  });
356
360
  };
357
- var decodeScope = (query) => {
358
- const scope = qs.parse(query, {
361
+ var decodedScopeCache = /* @__PURE__ */ new Map();
362
+ var decodeScope = (encodedScope) => {
363
+ if (decodedScopeCache.has(encodedScope)) {
364
+ return decodedScopeCache.get(encodedScope);
365
+ }
366
+ const scope = qs.parse(encodedScope, {
359
367
  ignoreQueryPrefix: true,
360
368
  comma: true,
361
369
  allowDots: true
362
370
  });
363
371
  const unflattenedScope = unflattenScope(scope);
364
- return Scope2.safeParse(unflattenedScope)?.data;
372
+ const result = Scope2.safeParse(unflattenedScope)?.data;
373
+ decodedScopeCache.set(encodedScope, result);
374
+ return result;
365
375
  };
366
376
  var DEFAULT_SCOPE_OPTIONS = {
367
377
  placeOfEvent: JurisdictionFilter.enum.all,
368
378
  accessLevel: JurisdictionFilter.enum.all,
369
- registeredIn: JurisdictionFilter.enum.all,
370
- declaredIn: JurisdictionFilter.enum.all
379
+ notifiedIn: JurisdictionFilter.enum.all,
380
+ declaredIn: JurisdictionFilter.enum.all,
381
+ registeredIn: JurisdictionFilter.enum.all
371
382
  };
372
383
  function getScopeOptionValue(scope, option) {
373
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