@leverege/build-tools 2.63.2 → 2.63.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.63.2",
3
+ "version": "2.63.3",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -4,20 +4,20 @@ metadata:
4
4
  name: cnpg-db-psql-stack
5
5
  namespace: cnpg-operands
6
6
  spec:
7
+ # https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-ClusterSpec
7
8
  instances: 1
8
9
  logLevel: info # warning debug
9
10
 
10
11
  monitoring:
11
12
  enablePodMonitor: false # set true once monitoring is setup
12
13
 
13
- description: "Leverege Stack PostgreSQL DB"
14
+ # https://console.cloud.google.com/artifacts/docker/leverege-registry/us/system/images%2Fleverege-pgsql?project=leverege-registry
14
15
  imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:17.2-cnpg-lvrg-rel.2
16
+ description: "Leverege Stack PostgreSQL DB"
15
17
  bootstrap:
16
18
  initdb:
17
19
  # database: models # do not set - let it default to cnpg app db
18
20
  postInitSQL:
19
- # - CREATE DATABASE app; # operator expects this
20
- # - CREATE ROLE app; # and this to exist on restore
21
21
  # create the stack databases
22
22
  - CREATE DATABASE authz;
23
23
  - CREATE DATABASE fota;
@@ -25,29 +25,20 @@ spec:
25
25
  - CREATE DATABASE models;
26
26
  - CREATE DATABASE scheduler;
27
27
 
28
+ # we use superuser access for backwards compatibility with legacy (aka lazy)
28
29
  enableSuperuserAccess: true
29
30
  superuserSecret:
30
- name: cnpg-db-psql-stack-postgres-pw # postgres db pw
31
+ name: cnpg-db-psql-stack-postgres-pw # postgres db pw created by helmup
31
32
 
32
- affinity:
33
- enablePodAntiAffinity: true
34
- topologyKey: kubernetes.io/hostname # default value
35
- nodeAffinity:
36
- requiredDuringSchedulingIgnoredDuringExecution:
37
- nodeSelectorTerms:
38
- - matchExpressions:
39
- - key: target-env
40
- operator: In
41
- values:
42
- - database
43
- tolerations:
44
- - key: "database"
45
- operator: "Equal"
46
- value: "true"
47
- effect: "NoSchedule"
33
+ # Require 50Gi of space per instance using ssd storage class
34
+ storage:
35
+ storageClass: premium-rwo
36
+ size: 50Gi
37
+ # walStorage:
38
+ # storageClass: premium-rwo
39
+ # size: 1Gi
48
40
 
49
- # Parameters and pg_hba configuration will be append
50
- # to the default ones to make the cluster work
41
+ # customize psql settings - be careful - should be tuned
51
42
  postgresql:
52
43
  parameters:
53
44
  # max_connections: "100"
@@ -59,26 +50,6 @@ spec:
59
50
  # maintenance_work_mem: 1GB
60
51
  # work_mem: 20MB
61
52
 
62
- # - unsupervised: automated update of the primary once all
63
- # replicas have been upgraded (default)
64
- # - supervised: requires manual supervision to perform
65
- # the switchover of the primary
66
- primaryUpdateStrategy: unsupervised
67
- primaryUpdateMethod: switchover
68
-
69
- serviceAccountTemplate:
70
- metadata:
71
- annotations:
72
- iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
73
-
74
- # Require 50Gi of space per instance using ssd storage class
75
- storage:
76
- storageClass: premium-rwo
77
- size: 50Gi
78
- # walStorage:
79
- # storageClass: premium-rwo
80
- # size: 1Gi
81
-
82
53
  backup:
83
54
  retentionPolicy: 7d # don't think this does anything?
84
55
  volumeSnapshot:
@@ -86,7 +57,7 @@ spec:
86
57
  snapshotOf: cnpg-db-psql-stack
87
58
  className: cnpg-snapshotclass
88
59
  barmanObjectStore:
89
- destinationPath: gs://OVH:<PROJECT_ID>-barman
60
+ destinationPath: gs://${PROJECT_ID}-barman
90
61
  googleCredentials:
91
62
  gkeEnvironment: true
92
63
  tags:
@@ -94,6 +65,34 @@ spec:
94
65
  wal:
95
66
  compression: gzip
96
67
  maxParallel: 4
68
+
69
+ # affinity and toleration to control node pool placement, typically on database pool
70
+ affinity:
71
+ enablePodAntiAffinity: true
72
+ topologyKey: kubernetes.io/hostname # default value
73
+ nodeAffinity:
74
+ requiredDuringSchedulingIgnoredDuringExecution:
75
+ nodeSelectorTerms:
76
+ - matchExpressions:
77
+ - key: target-env
78
+ operator: In
79
+ values:
80
+ - database
81
+ tolerations:
82
+ - key: "database"
83
+ operator: "Equal"
84
+ value: "true"
85
+ effect: "NoSchedule"
86
+
87
+ # Method to follow to upgrade the primary server during a rolling update procedure,
88
+ # after all replicas have been successfully updated - default is restart
89
+ primaryUpdateMethod: switchover
90
+
91
+ serviceAccountTemplate:
92
+ metadata:
93
+ annotations:
94
+ iam.gke.io/gcp-service-account: cnpg-operands-sa@${PROJECT_ID}.iam.gserviceaccount.com
95
+
97
96
  ---
98
97
  apiVersion: postgresql.cnpg.io/v1
99
98
  kind: ScheduledBackup
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # See => https://cloudnative-pg.io/documentation/current/installation_upgrade/
4
4
  #
5
- OPVER="1.25.0"
5
+ OPVER="1.25.1"
6
6
 
7
7
  createNamespaceIfNeeded cnpg-system
8
8
 
package/src/helmup.sh CHANGED
@@ -1160,7 +1160,13 @@ $RED_ERROR The Leverege service-man utility is missing - install and rerun helmu
1160
1160
  NO_SERVICE_MAN
1161
1161
  exit 1
1162
1162
  fi
1163
- service-man --from-helmup --create-service $SERVICE
1163
+
1164
+ if [[ "$SERVICE" == *-canary ]];
1165
+ then
1166
+ printf "\n$YELO_WARN Canary detected - skipping service-man SA creation\n\n"
1167
+ else
1168
+ service-man --from-helmup --create-service $SERVICE
1169
+ fi
1164
1170
 
1165
1171
  checkUpgradeNotes $SERVICE
1166
1172