@leverege/build-tools 2.63.1 → 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 +1 -1
- package/src/helm-charts/cnpg-db-psql-stack/cluster.yaml.ovh +42 -43
- package/src/helm-charts/cnpg-operator/helmup.plugin +1 -1
- package/src/helm-charts/valkey/.nohelm +0 -0
- package/src/helm-charts/valkey/helmup.plugin +11 -0
- package/src/helm-charts/valkey/valkey-local.yaml +87 -0
- package/src/helmup.sh +8 -2
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
#
|
|
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
|
|
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
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
showInstalling "Valkey"
|
|
4
|
+
|
|
5
|
+
OCI_CHART="oci://registry-1.docker.io/bitnamicharts/valkey"
|
|
6
|
+
|
|
7
|
+
[ -z "$VALKEY_CHART_VERSION" ] && VALKEY_CHART_VERSION="2.2.4"
|
|
8
|
+
|
|
9
|
+
helm upgrade --install valkey $OCI_CHART \
|
|
10
|
+
--values valkey/valkey-local.yaml \
|
|
11
|
+
--version $VALKEY_CHART_VERSION $HELM_WHAT
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
|
|
2
|
+
global:
|
|
3
|
+
storageClass: "ssd"
|
|
4
|
+
|
|
5
|
+
architecture: replication
|
|
6
|
+
|
|
7
|
+
auth:
|
|
8
|
+
enabled: false
|
|
9
|
+
sentinel: true
|
|
10
|
+
|
|
11
|
+
primary:
|
|
12
|
+
replicaCount: 1
|
|
13
|
+
|
|
14
|
+
resourcesPreset: "nano"
|
|
15
|
+
resources:
|
|
16
|
+
requests:
|
|
17
|
+
cpu: 250m
|
|
18
|
+
memory: 500Mi
|
|
19
|
+
|
|
20
|
+
updateStrategy:
|
|
21
|
+
## StrategyType
|
|
22
|
+
## Can be set to RollingUpdate, OnDelete (statefulset), Recreate (deployment)
|
|
23
|
+
##
|
|
24
|
+
type: RollingUpdate
|
|
25
|
+
|
|
26
|
+
affinity:
|
|
27
|
+
nodeAffinity:
|
|
28
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
29
|
+
nodeSelectorTerms:
|
|
30
|
+
- matchExpressions:
|
|
31
|
+
- key: target-env
|
|
32
|
+
operator: In
|
|
33
|
+
values:
|
|
34
|
+
- database
|
|
35
|
+
|
|
36
|
+
tolerations:
|
|
37
|
+
- key: "database"
|
|
38
|
+
operator: "Equal"
|
|
39
|
+
value: "true"
|
|
40
|
+
effect: "NoSchedule"
|
|
41
|
+
|
|
42
|
+
persistence:
|
|
43
|
+
enabled: true
|
|
44
|
+
size: 8Gi
|
|
45
|
+
|
|
46
|
+
replica:
|
|
47
|
+
replicaCount: 1
|
|
48
|
+
|
|
49
|
+
resourcesPreset: "nano"
|
|
50
|
+
resources:
|
|
51
|
+
requests:
|
|
52
|
+
cpu: 250m
|
|
53
|
+
memory: 500Mi
|
|
54
|
+
|
|
55
|
+
affinity:
|
|
56
|
+
nodeAffinity:
|
|
57
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
58
|
+
nodeSelectorTerms:
|
|
59
|
+
- matchExpressions:
|
|
60
|
+
- key: target-env
|
|
61
|
+
operator: In
|
|
62
|
+
values:
|
|
63
|
+
- database
|
|
64
|
+
|
|
65
|
+
tolerations:
|
|
66
|
+
- key: "database"
|
|
67
|
+
operator: "Equal"
|
|
68
|
+
value: "true"
|
|
69
|
+
effect: "NoSchedule"
|
|
70
|
+
|
|
71
|
+
persistence:
|
|
72
|
+
enabled: true
|
|
73
|
+
size: 8Gi
|
|
74
|
+
|
|
75
|
+
sentinel:
|
|
76
|
+
enabled: false
|
|
77
|
+
|
|
78
|
+
metrics:
|
|
79
|
+
enabled: true
|
|
80
|
+
serviceMonitor:
|
|
81
|
+
enabled: true
|
|
82
|
+
namespace: "prometheus"
|
|
83
|
+
relabelings:
|
|
84
|
+
- action: labelmap
|
|
85
|
+
regex: __meta_kubernetes_pod_label_(.+)
|
|
86
|
+
- action: labelmap
|
|
87
|
+
regex: __meta_kubernetes_service_label_(.+)
|
package/src/helmup.sh
CHANGED
|
@@ -1076,7 +1076,7 @@ CATBACKUP
|
|
|
1076
1076
|
bootstrapLocalSetup $SERVICE
|
|
1077
1077
|
;;
|
|
1078
1078
|
|
|
1079
|
-
"redis")
|
|
1079
|
+
"redis"|"valkey")
|
|
1080
1080
|
bootstrapLocalSetup $SERVICE
|
|
1081
1081
|
;;
|
|
1082
1082
|
|
|
@@ -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
|
-
|
|
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
|
|