Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Add option to provide images used by jobs, bump chart version, update…
Browse files Browse the repository at this point in the history
… schemas, add icon to remove helm lint warning (#558)
  • Loading branch information
pchang388 authored Jan 25, 2023
1 parent 3a84626 commit 854b78e
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 8 deletions.
4 changes: 3 additions & 1 deletion charts/timescaledb-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
apiVersion: v1
name: timescaledb-single
description: 'TimescaleDB HA Deployment.'
version: 0.31.0
version: 0.32.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,
# e.g. TimescaleDB 1.4.1 on PostgreSQL 11 or TimescaleDB 1.5.0 on PostgreSQL 12.
# https://github.com/helm/helm/blob/master/docs/charts.md#the-appversion-field
Expand Down
3 changes: 2 additions & 1 deletion charts/timescaledb-single/templates/job-update-patroni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ spec:
restartPolicy: OnFailure
containers:
- name: {{ template "timescaledb.fullname" . }}-patch-patroni-config
image: curlimages/curl
image: "{{ .Values.curlImage.repository }}:{{ .Values.curlImage.tag }}"
imagePullPolicy: {{ .Values.curlImage.pullPolicy }}
command: ["/bin/sh"]
# Patching the Patroni configuration is good, however it should not block an upgrade from going through
# Therefore we ensure we always exit with an exitcode 0, so that Helm is satisfied with this upgrade job
Expand Down
3 changes: 2 additions & 1 deletion charts/timescaledb-single/templates/pgbackrest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ spec:
restartPolicy: OnFailure
containers:
- name: {{ template "timescaledb.fullname" $ }}-{{ .type }}
image: curlimages/curl
image: "{{ .Values.curlImage.repository }}:{{ .Values.curlImage.tag }}"
imagePullPolicy: {{ .Values.curlImage.pullPolicy }}
command: ["/usr/bin/curl"]
args:
- --connect-timeout
Expand Down
29 changes: 26 additions & 3 deletions charts/timescaledb-single/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,28 @@
"maxLength": 30,
"type": "string"
},
"curlImage": {
"additionalProperties": false,
"properties": {
"pullPolicy": {
"enum": [
"Always",
"Never",
"IfNotPresent"
],
"type": "string"
},
"repository": {
"minLength": 1,
"type": "string"
},
"tag": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"debug": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -571,9 +593,6 @@
"prometheus": {
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"args": {
"items": {
"type": "string"
Expand All @@ -583,6 +602,9 @@
"null"
]
},
"enabled": {
"type": "boolean"
},
"env": {
"items": {
"type": "object"
Expand Down Expand Up @@ -795,6 +817,7 @@
"debug",
"fullnameOverride",
"image",
"curlImage",
"networkPolicy",
"nodeSelector",
"patroni",
Expand Down
19 changes: 17 additions & 2 deletions charts/timescaledb-single/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ required:
- debug
- fullnameOverride
- image
- curlImage
- networkPolicy
- nodeSelector
- patroni
Expand Down Expand Up @@ -176,8 +177,6 @@ properties:
affinity:
type: object
additionalProperties: true
affinityTemplate:
type: string
serviceAccount:
type: object
additionalProperties: false
Expand Down Expand Up @@ -511,6 +510,22 @@ properties:
- Always
- Never
- IfNotPresent
curlImage:
type: object
additionalProperties: false
properties:
repository:
type: string
minLength: 1
tag:
type: string
minLength: 1
pullPolicy:
type: string
enum:
- Always
- Never
- IfNotPresent
replicaCount:
type: integer
minimum: 0
Expand Down
8 changes: 8 additions & 0 deletions charts/timescaledb-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ image:
tag: pg14.6-ts2.9.1-p1
pullPolicy: Always

# There are job and cronjob resources that run during updates or backups that use curl image
# Users in that want to define their own curl image can set it below
# Example: https://github.com/timescale/helm-charts/blob/main/charts/timescaledb-single/templates/job-update-patroni.yaml
curlImage:
repository: curlimages/curl
tag: "7.87.0"
pullPolicy: Always

# 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.
Expand Down

0 comments on commit 854b78e

Please sign in to comment.