@leverege/build-tools 2.43.12 → 2.45.0-beta.2
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 +8 -5
- package/src/Docker.mjs +252 -0
- package/src/Utils.mjs +194 -15
- package/src/bash-funcs +6 -0
- package/src/docker-to-registry.mjs +71 -0
- package/src/helm-charts/cnpg-operator/.nohelm +0 -0
- package/src/helm-charts/cnpg-operator/.nohelmdn +0 -0
- package/src/helm-charts/cnpg-operator/helmdn.plugin +9 -0
- package/src/helm-charts/db-postgres-stack/.nohelm +0 -0
- package/src/helm-charts/db-postgres-stack/.nohelmdn +0 -0
- package/src/helm-charts/db-postgres-stack/db-postgres-stack.yaml.ovh +110 -0
- package/src/helm-charts/db-postgres-stack/gitignore +1 -0
- package/src/helm-charts/db-postgres-stack/helmdn.plugin +3 -0
- package/src/helm-charts/db-postgres-stack/helmup.plugin +3 -0
- package/src/helm-charts/db-timescale-dense/.nohelm +0 -0
- package/src/helm-charts/db-timescale-dense/.nohelmdn +0 -0
- package/src/helm-charts/db-timescale-dense/db-timescale-dense.yaml.ovh +120 -0
- package/src/helm-charts/db-timescale-dense/gitignore +1 -0
- package/src/helm-charts/db-timescale-dense/helmdn.plugin +3 -0
- package/src/helm-charts/db-timescale-dense/helmup.plugin +5 -0
- package/src/helm-charts/redis/helmup.plugin +1 -1
- package/src/helm-charts/timescale-db/timescale-db-local.yaml +10 -10
- package/src/helm-charts/traefik/helmup.plugin +1 -1
- package/src/helm-charts/transponder-dh/values-local.yaml +62 -0
- package/src/helmdn.sh +1 -1
- package/src/helmup.sh +156 -29
- package/src/k8x.sh +5 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Artifact Chart => https://artifacthub.io/packages/helm/cloudnative-pg/cloudnative-pg
|
|
2
|
+
# Examples Charts => https://cloudnative-pg.io/documentation/current/samples/
|
|
3
|
+
apiVersion: postgresql.cnpg.io/v1
|
|
4
|
+
kind: Cluster
|
|
5
|
+
metadata:
|
|
6
|
+
name: db-postgres-stack
|
|
7
|
+
namespace: cnpg-operands
|
|
8
|
+
spec:
|
|
9
|
+
instances: 1
|
|
10
|
+
# logLevel: debug
|
|
11
|
+
|
|
12
|
+
description: "Leverege Stack PostgreSQL DB"
|
|
13
|
+
imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.1-cnpg-tsdb2-beta.10
|
|
14
|
+
bootstrap:
|
|
15
|
+
initdb:
|
|
16
|
+
database: imagine
|
|
17
|
+
owner: imagine
|
|
18
|
+
secret:
|
|
19
|
+
name: db-postgres-stack-imagine-pw # imagine db pw
|
|
20
|
+
|
|
21
|
+
enableSuperuserAccess: true
|
|
22
|
+
superuserSecret:
|
|
23
|
+
name: db-postgres-stack-postgres-pw # postgres db pw
|
|
24
|
+
|
|
25
|
+
affinity:
|
|
26
|
+
# enablePodAntiAffinity: true
|
|
27
|
+
# topologyKey: failure-domain.beta.kubernetes.io/zone
|
|
28
|
+
tolerations:
|
|
29
|
+
- key: "database"
|
|
30
|
+
operator: "Equal"
|
|
31
|
+
value: "true"
|
|
32
|
+
effect: "NoSchedule"
|
|
33
|
+
|
|
34
|
+
# Parameters and pg_hba configuration will be append
|
|
35
|
+
# to the default ones to make the cluster work
|
|
36
|
+
postgresql:
|
|
37
|
+
parameters:
|
|
38
|
+
# max_worker_processes: "60"
|
|
39
|
+
# max_worker_processes: "8"
|
|
40
|
+
# max_parallel_workers: "8"
|
|
41
|
+
max_connections: "500"
|
|
42
|
+
# shared_buffers: 2GB
|
|
43
|
+
# effective_cache_size: 6GB
|
|
44
|
+
# maintenance_work_mem: 1GB
|
|
45
|
+
# work_mem: 20MB
|
|
46
|
+
|
|
47
|
+
# - unsupervised: automated update of the primary once all
|
|
48
|
+
# replicas have been upgraded (default)
|
|
49
|
+
# - supervised: requires manual supervision to perform
|
|
50
|
+
# the switchover of the primary
|
|
51
|
+
primaryUpdateStrategy: unsupervised
|
|
52
|
+
|
|
53
|
+
serviceAccountTemplate:
|
|
54
|
+
metadata:
|
|
55
|
+
annotations:
|
|
56
|
+
iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
|
|
57
|
+
|
|
58
|
+
# Require 50Gi of space per instance using ssd storage class
|
|
59
|
+
storage:
|
|
60
|
+
storageClass: premium-rwo
|
|
61
|
+
size: 50Gi
|
|
62
|
+
# walStorage:
|
|
63
|
+
# storageClass: premium-rwo
|
|
64
|
+
# size: 1Gi
|
|
65
|
+
|
|
66
|
+
backup:
|
|
67
|
+
retentionPolicy: 30d
|
|
68
|
+
volumeSnapshot:
|
|
69
|
+
labels:
|
|
70
|
+
snapshotOf: db-postgres-stack
|
|
71
|
+
className: cnpg-snapshotclass
|
|
72
|
+
barmanObjectStore:
|
|
73
|
+
destinationPath: gs://OVH:<PROJECT_ID>-barman
|
|
74
|
+
googleCredentials:
|
|
75
|
+
gkeEnvironment: true
|
|
76
|
+
tags:
|
|
77
|
+
cnpgCluster: db-postgres-stack
|
|
78
|
+
wal:
|
|
79
|
+
compression: gzip
|
|
80
|
+
#---
|
|
81
|
+
#apiVersion: postgresql.cnpg.io/v1
|
|
82
|
+
#kind: Pooler
|
|
83
|
+
#metadata:
|
|
84
|
+
# name: db-postgres-stack-pool-rw
|
|
85
|
+
# namespace: cnpg-operands
|
|
86
|
+
#spec:
|
|
87
|
+
# cluster:
|
|
88
|
+
# name: db-postgres-stack
|
|
89
|
+
#
|
|
90
|
+
# instances: 1
|
|
91
|
+
# type: rw
|
|
92
|
+
# pgbouncer:
|
|
93
|
+
# poolMode: session
|
|
94
|
+
# parameters:
|
|
95
|
+
# max_client_conn: "500"
|
|
96
|
+
# default_pool_size: "10"
|
|
97
|
+
---
|
|
98
|
+
apiVersion: postgresql.cnpg.io/v1
|
|
99
|
+
kind: ScheduledBackup
|
|
100
|
+
metadata:
|
|
101
|
+
name: db-postgres-stack-backup
|
|
102
|
+
namespace: cnpg-operands
|
|
103
|
+
spec:
|
|
104
|
+
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
105
|
+
schedule: "0 0 * * * *"
|
|
106
|
+
cluster:
|
|
107
|
+
name: db-postgres-stack
|
|
108
|
+
method: volumeSnapshot
|
|
109
|
+
backupOwnerReference: self
|
|
110
|
+
immediate: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
db-timescale-dense.yaml
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Artifact Chart => https://artifacthub.io/packages/helm/cloudnative-pg/cloudnative-pg
|
|
2
|
+
# Examples Charts => https://cloudnative-pg.io/documentation/current/samples/
|
|
3
|
+
apiVersion: postgresql.cnpg.io/v1
|
|
4
|
+
kind: Cluster
|
|
5
|
+
metadata:
|
|
6
|
+
name: db-timescale-dense
|
|
7
|
+
namespace: cnpg-operands
|
|
8
|
+
spec:
|
|
9
|
+
instances: 1
|
|
10
|
+
logLevel: debug
|
|
11
|
+
|
|
12
|
+
description: "Leverege Dense Timescale DB"
|
|
13
|
+
imageName: us-docker.pkg.dev/leverege-registry/system/images/leverege-pgsql:16.1-cnpg-tsdb2-beta.6
|
|
14
|
+
bootstrap:
|
|
15
|
+
initdb:
|
|
16
|
+
postInitTemplateSQL:
|
|
17
|
+
- CREATE EXTENSION timescaledb;
|
|
18
|
+
- CREATE EXTENSION jsquery;
|
|
19
|
+
database: imagine
|
|
20
|
+
owner: imagine
|
|
21
|
+
secret:
|
|
22
|
+
name: db-timescale-dense-imagine-pw # imagine db pw
|
|
23
|
+
|
|
24
|
+
enableSuperuserAccess: true
|
|
25
|
+
superuserSecret:
|
|
26
|
+
name: db-timescale-dense-postgres-pw # postgres db pw
|
|
27
|
+
|
|
28
|
+
affinity:
|
|
29
|
+
# enablePodAntiAffinity: true
|
|
30
|
+
# topologyKey: failure-domain.beta.kubernetes.io/zone
|
|
31
|
+
tolerations:
|
|
32
|
+
- key: "database"
|
|
33
|
+
operator: "Equal"
|
|
34
|
+
value: "true"
|
|
35
|
+
effect: "NoSchedule"
|
|
36
|
+
|
|
37
|
+
# Parameters and pg_hba configuration will be append
|
|
38
|
+
# to the default ones to make the cluster work
|
|
39
|
+
postgresql:
|
|
40
|
+
shared_preload_libraries:
|
|
41
|
+
- timescaledb
|
|
42
|
+
- jsquery
|
|
43
|
+
parameters:
|
|
44
|
+
# max_worker_processes: "60"
|
|
45
|
+
max_worker_processes: "8"
|
|
46
|
+
max_parallel_workers: "8"
|
|
47
|
+
shared_buffers: 2GB
|
|
48
|
+
effective_cache_size: 6GB
|
|
49
|
+
maintenance_work_mem: 1GB
|
|
50
|
+
work_mem: 20MB
|
|
51
|
+
pg_hba:
|
|
52
|
+
# To access through TCP/IP you will need to get username
|
|
53
|
+
# and password from the secret cluster-example-custom-app
|
|
54
|
+
- host all all all md5
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Example of rolling update strategy:
|
|
58
|
+
# - unsupervised: automated update of the primary once all
|
|
59
|
+
# replicas have been upgraded (default)
|
|
60
|
+
# - supervised: requires manual supervision to perform
|
|
61
|
+
# the switchover of the primary
|
|
62
|
+
primaryUpdateStrategy: unsupervised
|
|
63
|
+
|
|
64
|
+
serviceAccountTemplate:
|
|
65
|
+
metadata:
|
|
66
|
+
annotations:
|
|
67
|
+
iam.gke.io/gcp-service-account: cnpg-operands-sa@OVH:<PROJECT_ID>.iam.gserviceaccount.com
|
|
68
|
+
|
|
69
|
+
# Require 50Gi of space per instance using ssd storage class
|
|
70
|
+
storage:
|
|
71
|
+
storageClass: premium-rwo
|
|
72
|
+
size: 50Gi
|
|
73
|
+
walStorage:
|
|
74
|
+
storageClass: premium-rwo
|
|
75
|
+
size: 1Gi
|
|
76
|
+
|
|
77
|
+
backup:
|
|
78
|
+
volumeSnapshot:
|
|
79
|
+
labels:
|
|
80
|
+
snapshotOf: db-timescale-dense
|
|
81
|
+
className: cnpg-snapshotclass
|
|
82
|
+
barmanObjectStore:
|
|
83
|
+
destinationPath: gs://OVH:<PROJECT_ID>-barman
|
|
84
|
+
googleCredentials:
|
|
85
|
+
gkeEnvironment: true
|
|
86
|
+
tags:
|
|
87
|
+
cnpgCluster: db-timescale-dense
|
|
88
|
+
wal:
|
|
89
|
+
compression: gzip
|
|
90
|
+
---
|
|
91
|
+
apiVersion: postgresql.cnpg.io/v1
|
|
92
|
+
kind: Pooler
|
|
93
|
+
metadata:
|
|
94
|
+
name: db-timescale-dense-pool-rw
|
|
95
|
+
namespace: cnpg-operands
|
|
96
|
+
spec:
|
|
97
|
+
cluster:
|
|
98
|
+
name: db-timescale-dense
|
|
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
|
+
kind: ScheduledBackup
|
|
110
|
+
metadata:
|
|
111
|
+
name: db-timescale-dense-backup
|
|
112
|
+
namespace: cnpg-operands
|
|
113
|
+
spec:
|
|
114
|
+
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
115
|
+
schedule: "0 0 * * * *"
|
|
116
|
+
cluster:
|
|
117
|
+
name: db-timescale-dense
|
|
118
|
+
method: volumeSnapshot
|
|
119
|
+
backupOwnerReference: self
|
|
120
|
+
immediate: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
db-timescale-dense.yaml
|
|
@@ -4,7 +4,7 @@ showInstalling "Redis"
|
|
|
4
4
|
|
|
5
5
|
OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
|
|
6
6
|
|
|
7
|
-
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="18.
|
|
7
|
+
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="18.7.1"
|
|
8
8
|
|
|
9
9
|
helm upgrade --install redis $OCI_CHART \
|
|
10
10
|
--values redis/redis-local.yaml \
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
postgresql:
|
|
2
2
|
postgresqlExtendedConf:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
effectiveCacheSize: 6GB # 524288 8kB
|
|
4
|
+
idle_in_transaction_session_timeout: 30000 # 0 ms
|
|
5
|
+
maintenanceWorkMem: 1GB # 65536 kB
|
|
6
|
+
maxConnections: 500 # 100
|
|
7
|
+
maxParallelWorkers: 8 # 32
|
|
8
|
+
maxWalSize: 2GB # 80 MB
|
|
9
|
+
maxWorkerProcesses: 8 # 32
|
|
10
|
+
sharedBuffers: 2GB # 16384 8kB
|
|
11
|
+
walKeepSegments: 64 # deprecated
|
|
12
|
+
workMem: 20MB # 4096 kB
|
|
13
13
|
|
|
14
14
|
resources:
|
|
15
15
|
requests:
|
|
@@ -6,7 +6,7 @@ TRAEFIK_NAMESPACE="traefik"
|
|
|
6
6
|
|
|
7
7
|
addHelmRepo traefik https://helm.traefik.io/traefik
|
|
8
8
|
|
|
9
|
-
[ -z "$TRAEFIK_CHART_VERSION" ] && TRAEFIK_CHART_VERSION="
|
|
9
|
+
[ -z "$TRAEFIK_CHART_VERSION" ] && TRAEFIK_CHART_VERSION="26"
|
|
10
10
|
helm upgrade --install traefik traefik/traefik \
|
|
11
11
|
--namespace $TRAEFIK_NAMESPACE --create-namespace \
|
|
12
12
|
--values traefik/traefik-local.yaml \
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
nameOverride: transponder-dh
|
|
2
|
+
|
|
3
|
+
image:
|
|
4
|
+
tag: # v4.3.3
|
|
5
|
+
|
|
6
|
+
config:
|
|
7
|
+
TRANSPONDER_RUN_MODE: "denseHistoryCombined"
|
|
8
|
+
LOG_CONFIG: '{"type":"pino","level":"info"}'
|
|
9
|
+
|
|
10
|
+
DENSE_HISTORY_TDB_CACHE_KEY_PREFIX: "timescale-dh"
|
|
11
|
+
DENSE_HISTORY_MIGRATE_PAGE_SIZE_LIMIT: "50"
|
|
12
|
+
|
|
13
|
+
# PG_HOST: "db-timescale-dense-rw"
|
|
14
|
+
PG_HOST: "db-timescale-dense-pool-rw.cnpg-operands"
|
|
15
|
+
|
|
16
|
+
# password from secret
|
|
17
|
+
PG_PASSWORD_SECRET: "db-timescale-dense-postgres-pw"
|
|
18
|
+
PG_PASSWORD_KEY: "password"
|
|
19
|
+
|
|
20
|
+
TRANSPORT_CONFIG: '{
|
|
21
|
+
"type": "pubsub",
|
|
22
|
+
"projectId": "OVH:<PROJECT_NAME>",
|
|
23
|
+
"publisher": {
|
|
24
|
+
"batching": {
|
|
25
|
+
"maxMilliseconds": 0,
|
|
26
|
+
"maxMessages": 999
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"subscriptionOptions": {
|
|
30
|
+
"flowControl": {
|
|
31
|
+
"allowExcessMessages": false,
|
|
32
|
+
"maxMessages": 25
|
|
33
|
+
},
|
|
34
|
+
"streamingOptions": {
|
|
35
|
+
"maxStreams": 5
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"channel": "writer-dh"
|
|
39
|
+
}'
|
|
40
|
+
|
|
41
|
+
# mode: "denseHistoryCombined"
|
|
42
|
+
# autoAck: "afterProcess"
|
|
43
|
+
# ackOnError: "false"
|
|
44
|
+
# allowForwarding: "true"
|
|
45
|
+
# denseHistoryMigratePageSizeLimit: "50"
|
|
46
|
+
|
|
47
|
+
autoscaling:
|
|
48
|
+
minReplicas: 3
|
|
49
|
+
maxReplicas: 16
|
|
50
|
+
maxCPU: 80
|
|
51
|
+
|
|
52
|
+
resources:
|
|
53
|
+
# We usually recommend not to specify default resources and to leave this as a conscious
|
|
54
|
+
# choice for the user. This also increases chances charts run on environments with little
|
|
55
|
+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
|
56
|
+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
|
57
|
+
limits:
|
|
58
|
+
cpu: 500m
|
|
59
|
+
memory: 1200Mi
|
|
60
|
+
requests:
|
|
61
|
+
cpu: 250m
|
|
62
|
+
memory: 600Mi
|
package/src/helmdn.sh
CHANGED
|
@@ -89,7 +89,7 @@ function helmDown() {
|
|
|
89
89
|
if [ -f "$1/.nohelmdn" ];
|
|
90
90
|
then
|
|
91
91
|
cat<<NOHELMDN
|
|
92
|
-
`color r "***ERROR: $1/.nohelmdn blocker
|
|
92
|
+
`color r "***ERROR: $1/.nohelmdn blocker present - helmdn blocked"`
|
|
93
93
|
|
|
94
94
|
Somebody really doesn't want you to helmdn $1
|
|
95
95
|
|