@leverege/build-tools 2.48.6 → 2.50.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.
- package/package.json +9 -10
- package/registry-compass.yaml +20 -0
- package/src/chart-compass.mjs +96 -0
- package/src/cnpg-backup.mjs +13 -0
- package/src/helm-charts/{db-timescale-dense/db-timescale-dense.yaml.ovh → cnpg-db-pgbench/cluster.yaml.ovh} +9 -29
- package/src/helm-charts/cnpg-db-pgbench/gitignore +2 -0
- package/src/helm-charts/cnpg-db-pgbench/helmdn.plugin +12 -0
- package/src/helm-charts/cnpg-db-pgbench/helmup.plugin +3 -0
- package/src/helm-charts/cnpg-db-pgbench/pooler.yaml +16 -0
- package/src/helm-charts/{db-postgres-stack/db-postgres-stack.yaml.ovh → cnpg-db-psql-stack/cluster.yaml.ovh} +22 -26
- package/src/helm-charts/cnpg-db-psql-stack/gitignore +2 -0
- package/src/helm-charts/cnpg-db-psql-stack/helmdn.plugin +12 -0
- package/src/helm-charts/cnpg-db-psql-stack/helmup.plugin +3 -0
- package/src/helm-charts/cnpg-db-psql-stack/pooler.yaml +16 -0
- package/src/helm-charts/cnpg-db-tsdb-basic/cluster.yaml.ovh +110 -0
- package/src/helm-charts/cnpg-db-tsdb-basic/gitignore +2 -0
- package/src/helm-charts/cnpg-db-tsdb-basic/helmdn.plugin +12 -0
- package/src/helm-charts/cnpg-db-tsdb-basic/helmup.plugin +3 -0
- package/src/helm-charts/cnpg-db-tsdb-basic/pooler.yaml +16 -0
- package/src/helm-charts/cnpg-db-tsdb-dense/.nohelm +0 -0
- package/src/helm-charts/cnpg-db-tsdb-dense/.nohelmdn +0 -0
- package/src/helm-charts/{db-timescale-plain/db-timescale-plain.yaml.ovh → cnpg-db-tsdb-dense/cluster.yalm.ovh} +25 -36
- package/src/helm-charts/cnpg-db-tsdb-dense/gitignore +2 -0
- package/src/helm-charts/cnpg-db-tsdb-dense/helmdn.plugin +12 -0
- package/src/helm-charts/cnpg-db-tsdb-dense/helmup.plugin +3 -0
- package/src/helm-charts/cnpg-db-tsdb-dense/pooler.yaml +16 -0
- package/src/helm-charts/elasticsearch8/helmup.plugin +4 -5
- package/src/helm-charts/kube-prometheus-stack/helmup.plugin +13 -0
- package/src/helm-charts/kube-prometheus-stack/old-values-local.yaml +764 -0
- package/src/helm-charts/pusher/values-local.yaml +2 -2
- package/src/helmup.sh +14 -25
- package/src/cnpg-snapshot.mjs +0 -38
- package/src/helm-charts/db-postgres-stack/gitignore +0 -1
- package/src/helm-charts/db-postgres-stack/helmdn.plugin +0 -3
- package/src/helm-charts/db-postgres-stack/helmup.plugin +0 -3
- package/src/helm-charts/db-timescale-dense/gitignore +0 -1
- package/src/helm-charts/db-timescale-dense/helmdn.plugin +0 -9
- package/src/helm-charts/db-timescale-dense/helmup.plugin +0 -5
- package/src/helm-charts/db-timescale-plain/gitignore +0 -1
- package/src/helm-charts/db-timescale-plain/helmdn.plugin +0 -3
- package/src/helm-charts/db-timescale-plain/helmup.plugin +0 -3
- /package/src/helm-charts/{db-postgres-stack → cnpg-db-pgbench}/.nohelm +0 -0
- /package/src/helm-charts/{db-postgres-stack → cnpg-db-pgbench}/.nohelmdn +0 -0
- /package/src/helm-charts/{db-timescale-dense → cnpg-db-psql-stack}/.nohelm +0 -0
- /package/src/helm-charts/{db-timescale-dense → cnpg-db-psql-stack}/.nohelmdn +0 -0
- /package/src/helm-charts/{db-timescale-plain → cnpg-db-tsdb-basic}/.nohelm +0 -0
- /package/src/helm-charts/{db-timescale-plain → cnpg-db-tsdb-basic}/.nohelmdn +0 -0
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
apiVersion: postgresql.cnpg.io/v1
|
|
4
4
|
kind: Cluster
|
|
5
5
|
metadata:
|
|
6
|
-
name: db-
|
|
6
|
+
name: cnpg-db-tsdb-dense
|
|
7
7
|
namespace: cnpg-operands
|
|
8
8
|
spec:
|
|
9
9
|
instances: 1
|
|
10
|
-
logLevel: debug
|
|
10
|
+
logLevel: info # warning debug
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
monitoring:
|
|
13
|
+
enablePodMonitor: false # set true once monitoring is setup
|
|
14
|
+
|
|
15
|
+
description: "Leverege Dense Timescale DB"
|
|
16
|
+
imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.2-cnpg-tsdb2-beta.4
|
|
14
17
|
bootstrap:
|
|
15
18
|
initdb:
|
|
16
19
|
postInitTemplateSQL:
|
|
@@ -19,15 +22,23 @@ spec:
|
|
|
19
22
|
database: imagine
|
|
20
23
|
owner: imagine
|
|
21
24
|
secret:
|
|
22
|
-
name: db-
|
|
25
|
+
name: cnpg-db-tsdb-dense-imagine-pw # imagine db pw
|
|
23
26
|
|
|
24
27
|
enableSuperuserAccess: true
|
|
25
28
|
superuserSecret:
|
|
26
|
-
name: db-
|
|
29
|
+
name: cnpg-db-tsdb-dense-postgres-pw # postgres db pw
|
|
27
30
|
|
|
28
31
|
affinity:
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
enablePodAntiAffinity: true
|
|
33
|
+
topologyKey: failure-domain.beta.kubernetes.io/zone
|
|
34
|
+
nodeAffinity:
|
|
35
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
36
|
+
nodeSelectorTerms:
|
|
37
|
+
- matchExpressions:
|
|
38
|
+
- key: target-env
|
|
39
|
+
operator: In
|
|
40
|
+
values:
|
|
41
|
+
- database
|
|
31
42
|
tolerations:
|
|
32
43
|
- key: "database"
|
|
33
44
|
operator: "Equal"
|
|
@@ -53,7 +64,6 @@ spec:
|
|
|
53
64
|
# and password from the secret cluster-example-custom-app
|
|
54
65
|
- host all all all md5
|
|
55
66
|
|
|
56
|
-
|
|
57
67
|
# Example of rolling update strategy:
|
|
58
68
|
# - unsupervised: automated update of the primary once all
|
|
59
69
|
# replicas have been upgraded (default)
|
|
@@ -66,55 +76,34 @@ spec:
|
|
|
66
76
|
annotations:
|
|
67
77
|
iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
|
|
68
78
|
|
|
69
|
-
# Require 50Gi of space per instance using ssd storage class
|
|
70
79
|
storage:
|
|
71
80
|
storageClass: premium-rwo
|
|
72
|
-
size:
|
|
73
|
-
walStorage:
|
|
74
|
-
storageClass: premium-rwo
|
|
75
|
-
size: 1Gi
|
|
81
|
+
size: 77Gi
|
|
76
82
|
|
|
77
83
|
backup:
|
|
78
84
|
volumeSnapshot:
|
|
79
85
|
labels:
|
|
80
|
-
snapshotOf: db-
|
|
86
|
+
snapshotOf: cnpg-db-tsdb-dense
|
|
81
87
|
className: cnpg-snapshotclass
|
|
82
88
|
barmanObjectStore:
|
|
83
89
|
destinationPath: gs://OVH:<PROJECT_ID>-barman
|
|
84
90
|
googleCredentials:
|
|
85
91
|
gkeEnvironment: true
|
|
86
92
|
tags:
|
|
87
|
-
cnpgCluster: db-
|
|
93
|
+
cnpgCluster: cnpg-db-tsdb-dense
|
|
88
94
|
wal:
|
|
89
95
|
compression: gzip
|
|
90
96
|
---
|
|
91
97
|
apiVersion: postgresql.cnpg.io/v1
|
|
92
|
-
kind: Pooler
|
|
93
|
-
metadata:
|
|
94
|
-
name: db-timescale-plain-pool-rw
|
|
95
|
-
namespace: cnpg-operands
|
|
96
|
-
spec:
|
|
97
|
-
cluster:
|
|
98
|
-
name: db-timescale-plain
|
|
99
|
-
|
|
100
|
-
instances: 1
|
|
101
|
-
type: rw
|
|
102
|
-
pgbouncer:
|
|
103
|
-
poolMode: session
|
|
104
|
-
parameters:
|
|
105
|
-
max_client_conn: "500"
|
|
106
|
-
default_pool_size: "10"
|
|
107
|
-
---
|
|
108
|
-
apiVersion: postgresql.cnpg.io/v1
|
|
109
98
|
kind: ScheduledBackup
|
|
110
99
|
metadata:
|
|
111
|
-
name: db-
|
|
100
|
+
name: cnpg-db-tsdb-dense-volsnap
|
|
112
101
|
namespace: cnpg-operands
|
|
113
102
|
spec:
|
|
114
103
|
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
115
|
-
schedule: "0 0
|
|
104
|
+
schedule: "0 0 */8 * * *"
|
|
116
105
|
cluster:
|
|
117
|
-
name: db-
|
|
106
|
+
name: cnpg-db-tsdb-dense
|
|
118
107
|
method: volumeSnapshot
|
|
119
108
|
backupOwnerReference: self
|
|
120
109
|
immediate: true
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# We only want to hibernate unless the intent is to really delete EVERYTHING
|
|
4
|
+
# which includes PVCs and volume snapshots.
|
|
5
|
+
#
|
|
6
|
+
printf "\nHibernating the cnpg-db-tsdb-dense cluster...\n"
|
|
7
|
+
kubectl cnpg hibernate on -n cnpg-operands cnpg-db-tsdb-dense
|
|
8
|
+
|
|
9
|
+
# *** DANGER ***
|
|
10
|
+
# kubectl delete will destroy the cluster
|
|
11
|
+
# *** DANGER ***
|
|
12
|
+
# kubectl delete -f cnpg-db-tsdb-dense/cnpg-db-tsdb-dense.yaml $K8S_WHAT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
apiVersion: postgresql.cnpg.io/v1
|
|
2
|
+
kind: Pooler
|
|
3
|
+
metadata:
|
|
4
|
+
name: cnpg-db-tsdb-dense-pool-rw
|
|
5
|
+
namespace: cnpg-operands
|
|
6
|
+
spec:
|
|
7
|
+
cluster:
|
|
8
|
+
name: cnpg-db-tsdb-dense
|
|
9
|
+
|
|
10
|
+
instances: 1
|
|
11
|
+
type: rw
|
|
12
|
+
pgbouncer:
|
|
13
|
+
poolMode: session
|
|
14
|
+
parameters:
|
|
15
|
+
max_client_conn: "500"
|
|
16
|
+
default_pool_size: "10"
|
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
#
|
|
3
3
|
showInstalling "Elastic Search 8"
|
|
4
4
|
|
|
5
|
+
OCI_CHART="oci://registry-1.docker.io/bitnamicharts/elasticsearch"
|
|
6
|
+
|
|
5
7
|
LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-dev.yaml"
|
|
6
8
|
#LOCAL_ES_VALUES="elasticsearch8/elasticsearch-local-prd.yaml"
|
|
7
9
|
[ ! -f "$LOCAL_ES_VALUES" ] && exitOnError 1 "Missing the local ES config file => `color y $LOCAL_ES_VALUES`"
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
helm upgrade --install elasticsearch8 bitnami/elasticsearch \
|
|
11
|
+
[ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="19.21.2"
|
|
12
|
+
helm upgrade --install elasticsearch8 $OCI_CHART \
|
|
12
13
|
--namespace elastic --create-namespace \
|
|
13
14
|
--values $LOCAL_ES_VALUES \
|
|
14
15
|
--version $ELASTIC_CHART_VERSION $HELM_WHAT
|
|
15
16
|
|
|
16
|
-
removeHelmRepo bitnami
|
|
17
|
-
|
|
18
17
|
## Installing ES8 exporter
|
|
19
18
|
addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
|
|
20
19
|
helm upgrade --install elasticsearch8-exporter prometheus-community/prometheus-elasticsearch-exporter \
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
showInstalling "The Prometheus Kube Stack"
|
|
4
|
+
|
|
5
|
+
addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
|
|
6
|
+
|
|
7
|
+
[ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="57"
|
|
8
|
+
|
|
9
|
+
helm upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack \
|
|
10
|
+
--namespace prometheus --create-namespace \
|
|
11
|
+
--version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
|
|
12
|
+
|
|
13
|
+
removeHelmRepo prometheus-community
|