Skip to content

Commit

Permalink
Chart: Update postgres subchart to 10.5.3 (apache#17041)
Browse files Browse the repository at this point in the history
We were on 6.3.12 and the current latest version is 10.5.3.

We have dropped support for Helm 2 already so Helm 3 users won't be affected. Secondly this postgres should only used for development, not production.
  • Loading branch information
kaxil authored Jul 21, 2021
1 parent eb3d685 commit 96fd413
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions chart/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 6.3.12
digest: sha256:9c524b20b23abd5ec3a6e264dbf2bd2e2d50fb5a553d7c1d79f88efa0dc69cb9
generated: "2021-03-02T18:40:05.677618583-05:00"
version: 10.5.3
digest: sha256:d8ba564b767cbf73a4ca87cb3b97e0a75bc813ba0a58a1b0bd6c7154a608e783
generated: "2021-07-20T23:05:18.37915+01:00"
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ keywords:
- scheduler
dependencies:
- name: postgresql
version: 6.3.12
version: 10.5.3
repository: "https://charts.bitnami.com/bitnami"
condition: postgresql.enabled
maintainers:
Expand Down
7 changes: 6 additions & 1 deletion chart/tests/helm_template_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ def create_validator(api_version, kind):

def validate_k8s_object(instance):
# Skip PostgresSQL chart
chart = jmespath.search("metadata.labels.chart", instance)
labels = jmespath.search("metadata.labels", instance)
if "helm.sh/chart" in labels:
chart = labels["helm.sh/chart"]
else:
chart = labels.get("chart")

if chart and 'postgresql' in chart:
return

Expand Down
6 changes: 5 additions & 1 deletion chart/tests/test_basic_helm_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ def test_basic_deployments(self):
assert OBJECT_COUNT_IN_BASIC_DEPLOYMENT == len(k8s_objects)
for k8s_object in k8s_objects:
labels = jmespath.search('metadata.labels', k8s_object) or {}
if 'postgresql' in labels.get('chart'):
if 'helm.sh/chart' in labels:
chart_name = labels.get('helm.sh/chart')
else:
chart_name = labels.get('chart')
if chart_name and 'postgresql' in chart_name:
continue
k8s_name = k8s_object['kind'] + ":" + k8s_object['metadata']['name']
assert 'TEST-VALUE' == labels.get(
Expand Down

0 comments on commit 96fd413

Please sign in to comment.