From 611c8f6dbe5df525205a33f2fb5152ef45c58c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Tue, 19 Nov 2024 20:40:59 +0100 Subject: [PATCH] Add remoteStorageConfig --- charts/neon-storage-scrubber/README.md | 1 + charts/neon-storage-scrubber/templates/cronjob.yaml | 8 ++++++++ charts/neon-storage-scrubber/values.yaml | 2 ++ 3 files changed, 11 insertions(+) diff --git a/charts/neon-storage-scrubber/README.md b/charts/neon-storage-scrubber/README.md index 1a72daf..32244d3 100644 --- a/charts/neon-storage-scrubber/README.md +++ b/charts/neon-storage-scrubber/README.md @@ -47,6 +47,7 @@ $ helm install neon-storage-scrubber neondatabase/neon-storage-scrubber | storageScrubber.awsRegion | string | `""` | The AWS region to run the scrubber | | storageScrubber.command | list | `["pageserver-physical-gc","--min-age=1week"]` | The command to run | | storageScrubber.enableStorageControllerConnection | bool | `false` | Enable storage controller related functionalities | +| storageScrubber.remoteStorageConfig | object | `{}` | The config object to connect to the remote storage (alternative to previous two vars) | | storageScrubber.schedule | string | `"0 18 * * *"` | | | storageScrubber.storageControllerJwtToken | string | `""` | Control plane / storage controller JWT token for connecting to the storage controller | | storageScrubber.storageControllerUrl | string | `""` | URL of the storage controller | diff --git a/charts/neon-storage-scrubber/templates/cronjob.yaml b/charts/neon-storage-scrubber/templates/cronjob.yaml index 7db9c80..892e0ee 100644 --- a/charts/neon-storage-scrubber/templates/cronjob.yaml +++ b/charts/neon-storage-scrubber/templates/cronjob.yaml @@ -50,10 +50,18 @@ spec: {{- end -}} {{- toYaml .Values.storageScrubber.command | nindent 16 }} env: + {{- if .Values.storageScrubber.awsBucket }} - name: BUCKET value: {{ .Values.storageScrubber.awsBucket }} + {{- end }} + {{- if .Values.storageScrubber.awsRegion }} - name: REGION value: {{ .Values.storageScrubber.awsRegion }} + {{- end }} + {{- if .Values.storageScrubber.remoteStorageConfig }} + - name: REMOTE_STORAGE_CONFIG + value: {{ toToml .Values.storageScrubber.remoteStorageConfig | nindent 20 }} + {{- end }} {{- if .Values.settings }} {{- with .Values.settings.sentryUrl }} - name: SENTRY_DSN diff --git a/charts/neon-storage-scrubber/values.yaml b/charts/neon-storage-scrubber/values.yaml index 64150bc..0551265 100644 --- a/charts/neon-storage-scrubber/values.yaml +++ b/charts/neon-storage-scrubber/values.yaml @@ -43,6 +43,8 @@ storageScrubber: awsRegion: "" # -- The AWS bucket for the pageserver storage awsBucket: "" + # -- The config object to connect to the remote storage (alternative to previous two vars) + remoteStorageConfig: {} # -- The timezone for the cron job timeZone: "Etc/UTC" # -- The schedule for the cron job -- By default runs every day at 6pm