Skip to content

Commit 8ca9c90

Browse files
authored
feat: add appVersion to Chart.yaml (#50)
The application version being deployed is usually kept in the Chart.yaml and used as the default image.tag version is one is not supplied. This adds the appVersion to the Chart.yaml and updates the tag of the Docker image to use this appVersion by default.
1 parent 17ac508 commit 8ca9c90

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Chart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
apiVersion: v1
22
name: pgdog
33
version: v0.28
4+
appVersion: "0.1.21"

templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
{{- if .Values.image.name }}
4343
image: {{ .Values.image.name }}
4444
{{- else }}
45-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
45+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4646
{{- end }}
4747
imagePullPolicy: {{ .Values.image.pullPolicy }}
4848
command: ["/usr/local/bin/pgdog"]

values.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ podAnnotations: {}
2424
image:
2525
# repository is the Docker image repository
2626
repository: ghcr.io/pgdogdev/pgdog
27-
# tag is the Docker image tag (defaults to "latest" if not specified)
28-
tag: "latest"
27+
# tag is the Docker image tag (defaults to Chart appVersion if not specified)
28+
tag: ""
2929
# pullPolicy specifies when to use cached version of the image.
3030
pullPolicy: IfNotPresent
3131
# name is the full image name (DEPRECATED: use repository and tag)
@@ -164,7 +164,6 @@ service:
164164
# Valid values: "internet-facing" or "internal"
165165
scheme: "internal"
166166

167-
168167
# nodeSelector allows scheduling pods on nodes with specific labels
169168
nodeSelector: {}
170169

@@ -375,7 +374,6 @@ queryStats:
375374
queryPlansCache: 100
376375
maxErrors: 100
377376
maxErrorAge: 300000
378-
379377
# LSN check configuration for replication failover auto mode (in milliseconds)
380378
# See: https://docs.pgdog.dev/features/load-balancer/replication-failover/
381379
# lsnCheckDelay: 0 # Set to 0 to start LSN monitoring immediately

0 commit comments

Comments
 (0)