From 3121628924c7a8f2d7fa13a67721aa7a0399f070 Mon Sep 17 00:00:00 2001 From: Tobias Jacob Date: Wed, 22 Jun 2022 17:42:38 +0200 Subject: [PATCH 1/3] Fix #382 --- .../templates/statefulset-timescaledb.yaml | 1 + charts/timescaledb-single/values.schema.json | 7 +++++++ charts/timescaledb-single/values.schema.yaml | 5 +++++ charts/timescaledb-single/values.yaml | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml index c2fbcd28..f4ba9bae 100644 --- a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml +++ b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml @@ -34,6 +34,7 @@ spec: {{- end }} spec: serviceAccountName: {{ template "timescaledb.serviceAccountName" . }} + priorityClassName: {{ .Values.priorityClassName }} securityContext: # The postgres user inside the TimescaleDB image has uid=1000. # This configuration ensures the permissions of the mounts are suitable diff --git a/charts/timescaledb-single/values.schema.json b/charts/timescaledb-single/values.schema.json index be0ea471..d3975a21 100644 --- a/charts/timescaledb-single/values.schema.json +++ b/charts/timescaledb-single/values.schema.json @@ -823,6 +823,13 @@ "integer", "null" ] + }, + "priorityClassName": { + "minimum": 1, + "type": [ + "integer", + "null" + ] } }, "required": [ diff --git a/charts/timescaledb-single/values.schema.yaml b/charts/timescaledb-single/values.schema.yaml index 4f7f47d4..388b7cee 100644 --- a/charts/timescaledb-single/values.schema.yaml +++ b/charts/timescaledb-single/values.schema.yaml @@ -536,6 +536,11 @@ properties: - "null" minimum: 11 maximum: 14 + priorityClassName: + type: + - string + - "null" + minLength: 1 nameOverride: type: - string diff --git a/charts/timescaledb-single/values.yaml b/charts/timescaledb-single/values.yaml index 67f1d455..cdacd8d1 100644 --- a/charts/timescaledb-single/values.yaml +++ b/charts/timescaledb-single/values.yaml @@ -23,6 +23,11 @@ image: tag: pg14.3-ts2.7.0-p0 pullPolicy: Always +## @param priorityClassName Name of the existing priority class to be used by kafka pods +## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ +## +priorityClassName: "timescaledb" + # By default those secrets are randomly generated. # To prevent misconfiguration, modifications from helm upgrade won't be applied to those secrets. # As a result changing secrets cannot be done via helm and need manual intervention. From 5ec2a2154144041c0ac469fe38e7f04373890c2f Mon Sep 17 00:00:00 2001 From: Tobias Jacob Date: Wed, 22 Jun 2022 17:43:47 +0200 Subject: [PATCH 2/3] Fix #389 --- charts/timescaledb-single/values.yaml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/charts/timescaledb-single/values.yaml b/charts/timescaledb-single/values.yaml index cdacd8d1..094ea7b1 100644 --- a/charts/timescaledb-single/values.yaml +++ b/charts/timescaledb-single/values.yaml @@ -57,12 +57,13 @@ secrets: certificateSecretName: "" # This secret should contain environment variables that influence pgBackRest. - pgbackrest: - PGBACKREST_REPO1_S3_REGION: "" - PGBACKREST_REPO1_S3_KEY: "" - PGBACKREST_REPO1_S3_KEY_SECRET: "" - PGBACKREST_REPO1_S3_BUCKET: "" - PGBACKREST_REPO1_S3_ENDPOINT: "s3.amazonaws.com" + pgbackrest: {} + # Example configuration + # PGBACKREST_REPO1_S3_REGION: "" + # PGBACKREST_REPO1_S3_KEY: "" + # PGBACKREST_REPO1_S3_KEY_SECRET: "" + # PGBACKREST_REPO1_S3_BUCKET: "" + # PGBACKREST_REPO1_S3_ENDPOINT: "s3.amazonaws.com" # Selector used to provision your own Secret containing pgbackrest configuration details # This is mutually exclusive with `pgbackrest` option and takes precedence over it. @@ -80,10 +81,18 @@ backup: start-fast: "y" repo1-retention-diff: 2 repo1-retention-full: 2 - repo1-type: s3 repo1-cipher-type: "none" - repo1-s3-region: us-east-2 - repo1-s3-endpoint: s3.amazonaws.com + + # Example for s3 + # repo1-type: s3 + # repo1-s3-region: us-east-2 + # repo1-s3-endpoint: s3.amazonaws.com + + # Example for azure + # repo1-type: azure + # repo1-azure-account: azurestorageaccount + # repo1-azure-container: timescaledbcontainer + # repo1-azure-key: Ozz7nHipXVvL4M8rqvjlR1gBs/jShsWtaERPnOy3Ja6MRcIK8211Hkvg3N8by3uPBcxkT4K6nrGY+0Hjq58jMz== # Overriding the archive-push/archive-get sections is most useful in # very high througput situations. Look at values/high_throuhgput_example.yaml for more details From 2f8637021a55d0842c6bb4fa1bb95a033231a826 Mon Sep 17 00:00:00 2001 From: Tobias Jacob Date: Wed, 3 Aug 2022 18:25:38 +0200 Subject: [PATCH 3/3] Make priority class optional --- .../timescaledb-single/templates/statefulset-timescaledb.yaml | 2 ++ charts/timescaledb-single/values.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml index 19a29691..3581e681 100644 --- a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml +++ b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml @@ -30,7 +30,9 @@ spec: {{- end }} spec: serviceAccountName: {{ template "timescaledb.serviceAccountName" . }} + {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} + {{- end }} securityContext: # The postgres user inside the TimescaleDB image has uid=1000. # This configuration ensures the permissions of the mounts are suitable diff --git a/charts/timescaledb-single/values.yaml b/charts/timescaledb-single/values.yaml index 8f19c32c..abd15339 100644 --- a/charts/timescaledb-single/values.yaml +++ b/charts/timescaledb-single/values.yaml @@ -26,7 +26,7 @@ image: ## @param priorityClassName Name of the existing priority class to be used by kafka pods ## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ ## -priorityClassName: "timescaledb" +priorityClassName: # By default those secrets are randomly generated. # To prevent misconfiguration, modifications from helm upgrade won't be applied to those secrets.