Skip to content
Closed

test #122

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 8 additions & 19 deletions pillan/cnpg/cnpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -xe
# Install cloudnativePG on cluster
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm upgrade --install cnpg \
--version="0.14.0" \
--version="0.15.0" \
--namespace cnpg-system \
--create-namespace \
cnpg/cloudnative-pg \
Expand Down Expand Up @@ -47,7 +47,7 @@ metadata:
type: Opaque
END

# deployment - first time? or recovery? (use cnpg-recovery.yaml for recovery)
# Deployment
cat > deploy.yaml << END
# Cluster Definition
apiVersion: postgresql.cnpg.io/v1
Expand All @@ -56,12 +56,17 @@ metadata:
name: cnpg-cluster
namespace: cloudnativepg
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:14.5
instances: 3
#logLevel: debug
#startDelay: 300
#stopDelay: 300

postgresql:
parameters:
max_connections: "500"
shared_buffers: 256MB
idle_session_timeout: 4h
pg_hba:
- host all all 139.229.134.0/23 md5
- host all all 139.229.136.0/21 md5
Expand All @@ -77,32 +82,16 @@ spec:
secret:
name: cnpg-cluster-app-user

backup:
barmanObjectStore:
destinationPath: ${AWS_ACCESS_BUCKET}
s3Credentials:
accessKeyId:
name: cnpg-aws-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: cnpg-aws-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip

retentionPolicy: "90d"

superuserSecret:
name: cnpg-cluster-superuser

# Resources and Storage Needs to be Adjust!

storage:
size: 10Gi
size: 5Gi

monitoring:
enablePodMonitor: true
END
kubectl apply -f deploy.yaml
#kubectl apply -f cnpg-scheduledbackups.yaml
kubectl apply -f cnpg-loadbalancer.yaml
9 changes: 9 additions & 0 deletions pillan/rke/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ nodes:
- etcd
labels:
role: storage-node
- address: pillan09.tu.lsst.org
hostname_override: pillan09
user: rke
role:
- controlplane
- worker
- etcd
labels:
role: storage-node
services:
etcd:
image: ""
Expand Down
8 changes: 6 additions & 2 deletions ruka/cnpg/cnpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ metadata:
type: Opaque
END

# deployment - first time? or recovery? (use cnpg-recovery.yaml for recovery)
#Deployment
cat > deploy.yaml << END
# Cluster Definition
apiVersion: postgresql.cnpg.io/v1
Expand All @@ -56,12 +56,17 @@ metadata:
name: cnpg-cluster
namespace: cloudnativepg
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:14.5
instances: 3
#logLevel: debug
#startDelay: 300
#stopDelay: 300

postgresql:
parameters:
max_connections: "500"
shared_buffers: 256MB
idle_session_timeout: 4h
pg_hba:
- host all all 139.229.134.0/23 md5
- host all all 139.229.136.0/21 md5
Expand Down Expand Up @@ -104,5 +109,4 @@ spec:
enablePodMonitor: true
END
kubectl apply -f deploy.yaml
#kubectl apply -f cnpg-scheduledbackups.yaml
kubectl apply -f cnpg-loadbalancer.yaml
7 changes: 7 additions & 0 deletions yagan/cnpg/cnpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,15 @@ metadata:
name: cnpg-cluster
namespace: cloudnativepg
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:14.5
instances: 3

postgresql:
parameters:
max_connections: "500"
shared_buffers: 256MB
idle_session_timeout: 4h

postgresql:
pg_hba:
- host all all 139.229.134.0/23 md5
Expand Down