diff --git a/charts/timescaledb-single/Chart.yaml b/charts/timescaledb-single/Chart.yaml index 84e86776..6214f604 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.34.0 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/docs/admin-guide.md b/charts/timescaledb-single/docs/admin-guide.md index fb0c228f..26796cb2 100644 --- a/charts/timescaledb-single/docs/admin-guide.md +++ b/charts/timescaledb-single/docs/admin-guide.md @@ -30,6 +30,7 @@ The following table lists the configurable parameters of the TimescaleDB Helm ch | `backup.resources` | Any resources you wish to assign to the pgbackrest container | `{}` | | `callbacks.configMap` | A kubernetes ConfigMap containing [Patroni callbacks](#callbacks). You can use templates in the name. | `nil` | | `clusterName` | Override the name of the PostgreSQL cluster | Equal to the Helm release name | +| `curl.resources` | Any resources you wish to assign to the job and cronjob containers which are using the curl image | `{}` | | `env` | Extra custom environment variables, expressed as [EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#envvarsource-v1-core) | `[]` | | `envFrom` | Extra custom environment variables, expressed as [EnvFrom](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#envfromsource-v1-core) | `[]` | | `fullnameOverride` | Override the fullname of the chart | `nil` | @@ -67,6 +68,7 @@ The following table lists the configurable parameters of the TimescaleDB Helm ch | `pgBouncer.enabled` | If enabled, run a [pgBouncer](https://www.pgbouncer.org/) sidecar | `false` | | `pgBouncer.port` | The port on which the Load Balancer should listen for pgBouncer requests | `6432` | | `pgBouncer.pg_hba` | The `pg_hba` to be used by pgBouncer | A `pg_hba` allowing non-superuser ssl-only connections | +| `pgBouncer.resources` | Any resources you wish to assign to the pgBouncer container | `{}` | | `pgBouncer.userListSecretName` | If set, a [user authentication file](https://www.pgbouncer.org/config.html#authentication-file-format) to be used by pgBouncer. | `nil` | | `podManagementPolicy` | Either [`OrderedReady` or `Parallel`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies) | `OrderedReady` | | `podMonitor.enabled` | Enable deployment of podMonitor used with prometheus-operator. | `false` | @@ -81,6 +83,7 @@ The following table lists the configurable parameters of the TimescaleDB Helm ch | `prometheus.image.pullPolicy` | The pull policy for the postgres\_exporter | `IfNotPresent` | | `prometheus.image.repository` | The postgres\_exporter docker repo | `quay.io/prometheuscommunity/postgres_exporter` | | `prometheus.image.tag` | The tag of the postgres\_exporter image | `v0.11.0` | +| `prometheus.resources` | Any resources you wish to assign to the postgres-exporter container | `{}` | | `rbac.create` | Create required role and rolebindings | `true` | | `replicaCount` | Amount of pods to spawn | `3` | | `resources` | Any resources you wish to assign to the timescaledb container | `{}` | diff --git a/charts/timescaledb-single/templates/job-update-patroni.yaml b/charts/timescaledb-single/templates/job-update-patroni.yaml index b85fa454..dfd89632 100644 --- a/charts/timescaledb-single/templates/job-update-patroni.yaml +++ b/charts/timescaledb-single/templates/job-update-patroni.yaml @@ -46,3 +46,5 @@ spec: {{ .Values.patroni.bootstrap.dcs | toJson | quote }} \ "http://{{ template "clusterName" . }}-config:8008/config" exit 0 + resources: + {{- toYaml .Values.curl.resources | nindent 10 }} diff --git a/charts/timescaledb-single/templates/pgbackrest.yaml b/charts/timescaledb-single/templates/pgbackrest.yaml index a4e0940f..718279f8 100644 --- a/charts/timescaledb-single/templates/pgbackrest.yaml +++ b/charts/timescaledb-single/templates/pgbackrest.yaml @@ -71,6 +71,8 @@ spec: - | {"type": {{ quote .type }}} - "http://{{ template "timescaledb.fullname" $ }}-backup:8081/backups/" + resources: + {{- toYaml $.Values.curl.resources | nindent 16 }} ... {{- end }} {{ end }} diff --git a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml index 7e63437d..e6d742a4 100644 --- a/charts/timescaledb-single/templates/statefulset-timescaledb.yaml +++ b/charts/timescaledb-single/templates/statefulset-timescaledb.yaml @@ -93,7 +93,7 @@ spec: mountPath: {{ template "scripts_dir" . }} readOnly: true resources: - {{ toYaml .Values.resources | nindent 10 }} + {{- toYaml .Values.resources | nindent 10 }} {{- end }} # Issuing the final checkpoints on a busy database may take considerable time. # Unfinished checkpoints will require more time during startup, so the tradeoff @@ -318,7 +318,7 @@ spec: name: pgbackrest-bootstrap readOnly: true resources: - {{ toYaml .Values.resources | nindent 10 }} + {{- toYaml .Values.resources | nindent 10 }} {{- if .Values.pgBouncer.enabled }} - name: pgbouncer @@ -361,6 +361,8 @@ spec: - -i - /usr/sbin/pgbouncer - /etc/pgbouncer/pgbouncer-sidecar.ini + resources: + {{- toYaml .Values.pgBouncer.resources | nindent 10 }} {{- end }} {{- if or .Values.backup.enabled .Values.backup.enable }} @@ -375,7 +377,7 @@ spec: - containerPort: 8081 name: pgbackrest resources: - {{ toYaml .Values.backup.resources | nindent 10 }} + {{- toYaml .Values.backup.resources | nindent 10 }} volumeMounts: - name: socket-directory mountPath: /var/run/postgresql @@ -451,6 +453,8 @@ spec: {{- if .Values.prometheus.env }} {{ .Values.prometheus.env | default list | toYaml | nindent 8 }} {{- end }} + resources: + {{- toYaml .Values.prometheus.resources | nindent 10 }} {{- end }} {{- with .Values.nodeSelector }} diff --git a/charts/timescaledb-single/values.schema.json b/charts/timescaledb-single/values.schema.json index a65ec74b..aaca4d0a 100644 --- a/charts/timescaledb-single/values.schema.json +++ b/charts/timescaledb-single/values.schema.json @@ -6,6 +6,24 @@ "mimimum": 0, "type": "integer" }, + "resources": { + "additionalProperties": false, + "properties": { + "limits": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "requests": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "service": { "additionalProperties": false, "properties": { @@ -142,10 +160,7 @@ ] }, "resources": { - "type": [ - "object", - "null" - ] + "$ref": "#/definitions/resources" } }, "required": [ @@ -192,6 +207,15 @@ "maxLength": 30, "type": "string" }, + "curl": { + "additionalProperties": false, + "properties": { + "resources": { + "$ref": "#/definitions/resources" + } + }, + "type": "object" + }, "curlImage": { "additionalProperties": false, "properties": { @@ -541,6 +565,9 @@ ], "type": "integer" }, + "resources": { + "$ref": "#/definitions/resources" + }, "userListSecretName": { "description": "A pointer to a SecretName containing user/password pairs in the format expected by pgbouncer\nhttps://www.pgbouncer.org/config.html#authentication-file-format\n", "type": [ @@ -617,6 +644,9 @@ "image": { "type": "object" }, + "resources": { + "$ref": "#/definitions/resources" + }, "volumeMounts": { "items": { "type": "object" @@ -682,22 +712,7 @@ "type": "integer" }, "resources": { - "additionalProperties": false, - "properties": { - "limits": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "requests": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" + "$ref": "#/definitions/resources" }, "schedulerName": { "type": "string" @@ -814,10 +829,11 @@ "backup", "bootstrapFromBackup", "callbacks", + "curl", + "curlImage", "debug", "fullnameOverride", "image", - "curlImage", "networkPolicy", "nodeSelector", "patroni", diff --git a/charts/timescaledb-single/values.schema.yaml b/charts/timescaledb-single/values.schema.yaml index dca9835f..2673bf0d 100644 --- a/charts/timescaledb-single/values.schema.yaml +++ b/charts/timescaledb-single/values.schema.yaml @@ -14,10 +14,11 @@ required: - backup - bootstrapFromBackup - callbacks + - curl + - curlImage - debug - fullnameOverride - image - - curlImage - networkPolicy - nodeSelector - patroni @@ -163,17 +164,7 @@ properties: - array - "null" resources: - type: object - additionalProperties: false - properties: - limits: - type: object - additionalProperties: - type: string - requests: - type: object - additionalProperties: - type: string + "$ref": "#/definitions/resources" affinity: type: object additionalProperties: true @@ -350,6 +341,8 @@ properties: type: object image: type: object + resources: + "$ref": "#/definitions/resources" volumes: type: - array @@ -410,6 +403,8 @@ properties: type: - object - "null" + resources: + "$ref": "#/definitions/resources" nodeSelector: type: object podAnnotations: @@ -469,9 +464,7 @@ properties: - array - "null" resources: - type: - - object - - "null" + "$ref": "#/definitions/resources" secrets: type: object additionalProperties: false @@ -510,6 +503,12 @@ properties: - Always - Never - IfNotPresent + curl: + type: object + additionalProperties: false + properties: + resources: + "$ref": "#/definitions/resources" curlImage: type: object additionalProperties: false @@ -588,6 +587,18 @@ definitions: - "null" additionalProperties: type: string + resources: + type: object + additionalProperties: false + properties: + limits: + type: object + additionalProperties: + type: string + requests: + type: object + additionalProperties: + type: string volume: type: object additionalProperties: false diff --git a/charts/timescaledb-single/values.yaml b/charts/timescaledb-single/values.yaml index 00296895..cb7ee278 100644 --- a/charts/timescaledb-single/values.yaml +++ b/charts/timescaledb-single/values.yaml @@ -31,6 +31,19 @@ curlImage: tag: "7.87.0" pullPolicy: Always +# There are job and cronjob resources that run during updates or backups that use curl image +# Example: https://github.com/timescale/helm-charts/blob/main/charts/timescaledb-single/templates/job-update-patroni.yaml +curl: + resources: {} + # If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + # 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. @@ -474,6 +487,7 @@ pgBouncer: - hostssl all all ::0/0 md5 - hostnossl all all 0.0.0.0/0 reject - hostnossl all all ::0/0 reject + resources: {} # Secret should contain user/password pairs in the format expected by pgbouncer # https://www.pgbouncer.org/config.html#authentication-file-format # example: @@ -518,13 +532,13 @@ prometheus: # secretKeyRef: # name: myapplication-passwords # key: standby - # Additional volumes for prometheus, e.g., to support additional queries. - # These should be a Volume, as this allows you to inject any kind of Volume - # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#volume-v1-core - + resources: {} # Extra custom CLI arguments for postgres_exporter. args: [] # - --collector.database=disabled + # Additional volumes for prometheus, e.g., to support additional queries. + # These should be a Volume, as this allows you to inject any kind of Volume + # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#volume-v1-core volumes: # - name: exporter-config # configMap: