From 85c3b7bf3f14d689da4bec45783881d9eccb1447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Percy=20Camilo=20Trive=C3=B1o=20Aucahuasi?= Date: Thu, 19 Dec 2024 19:35:12 -0500 Subject: [PATCH 1/5] use the enterprise release version for the GKE example --- charts/values-overrides/examples/gke/README.md | 2 +- charts/values-overrides/examples/gke/gke_values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/values-overrides/examples/gke/README.md b/charts/values-overrides/examples/gke/README.md index 81a4ccd..0428f33 100644 --- a/charts/values-overrides/examples/gke/README.md +++ b/charts/values-overrides/examples/gke/README.md @@ -375,7 +375,7 @@ cuda: version: "11.8" #cuda version global: ## global settings for all charts - tag: v2.41.15 + tag: v2.41.10 ``` Print more values: diff --git a/charts/values-overrides/examples/gke/gke_values.yaml b/charts/values-overrides/examples/gke/gke_values.yaml index cf25519..d903829 100644 --- a/charts/values-overrides/examples/gke/gke_values.yaml +++ b/charts/values-overrides/examples/gke/gke_values.yaml @@ -213,7 +213,7 @@ cuda: version: "11.8" #cuda version global: ## global settings for all charts - tag: v2.41.15 + tag: v2.41.10 logs: #change log levels LogLevel: DEBUG #log level for the application GraphistryLogLevel: DEBUG #log level for graphistry From 70a234680f352f30095811f0cec9237a8347ddd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Percy=20Camilo=20Trive=C3=B1o=20Aucahuasi?= Date: Thu, 19 Dec 2024 19:35:45 -0500 Subject: [PATCH 2/5] provide more flexibilty for configure the postgres cluster --- .../templates/postgres-cluster.yaml | 56 ++-------------- charts/postgres-cluster/values.yaml | 67 +++++++++++++++++++ 2 files changed, 74 insertions(+), 49 deletions(-) diff --git a/charts/postgres-cluster/templates/postgres-cluster.yaml b/charts/postgres-cluster/templates/postgres-cluster.yaml index 8deb21b..ad1b637 100644 --- a/charts/postgres-cluster/templates/postgres-cluster.yaml +++ b/charts/postgres-cluster/templates/postgres-cluster.yaml @@ -56,7 +56,7 @@ spec: {{- end }} resources: requests: - storage: 4Gi + storage: {{ toYaml .Values.postgresCluster.instance1.dataVolumeClaimSpec.resources.requests.storage | quote }} {{ if .Values.global.postgresVolumeLabel }} selector: matchLabels: @@ -66,61 +66,19 @@ spec: dynamicConfiguration: postgresql: pg_hba: - - "host all all 0.0.0.0/0 trust" # this line enabled logical replication with programmatic access - - "host all postgres 127.0.0.1/32 md5" - +{{ toYaml .Values.postgresCluster.patroni.dynamicConfiguration.postgresql.pg_hba | indent 10 }} + backups: pgbackrest: - repoHost: - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 100m - memory: 128Mi - sidecars: - pgbackrest: - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 100m - memory: 128Mi - pgbackrestConfig: - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 100m - memory: 128Mi - jobs: - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 100m - memory: 128Mi - restore: - repoName: repo1 - enabled: false - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 100m - memory: 128Mi {{- if eq .Values.global.containerregistry.name "docker.io/graphistry" }} image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.40-1 #crunchydata {{ else }} image: {{.Values.global.containerregistry.name}}/crunchy-pgbackrest:ubi8-2.40-1 - {{- end }} + {{- end }} +{{ toYaml .Values.postgresCluster.backups.pgbackrest | indent 6 }} repos: - name: repo1 +{{ toYaml .Values.postgresCluster.backups.pgbackrest.repos.repo1 | indent 10 }} volume: volumeClaimSpec: {{- if eq .Values.global.multiNode true }} @@ -134,7 +92,7 @@ spec: {{- end }} resources: requests: - storage: 4Gi + storage: {{ toYaml .Values.postgresCluster.backups.pgbackrest.repos.repo1.volume.volumeClaimSpec.resources.requests.storage | quote }} imagePullPolicy: {{ .Values.global.imagePullPolicy | quote }} {{- with .Values.global.imagePullSecrets }} imagePullSecrets: diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index efc9e2f..42596e3 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -38,3 +38,70 @@ global: # cpu: 100m # memory: 128Mi +postgresCluster: + instance1: + dataVolumeClaimSpec: + resources: + requests: + storage: 4Gi + + patroni: + dynamicConfiguration: + postgresql: + pg_hba: + - "host all all 0.0.0.0/0 trust" # this line enabled logical replication with programmatic access + - "host all postgres 127.0.0.1/32 md5" + + backups: + pgbackrest: #check for more config options https://pgbackrest.org/configuration.html + repoHost: + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + sidecars: + pgbackrest: + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + pgbackrestConfig: + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + jobs: + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + restore: + repoName: repo1 + enabled: false + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + + repos: + repo1: + volume: + volumeClaimSpec: + resources: + requests: + storage: 4Gi From f31c8b619521ab91ff0ae38acdba36bbef22e40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Percy=20Camilo=20Trive=C3=B1o=20Aucahuasi?= Date: Fri, 20 Dec 2024 12:56:55 -0500 Subject: [PATCH 3/5] improve documentation for values overrides: link the GKE example --- charts/values-overrides/examples/gke/README.md | 2 +- docs/source/values-override.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/values-overrides/examples/gke/README.md b/charts/values-overrides/examples/gke/README.md index 0428f33..ea88a93 100644 --- a/charts/values-overrides/examples/gke/README.md +++ b/charts/values-overrides/examples/gke/README.md @@ -1,4 +1,4 @@ -# Deploy a Graphistry k8s cluster using GKE +# Deploy a Graphistry K8s cluster using GKE This guide provides step-by-step instructions for deploying Graphistry on Google Kubernetes Engine (GKE). The steps are based on the official documentation of [Graphistry Helm Charts](https://github.com/graphistry/graphistry-helm) and the [NVIDIA GPU Operator with Google GKE](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/google-gke.html). ## Prerequisites diff --git a/docs/source/values-override.rst b/docs/source/values-override.rst index ace792f..474a268 100644 --- a/docs/source/values-override.rst +++ b/docs/source/values-override.rst @@ -80,6 +80,8 @@ Here is an example of a values.yaml for all of the individual services taken fro imagePullSecrets: - name: docker-secret-prod +If you're deploying Graphistry on Google Kubernetes Engine (GKE), you can override values for GKE-specific configurations. For detailed examples and guidance, refer to the `Deploy a Graphistry K8s cluster using GKE `_. + Mandatory Values ---------------- From 954848fe567098d111834b95a90e820c7ced251c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Percy=20Camilo=20Trive=C3=B1o=20Aucahuasi?= Date: Fri, 20 Dec 2024 16:12:45 -0500 Subject: [PATCH 4/5] add some default replication settings for postgres cluster --- charts/postgres-cluster/values.yaml | 31 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index 42596e3..d6fd358 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -43,25 +43,28 @@ postgresCluster: dataVolumeClaimSpec: resources: requests: - storage: 4Gi + storage: 10Gi patroni: dynamicConfiguration: postgresql: pg_hba: - - "host all all 0.0.0.0/0 trust" # this line enabled logical replication with programmatic access + - "host all all 0.0.0.0/0 trust" # This line enable logical replication with programmatic access - "host all postgres 127.0.0.1/32 md5" backups: - pgbackrest: #check for more config options https://pgbackrest.org/configuration.html + pgbackrest: # Check for more config options https://pgbackrest.org/configuration.html + global: + repo1-retention-full: "3" # Keeps 3 full backups + repo1-retention-archive: "10" # Retain the last 10 archive logs repoHost: resources: requests: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi sidecars: pgbackrest: resources: @@ -74,18 +77,18 @@ postgresCluster: pgbackrestConfig: resources: requests: - cpu: 100m + cpu: 200m memory: 128Mi limits: - cpu: 100m + cpu: 200m memory: 128Mi jobs: resources: requests: - cpu: 100m + cpu: 200m memory: 128Mi limits: - cpu: 100m + cpu: 200m memory: 128Mi restore: repoName: repo1 @@ -100,8 +103,12 @@ postgresCluster: repos: repo1: + schedule: + full: "0 1 * * 0" # Weekly full backup every Sunday at 1 AM + differential: "0 3 * * *" # Daily differential backup + incremental: "*/30 * * * *" # Every 30 minutes for incremental backups volume: volumeClaimSpec: resources: requests: - storage: 4Gi + storage: 20Gi From 9d10247a6a0b368ad8b9d9f1e47c7bd704e2b80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Percy=20Camilo=20Trive=C3=B1o=20Aucahuasi?= Date: Fri, 20 Dec 2024 17:28:56 -0500 Subject: [PATCH 5/5] try to add a max cap for the pg backups --- charts/postgres-cluster/values.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index d6fd358..7fcf1a3 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -55,8 +55,11 @@ postgresCluster: backups: pgbackrest: # Check for more config options https://pgbackrest.org/configuration.html global: - repo1-retention-full: "3" # Keeps 3 full backups + repo1-bundle-size: "1G" # Set a 1GB maximum size for each 'backup bundle' + repo1-bundle-limit: "15" # Limit to 15 'backup bundles' + repo1-retention-full: "5" # Keeps 5 'full backups' repo1-retention-archive: "10" # Retain the last 10 archive logs + repo1-retention-diff: "7" # Retain 7 'differential backups' repoHost: resources: requests: @@ -111,4 +114,4 @@ postgresCluster: volumeClaimSpec: resources: requests: - storage: 20Gi + storage: 50Gi