diff --git a/charts/timescaledb-single/Chart.yaml b/charts/timescaledb-single/Chart.yaml index 84e86776..cdf38a43 100644 --- a/charts/timescaledb-single/Chart.yaml +++ b/charts/timescaledb-single/Chart.yaml @@ -4,7 +4,7 @@ apiVersion: v1 name: timescaledb-single description: 'TimescaleDB HA Deployment.' -version: 0.33.2 +version: 0.33.3 icon: https://cdn.iconscout.com/icon/free/png-256/timescaledb-1958407-1651618.png # appVersion specifies the version of the software, which can vary wildly, diff --git a/charts/timescaledb-single/templates/pgbackrest.yaml b/charts/timescaledb-single/templates/pgbackrest.yaml index a4e0940f..ec167cc6 100644 --- a/charts/timescaledb-single/templates/pgbackrest.yaml +++ b/charts/timescaledb-single/templates/pgbackrest.yaml @@ -71,6 +71,18 @@ spec: - | {"type": {{ quote .type }}} - "http://{{ template "timescaledb.fullname" $ }}-backup:8081/backups/" + {{- with $.Values.backup.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.Values.backup.tolerations }} + tolerations: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if $.Values.backup.affinity }} + affinity: + {{- $.Values.backup.affinity | toYaml | nindent 12 }} + {{- end }} ... {{- end }} {{ end }} diff --git a/charts/timescaledb-single/values.schema.json b/charts/timescaledb-single/values.schema.json index a65ec74b..75a0a099 100644 --- a/charts/timescaledb-single/values.schema.json +++ b/charts/timescaledb-single/values.schema.json @@ -120,6 +120,16 @@ "null" ] }, + "affinity": { + "additionalProperties": true, + "type": "object" + }, + "tolerations": { + "type": "array" + }, + "nodeSelector": { + "type": "object" + }, "jobs": { "type": "array" }, diff --git a/charts/timescaledb-single/values.schema.yaml b/charts/timescaledb-single/values.schema.yaml index dca9835f..340bd91a 100644 --- a/charts/timescaledb-single/values.schema.yaml +++ b/charts/timescaledb-single/values.schema.yaml @@ -472,6 +472,13 @@ properties: type: - object - "null" + nodeSelector: + type: object + tolerations: + type: array + affinity: + type: object + additionalProperties: true secrets: type: object additionalProperties: false diff --git a/charts/timescaledb-single/values.yaml b/charts/timescaledb-single/values.yaml index 00296895..a1fd9d69 100644 --- a/charts/timescaledb-single/values.yaml +++ b/charts/timescaledb-single/values.yaml @@ -147,6 +147,27 @@ backup: # requests: # cpu: 100m # memory: 128Mi + # https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + # tolerations: + # - key: node-group + # operator: Equal + # value: spot-job + tolerations: [] + # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + # affinity: + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: node-group + # operator: In + # values: + # - spot-job + affinity: {} + # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector + # nodeSelector: + # node-group: spot-job + nodeSelector: {} # When creating a *new* deployment, the default is to initialize (using initdb) the database. # If however, you want to initialize the database using an existing backup, you can do so by