@leverege/build-tools 2.96.8 → 2.97.0

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 (90) hide show
  1. package/.vscode/launch.json +21 -1
  2. package/package.json +10 -10
  3. package/src/Utils.mjs +6 -1
  4. package/src/artifacts/Utils.mjs +5 -2
  5. package/src/build-cnpg-image.mjs +0 -1
  6. package/src/chart-compass.yaml +1 -1
  7. package/src/chart-to-registry.mjs +10 -1
  8. package/src/helm-charts/api-server/values-local.yaml +3 -0
  9. package/src/helm-charts/cnpg-db-psql-stack/cluster.yaml.ovh +37 -32
  10. package/src/helm-charts/cnpg-db-psql-stack/pooler.yaml +2 -0
  11. package/src/helm-charts/cnpg-db-recovery/cluster.yaml.ovh +1 -1
  12. package/src/helm-charts/cnpg-db-tsdb-basic/cluster.yaml.ovh +50 -46
  13. package/src/helm-charts/cnpg-db-tsdb-basic/pooler.yaml +2 -0
  14. package/src/helm-charts/cnpg-db-tsdb-dense/cluster.yaml.ovh +55 -47
  15. package/src/helm-charts/cnpg-db-tsdb-dense/pooler.yaml +2 -0
  16. package/src/helm-charts/cnpg-operator/helmup.bootstrap +8 -0
  17. package/src/helm-charts/cnpg-operator/helmup.plugin +29 -4
  18. package/src/helm-charts/db-curator/values-local.yaml +9 -1
  19. package/src/helm-charts/elasticsearch8/elasticsearch-local.yaml +54 -51
  20. package/src/helm-charts/emailer/values-local.yaml +4 -1
  21. package/src/helm-charts/messenger/values-local.yaml +1 -5
  22. package/src/helm-charts/pgbouncer/values-local.yaml +8 -3
  23. package/src/helm-charts/prom-operator/helmup.bootstrap +8 -5
  24. package/src/helm-charts/prom-operator/helmup.plugin +1 -1
  25. package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +51 -11
  26. package/src/helm-charts/prom-operator/rules/elasticsearch-rules.yaml +1 -1
  27. package/src/helm-charts/prom-operator/rules/kubestate-rules.yaml +1 -1
  28. package/src/helm-charts/push-notifier/values-local.yaml +8 -0
  29. package/src/helm-charts/redis/values-local.yaml +2 -1
  30. package/src/helm-charts/traefik/values-local.yaml +1 -1
  31. package/src/helm-charts/transponder-dh/values-local.yaml +1 -0
  32. package/src/helm-charts/transponder-tsdb/values-local.yaml +1 -0
  33. package/src/helm-charts/velero/helmup.plugin +2 -2
  34. package/src/helm-charts/velero/values-local.yaml +17 -15
  35. package/src/helmdn.sh +1 -1
  36. package/src/helmup.sh +3 -3
  37. package/src/init-my-chart/Chartwright.mjs +69 -0
  38. package/src/init-my-chart/init-my-chart-v1.mjs +124 -0
  39. package/src/init-my-chart/init-my-chart.mjs +80 -0
  40. package/src/init-my-chart/leaf-chart-templates/Chart.yaml.hbs +10 -0
  41. package/src/init-my-chart/leaf-chart-templates/templates/configmap.yaml +1 -0
  42. package/src/init-my-chart/leaf-chart-templates/templates/deployment.yaml +1 -0
  43. package/src/init-my-chart/leaf-chart-templates/templates/hpa.yaml +1 -0
  44. package/src/init-my-chart/leaf-chart-templates/templates/pdb.yaml +1 -0
  45. package/src/init-my-chart/leaf-chart-templates/templates/service.yaml +1 -0
  46. package/src/init-my-chart/leaf-chart-templates/templates/serviceaccount.yaml +1 -0
  47. package/src/init-my-chart/leaf-chart-templates/templates/servicemonitor.yaml +1 -0
  48. package/src/init-my-chart/leaf-chart-templates/values.schema.json +623 -0
  49. package/src/init-my-chart/leaf-chart-templates/values.yaml.hbs +135 -0
  50. package/src/init-my-chart/legacy-helm-template/Chart.yaml +5 -0
  51. package/src/init-my-chart/legacy-helm-template/templates/NOTES.txt +5 -0
  52. package/src/init-my-chart/legacy-helm-template/templates/_helpers.tpl +135 -0
  53. package/src/init-my-chart/legacy-helm-template/templates/configmap.yaml +10 -0
  54. package/src/init-my-chart/legacy-helm-template/templates/deployment.yaml +125 -0
  55. package/src/init-my-chart/legacy-helm-template/templates/hpa.yaml +26 -0
  56. package/src/init-my-chart/legacy-helm-template/templates/ingressroute.yaml +18 -0
  57. package/src/init-my-chart/legacy-helm-template/templates/pdb.yaml +22 -0
  58. package/src/init-my-chart/legacy-helm-template/templates/service.yaml +15 -0
  59. package/src/init-my-chart/legacy-helm-template/templates/serviceaccount.yaml +13 -0
  60. package/src/init-my-chart/legacy-helm-template/templates/servicemonitor.yaml +23 -0
  61. package/src/init-my-chart/legacy-helm-template/values.yaml +152 -0
  62. package/src/testOauthLogic.mjs +12 -0
  63. package/leverege-build-tools-2.21.13.tgz +0 -0
  64. package/lib/server/build-tools.js +0 -138
  65. package/lib/server/firebaseDeploy.js +0 -195
  66. package/lib/server/firebaseServe.js +0 -116
  67. package/lib/server/getfbcfg.js +0 -25
  68. package/lib/server/getjson.js +0 -70
  69. package/lib/server/overwhelm.js +0 -447
  70. package/lib/server/push-my-chart.js +0 -18
  71. package/lib/server/refresh-npm-token.js +0 -135
  72. package/lib/server/tag-release.js +0 -681
  73. package/lib/server/unleash.js +0 -50
  74. package/lib/web/build-tools.js +0 -138
  75. package/lib/web/firebaseDeploy.js +0 -195
  76. package/lib/web/firebaseServe.js +0 -116
  77. package/lib/web/getfbcfg.js +0 -25
  78. package/lib/web/getjson.js +0 -70
  79. package/lib/web/overwhelm.js +0 -447
  80. package/lib/web/push-my-chart.js +0 -18
  81. package/lib/web/refresh-npm-token.js +0 -135
  82. package/lib/web/tag-release.js +0 -681
  83. package/lib/web/unleash.js +0 -50
  84. package/src/helm-charts/prom-operator/rules/awesome-base/elasticsearch-rules.yaml +0 -219
  85. package/src/helm-charts/prom-operator/rules/awesome-base/google-cadvisor.yaml +0 -108
  86. package/src/helm-charts/prom-operator/rules/awesome-base/kubestate-exporter.yaml +0 -394
  87. package/src/helm-charts/prom-operator/rules/awesome-base/prometheus-rules.yaml +0 -318
  88. package/src/helm-charts/prom-operator/rules/awesome-base/redis-rules.yaml +0 -142
  89. package/src/helm-charts/prom-operator/rules/awesome-base/traefik-rules.yaml +0 -43
  90. package/src/init-my-chart.mjs +0 -18
@@ -2,12 +2,37 @@
2
2
  #
3
3
  # See => https://cloudnative-pg.io/documentation/current/installation_upgrade/
4
4
  #
5
- OPVER="1.26.1" # 07/29/2025
6
-
7
- createNamespaceIfNeeded cnpg-system
5
+ OPVER="1.26.1" # 10/08/2025
6
+ BARMAN_VER="0.11.0"
8
7
 
8
+ # --- CNPG operator ---
9
9
  kubectl apply --server-side -f \
10
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-${OPVER%.*}/releases/cnpg-${OPVER}.yaml $K8S_WHAT
10
+ "https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-${OPVER%.*}/releases/cnpg-${OPVER}.yaml" \
11
+ ${K8S_WHAT:-}
12
+
13
+ kubectl rollout status deployment -n cnpg-system cnpg-controller-manager
14
+
15
+ # --- barman plugin ---
16
+ kubectl apply -f \
17
+ "https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v${BARMAN_VER}/manifest.yaml"
18
+
19
+ kubectl rollout status deployment -n cnpg-system barman-cloud
20
+
21
+ cat<<BARMAN_OBJECT_STORE | kubectl apply -f -
22
+ apiVersion: barmancloud.cnpg.io/v1
23
+ kind: ObjectStore
24
+ metadata:
25
+ name: cnpg-stack-gcs
26
+ namespace: cnpg-operands
27
+ spec:
28
+ configuration:
29
+ destinationPath: gs://${GCP_PROJECT_ID}-barman
30
+ googleCredentials:
31
+ gkeEnvironment: true
32
+ wal:
33
+ compression: gzip
34
+ maxParallel: 4
35
+ BARMAN_OBJECT_STORE
11
36
 
12
37
  # NOTE: installing release candidates may reference something that looks like:
13
38
  #
@@ -4,4 +4,12 @@ image:
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
6
  FIREBASE_CLEANUP_ENABLED: "true"
7
- TSDB_CLEANUP_ENABLED: "false"
7
+ TSDB_CLEANUP_ENABLED: "false" # no need on cnpg
8
+
9
+ resources:
10
+ limits:
11
+ cpu: 1500m
12
+ memory: 4Gi
13
+ requests:
14
+ cpu: 250m
15
+ memory: 1Gi
@@ -30,13 +30,31 @@ global:
30
30
  fullnameOverride: "elasticsearch8"
31
31
  namespaceOverride: "elastic"
32
32
 
33
- coordinating:
34
- replicaCount: 3
35
- # resources: # default from bitnami chart
36
- # limits: {}
37
- # requests:
38
- # cpu: 25m
39
- # memory: 256Mi
33
+ # This initScript is used for modifying the log settings of the ES pods. The
34
+ # default setting logs at trace with 64M log files via this line in th JVM
35
+ # options file:
36
+ #
37
+ # -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,level,pid,tags:filecount=32,filesize=64m
38
+ #
39
+ # The two sed commands will morph the log settings to disable trace and reduce
40
+ # the number and size of logs kept by a pod. These settings apply to all ES
41
+ # node flavors (data,coord,ingest,master).
42
+ #
43
+ initScripts:
44
+ 01-fix-gc-logging.sh: |
45
+ #!/bin/bash
46
+ set -euo pipefail
47
+ JVM="/opt/bitnami/elasticsearch/config/jvm.options"
48
+ if [ -w "$JVM" ]; then
49
+ # remove the noisy trace age logging, keep rotation
50
+ sed -i 's/gc+age=trace,//' "$JVM"
51
+ # optionally reduce retention
52
+ sed -i 's/filecount=32,filesize=64m/filecount=8,filesize=32m/' "$JVM"
53
+ fi
54
+
55
+ # Lets set affinityt/tolerations in one spot with a YAML anchor
56
+ #
57
+ x-esSchduling: &esScheduling
40
58
  affinity:
41
59
  nodeAffinity:
42
60
  requiredDuringSchedulingIgnoredDuringExecution:
@@ -44,15 +62,30 @@ coordinating:
44
62
  - matchExpressions:
45
63
  - key: target-env
46
64
  operator: In
47
- values:
48
- - database
65
+ values: ["database"]
49
66
  tolerations:
50
67
  - key: "database"
51
68
  operator: "Equal"
52
69
  value: "true"
53
70
  effect: "NoSchedule"
54
71
 
72
+ # coord nodes needed a heapSize and memory boost
73
+ coordinating:
74
+ <<: *esScheduling
75
+ replicaCount: 3
76
+ heapSize: 384m
77
+ resources:
78
+ limits:
79
+ cpu: 750m
80
+ memory: 2Gi
81
+ ephemeral-storage: 2Gi
82
+ requests:
83
+ cpu: 500m
84
+ memory: 512Mi
85
+ ephemeral-storage: 50Mi
86
+
55
87
  data:
88
+ <<: *esScheduling
56
89
  replicaCount: 3
57
90
  resources:
58
91
  limits:
@@ -66,40 +99,24 @@ data:
66
99
  persistence:
67
100
  enabled: true
68
101
  size: 64Gi
69
- affinity:
70
- nodeAffinity:
71
- requiredDuringSchedulingIgnoredDuringExecution:
72
- nodeSelectorTerms:
73
- - matchExpressions:
74
- - key: target-env
75
- operator: In
76
- values:
77
- - database
78
- tolerations:
79
- - key: "database"
80
- operator: "Equal"
81
- value: "true"
82
- effect: "NoSchedule"
83
102
 
84
103
  ingest:
104
+ <<: *esScheduling
85
105
  replicaCount: 3
106
+ #resourcesPreset: "medium"
107
+ resources:
108
+ limits:
109
+ cpu: 750m
110
+ ephemeral-storage: 4Gi
111
+ memory: 1536Mi
112
+ requests:
113
+ cpu: 500m
114
+ ephemeral-storage: 100Mi
115
+ memory: 1024Mi
86
116
  # no default resources specified
87
- affinity:
88
- nodeAffinity:
89
- requiredDuringSchedulingIgnoredDuringExecution:
90
- nodeSelectorTerms:
91
- - matchExpressions:
92
- - key: target-env
93
- operator: In
94
- values:
95
- - database
96
- tolerations:
97
- - key: "database"
98
- operator: "Equal"
99
- value: "true"
100
- effect: "NoSchedule"
101
117
 
102
118
  master:
119
+ <<: *esScheduling
103
120
  replicaCount: 3
104
121
  # resources: # example from the bitnami chart
105
122
  # ## Example:
@@ -112,17 +129,3 @@ master:
112
129
  # ## cpu: 250m
113
130
  # ## memory: 256Mi
114
131
  # requests: {}
115
- affinity:
116
- nodeAffinity:
117
- requiredDuringSchedulingIgnoredDuringExecution:
118
- nodeSelectorTerms:
119
- - matchExpressions:
120
- - key: target-env
121
- operator: In
122
- values:
123
- - database
124
- tolerations:
125
- - key: "database"
126
- operator: "Equal"
127
- value: "true"
128
- effect: "NoSchedule"
@@ -1,5 +1,8 @@
1
1
  image:
2
- tag: # v5.1.0
2
+ tag:
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
+
7
+ # necessary to expand the overwhelm.yaml setting into the env
8
+ MAIL_GUN_DOMAIN: "${MAIL_GUN_DOMAIN}"
@@ -1,9 +1,5 @@
1
1
  image:
2
- tag: # v2.16.0
2
+ tag:
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
- API_UI_URL: "${PROJECT_ID}.web.app"
7
-
8
- serviceMonitor:
9
- enabled: true
@@ -1,6 +1,6 @@
1
1
  # pgbouncer.values.yaml - https://artifacthub.io/packages/helm/icoretech/pgbouncer
2
2
 
3
- replicaCount: 1
3
+ replicaCount: 2
4
4
 
5
5
  config:
6
6
  existingAdminSecret: "pgbouncer-admin"
@@ -23,16 +23,21 @@ config:
23
23
  log_disconnections: "0"
24
24
  verbose: "0"
25
25
  databases:
26
- scheduler:
26
+ authz:
27
27
  host: postgres-postgresql
28
28
  port: 5432
29
- dbname: scheduler
29
+ dbname: authz
30
30
  user: postgres
31
31
  models:
32
32
  host: postgres-postgresql
33
33
  port: 5432
34
34
  dbname: models
35
35
  user: postgres
36
+ scheduler:
37
+ host: postgres-postgresql
38
+ port: 5432
39
+ dbname: scheduler
40
+ user: postgres
36
41
 
37
42
  service:
38
43
  port: 8432
@@ -1,5 +1,7 @@
1
1
  #!/bin/bash
2
2
 
3
+ # DEVNULL="/dev/stdout"
4
+
3
5
  # This function came from the helmup.sh script and is used to install the
4
6
  # stackdriver exporter in the prometheus or monitoring (legacy) namespace.
5
7
  # This function only needs to execute once, at initial setup / configuration.
@@ -7,7 +9,7 @@ function installStackdriverExporterEnvironment() {
7
9
  showInstalling "Stackdriver Exporter Service Account Binding"
8
10
 
9
11
  # Add necessary helm repositories - note that stable is deprecated
10
- addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
12
+ # addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
11
13
 
12
14
  local SDEXP_NS=${1:-prometheus}
13
15
  local SDEXP_SA="stackdriver-exporter"
@@ -17,10 +19,11 @@ function installStackdriverExporterEnvironment() {
17
19
 
18
20
  # guarantee any previous remnants of the exporter are gone
19
21
  printf "\n*** Removing the previous $SDEXP_SA installation...\n"
20
- helm uninstall -n $SDEXP_NS $SDEXP_SA &> $DEVNULL
22
+ helm uninstall -n $SDEXP_NS "stackdriver-exporter" &> $DEVNULL
21
23
  kubectl delete serviceaccounts -n $SDEXP_NS $SDEXP_SA &> $DEVNULL
22
- printf "!!! Skipping deletion of the gcloud SA $SDEXP_EM\n"
23
- # gcloud --quiet iam service-accounts delete $SDEXP_EM &> $DEVNULL
24
+ printf "*** Deleting the gcloud SA $SDEXP_EM\n"
25
+ # gcloud --quiet iam service-accounts delete $SDEXP_EM \
26
+ # --project $GCP_PROJECT_ID &> $DEVNULL
24
27
 
25
28
  # NOTE: The k8s SA != GCP SA - the former is created by the helm chart
26
29
  # that installs the stackdriver-exporter, the latter is handled here in
@@ -43,7 +46,7 @@ function installStackdriverExporterEnvironment() {
43
46
 
44
47
  bindWorkloadIdentity $SDEXP_SA $SDEXP_NS
45
48
 
46
- removeHelmRepo prometheus-community
49
+ # removeHelmRepo prometheus-community
47
50
  }
48
51
 
49
52
  installStackdriverExporterEnvironment
@@ -8,7 +8,7 @@ showInstalling "The Prometheus Operator (kube-prometheus-stack)"
8
8
 
9
9
  # https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
10
10
  OCI_CHART="oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack"
11
- [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="80.11.0"
11
+ [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="82.1.0"
12
12
  helm upgrade $NS --install prometheus-stack $OCI_CHART \
13
13
  --values prom-operator/prometheus-stack.yaml \
14
14
  --version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
@@ -44,7 +44,7 @@ crds:
44
44
  enabled: true
45
45
  upgradeJob:
46
46
  enabled: true
47
- forceConflicts: false # See README-CRD-UPGRADES.md
47
+ forceConflicts: true # See README-CRD-UPGRADES.md
48
48
 
49
49
  kubeControllerManager:
50
50
  enabled: false
@@ -216,6 +216,9 @@ alertmanager:
216
216
  type: Recreate
217
217
 
218
218
  config:
219
+ global:
220
+ resolve_timeout: 5m
221
+
219
222
  receivers:
220
223
  - name: slack
221
224
  slack_configs:
@@ -273,6 +276,7 @@ alertmanager:
273
276
  {{- end }}
274
277
  ---
275
278
  {{ end }}
279
+
276
280
  - name: slack-watchdog
277
281
  slack_configs:
278
282
  - channel: "#dead-mans-snitch_notifications"
@@ -287,6 +291,7 @@ alertmanager:
287
291
  *Description:* {{ .Annotations.description }}
288
292
  *Dashboard:* {{ .Annotations.dashboard }}
289
293
  {{ end }}
294
+
290
295
  - name: opsgenie
291
296
  opsgenie_configs:
292
297
  - api_key: "${OPSGENIE_APIKEY}"
@@ -298,27 +303,62 @@ alertmanager:
298
303
  *Description:* {{ .Annotations.description }}
299
304
  *Dashboard:* {{ .Annotations.dashboard }}
300
305
  {{ end }}
306
+
301
307
  - name: discard
302
308
 
309
+ inhibit_rules:
310
+ # Any warning/critical/page suppresses info in the same namespace
311
+ - source_matchers:
312
+ - severity=~"warning|critical|page"
313
+ target_matchers:
314
+ - severity="info"
315
+ equal:
316
+ - namespace
317
+
318
+ # critical/page suppresses warning for the same alert in the same namespace
319
+ - source_matchers:
320
+ - severity=~"critical|page"
321
+ target_matchers:
322
+ - severity="warning"
323
+ equal:
324
+ - namespace
325
+ - alertname
326
+
303
327
  route:
328
+ receiver: slack # default for everything
329
+ group_by: ["alertname", "namespace"]
304
330
  group_wait: 30s
305
331
  group_interval: 5m
306
- group_by:
307
- - alertname
308
- - namespace
309
- receiver: slack # default for everything
332
+ repeat_interval: 6h
333
+
310
334
  routes:
311
- - matchers:
312
- - severity="page" # 📢 paging DevOps
313
- receiver: opsgenie
314
- continue: true # 👈 KEEP GOING after this match
315
335
 
336
+ # ─────────────────────────────────────────────
337
+ # INTERNAL / MECHANISM ALERTS
338
+ # ─────────────────────────────────────────────
316
339
  - matchers:
317
- - namespace=~"kube-system|gmp-system" # 🙈 ignore these alerts - GKE will handle them
340
+ - alertname="InfoInhibitor"
318
341
  receiver: discard
319
342
 
320
343
  - matchers:
321
344
  - alertname="Watchdog"
322
345
  receiver: slack-watchdog
323
346
 
324
- repeat_interval: 6h
347
+ - matchers:
348
+ - severity="info"
349
+ receiver: discard
350
+
351
+ # ─────────────────────────────────────────────
352
+ # 🙈 IGNORE SYSTEM NAMESPACES - GKE will handle
353
+ # ─────────────────────────────────────────────
354
+ - matchers:
355
+ - namespace=~"kube-system|gmp-system"
356
+ receiver: discard
357
+
358
+ # ─────────────────────────────────────────────
359
+ # PAGE-LEVEL ALERTS
360
+ # ─────────────────────────────────────────────
361
+ - matchers:
362
+ - severity="page" # 📢 paging DevOps
363
+ receiver: opsgenie
364
+ continue: true # 👈 KEEP GOING to slack
@@ -203,7 +203,7 @@ spec:
203
203
  VALUE = {{ $value }}
204
204
  LABELS = {{ $labels }}
205
205
  - alert: ElasticsearchHighQueryRate
206
- expr: sum(rate(elasticsearch_indices_search_query_total[1m])) > 100
206
+ expr: sum(rate(elasticsearch_indices_search_query_total[1m])) > 150
207
207
  for: 5m
208
208
  labels:
209
209
  severity: warning
@@ -43,7 +43,7 @@ spec:
43
43
  LABELS = {{ $labels }}
44
44
  - alert: KubernetesNodeNetworkUnavailable
45
45
  expr: kube_node_status_condition{condition="NetworkUnavailable",status="true"} == 1
46
- for: 5m # awesome was => 2m
46
+ for: 10m # awesome was => 2m
47
47
  labels:
48
48
  severity: critical
49
49
  annotations:
@@ -0,0 +1,8 @@
1
+ image:
2
+ tag:
3
+
4
+ config:
5
+ LOG_CONFIG: '{"type":"pino","level":"debug"}'
6
+
7
+ serviceMonitor:
8
+ enabled: true
@@ -42,6 +42,8 @@ master:
42
42
  # cpu: 250m
43
43
  # memory: 500Mi
44
44
 
45
+ architecture: standalone # replication or standalone
46
+
45
47
  replica:
46
48
  replicaCount: 1
47
49
  affinity:
@@ -69,7 +71,6 @@ replica:
69
71
  # requests:
70
72
  # cpu: 250m
71
73
  # memory: 500Mi
72
- architecture: replication
73
74
 
74
75
  sentinel:
75
76
  enabled: false
@@ -28,7 +28,7 @@ resources:
28
28
  metrics:
29
29
  prometheus:
30
30
  serviceMonitor:
31
- enabled: false # initially disabled until prometheus operator is installed
31
+ enabled: true # initially disabled until prometheus operator is installed
32
32
  interval: 30s
33
33
  namespace: prometheus
34
34
 
@@ -12,6 +12,7 @@ config:
12
12
 
13
13
  PG_HOST: "cnpg-db-tsdb-dense-rw.cnpg-operands"
14
14
  # PG_HOST: "cnpg-db-tsdb-dense-pool-rw.cnpg-operands"
15
+ # PG_DATABASE: "timescale" # "imagine" is legacy and default
15
16
 
16
17
  # password from secret
17
18
  PG_PASSWORD_SECRET: "cnpg-db-tsdb-dense-postgres-pw"
@@ -15,6 +15,7 @@ config:
15
15
 
16
16
  # CNPG override
17
17
  PG_HOST: "cnpg-db-tsdb-basic-rw.cnpg-operands"
18
+ # PG_DATABASE: "timescale" # "imagine" is legacy and default
18
19
 
19
20
  PG_PASSWORD_SECRET: "cnpg-db-tsdb-basic-postgres-pw"
20
21
  PG_PASSWORD_KEY: "password"
@@ -5,8 +5,8 @@ showInstalling "Velero Backup System"
5
5
  # We use a specific version for the velero chart because we need to control
6
6
  # the version of the locally installed velero client application.
7
7
  #
8
- VELERO_CHART_VERSION="11.3.1"
9
- EXPECTED_CLIENT_VERSION="v1.17.1"
8
+ VELERO_CHART_VERSION="11.3.2"
9
+ EXPECTED_CLIENT_VERSION="v1.17.2"
10
10
 
11
11
  addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
12
12
 
@@ -2,6 +2,7 @@
2
2
  # Backup schedules to create.
3
3
  #
4
4
  schedules:
5
+ # CNPG base clusters
5
6
  cnpg-psql:
6
7
  disabled: true
7
8
  schedule: "0 7 * * *"
@@ -35,6 +36,7 @@ schedules:
35
36
  cnpg.io/cluster: "cnpg-db-tsdb-dense"
36
37
  cnpg.io/instanceRole: "primary"
37
38
 
39
+ # Legacy PSQL databases
38
40
  psql: # legacy non-cnpg
39
41
  disabled: false
40
42
  schedule: "0 7 * * *"
@@ -47,6 +49,17 @@ schedules:
47
49
  app.kubernetes.io/name: "postgresql"
48
50
  role: "primary"
49
51
 
52
+ tsdb: # legacy non-cnpg
53
+ disabled: false
54
+ schedule: "0 8 * * *"
55
+ template:
56
+ ttl: "720h"
57
+ snapshotVolumes: true
58
+ labelSelector:
59
+ matchLabels:
60
+ release: "timescale-db"
61
+ app: "postgresql"
62
+
50
63
  psql-scheduler: # legacy non-cnpg
51
64
  disabled: true # enable on recovr
52
65
  schedule: "0 7 * * *"
@@ -69,17 +82,6 @@ schedules:
69
82
  matchLabels:
70
83
  app.kubernetes.io/name: elasticsearch
71
84
 
72
- tsdb: # legacy non-cnpg
73
- disabled: false
74
- schedule: "0 8 * * *"
75
- template:
76
- ttl: "720h"
77
- snapshotVolumes: true
78
- labelSelector:
79
- matchLabels:
80
- release: "timescale-db"
81
- app: "postgresql"
82
-
83
85
  full:
84
86
  disabled: false
85
87
  schedule: "0 11 * * *"
@@ -102,12 +104,12 @@ schedules:
102
104
  # Resource requests/limits to specify for the Velero deployment.
103
105
  # https://velero.io/docs/v1.6/customize-installation/#customize-resource-requests-and-limits
104
106
  resources:
105
- requests:
106
- cpu: 250m
107
- memory: 128Mi
108
107
  limits:
109
- cpu: 750m
108
+ cpu: 900m
110
109
  memory: 256Mi
110
+ requests:
111
+ cpu: 500m
112
+ memory: 128Mi
111
113
 
112
114
  # Annotations to add to the Velero deployment's. Optional.
113
115
  #
package/src/helmdn.sh CHANGED
@@ -65,7 +65,7 @@ function annihilateMonitoring() {
65
65
  # gcloud iam service-accounts delete stackdriver-exporter@${GCP_PROJECT_ID}.iam.gserviceaccount.com --quiet
66
66
 
67
67
  # kube-state-metrics?
68
- helm uninstall -n monitoring grafana prometheus stackdriver-exporter elasticsearch-exporter
68
+ helm uninstall -n monitoring grafana prometheus stackdriver-exporter elasticsearch-exporter elasticsearch8-exporter
69
69
  # helm ls --all-namespaces
70
70
  }
71
71
 
package/src/helmup.sh CHANGED
@@ -586,6 +586,7 @@ SERVICE=
586
586
  CHARTLOC=
587
587
  CHARTVER=
588
588
  FROM_VERSIONS=
589
+
589
590
  function doInstall() {
590
591
 
591
592
  helm repo update &> $DEVNULL
@@ -758,15 +759,14 @@ NOTRUNNING
758
759
 
759
760
  # ---------- helmup MAIN ----------
760
761
  GITTOP=`git rev-parse --show-toplevel`
761
- K8S_UTILS="${GITTOP}/k8s-utils"
762
762
 
763
763
  overwhelm
764
764
  [ $? -ne 0 ] && printf "\n\n***Aborting helmup...\n\n" && exit 1
765
765
 
766
766
  # The project id is used in a lot of places so just set it here
767
- GCP_PROJECT_ID="$(getProjectIdFromK8sContext)"
767
+ export GCP_PROJECT_ID="$(getProjectIdFromK8sContext)"
768
768
  # Same for the region, but not as prevalent
769
- GCE_REGION=`overwhelm -k GCE_REGION`
769
+ export GCE_REGION=`overwhelm -k GCE_REGION`
770
770
 
771
771
  doInstall $@
772
772
 
@@ -0,0 +1,69 @@
1
+ // Chartwright.mjs
2
+ import * as Utils from '../Utils.mjs'
3
+
4
+ import {
5
+ BUILD_TOOLS_ROOT,
6
+ } from '../Utils.mjs'
7
+
8
+ const DEFAULT_LIVENESS = {
9
+ httpGet : {
10
+ path : '/livenessProbe',
11
+ port : 'http'
12
+ },
13
+ initialDelaySeconds : 30,
14
+ periodSeconds : 60
15
+ }
16
+ const DEFAULT_READINESS = {
17
+ httpGet : {
18
+ path : '/healthz',
19
+ port : 'http'
20
+ },
21
+ initialDelaySeconds : 30,
22
+ periodSeconds : 10
23
+ }
24
+
25
+ export class Chartwright {
26
+ constructor( { cwd = process.cwd(), debug = false } = {} ) {
27
+ this.cwd = cwd
28
+ this.chartTemplate = `${BUILD_TOOLS_ROOT}/init-my-chart/leaf-chart-templates`
29
+ this.debug = debug
30
+
31
+ this.pkg = null
32
+ this.existingChart = null
33
+ }
34
+
35
+ async init() {
36
+ this.pkg = await Utils.parsePackageJson( { cwd : this.cwd } )
37
+ this.existingChart = await Utils.parseHelmChart( )
38
+ return this
39
+ }
40
+
41
+ analyze() {
42
+ return {
43
+ serviceName : this.pkg?.name,
44
+ hasExistingChart : !!this.existingChart,
45
+ templateLoaded : !!this.templateChart
46
+ }
47
+ }
48
+
49
+ bootstrap() {
50
+ // TODO: create new chart from template
51
+ }
52
+
53
+ morph() {
54
+ // TODO: transform existing chart to new base structure
55
+ }
56
+
57
+ async scribe() {
58
+ // TODO: write resulting chart to disk
59
+ }
60
+
61
+ dump() {
62
+ if ( !this.debug ) return
63
+ console.dir( {
64
+ pkg : this.pkg,
65
+ existingChart : this.existingChart,
66
+ templateChart : this.templateChart
67
+ }, { depth : 4 } )
68
+ }
69
+ }