Skip to content

Commit

Permalink
Global & specific values
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Sep 30, 2024
1 parent 331513f commit f30855e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
9 changes: 4 additions & 5 deletions apps/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ spec:
helm:
releaseName: "umbrella"
values: |
backend:
global:
common:
version: "1.2"
version: "1.0"
backend:
image:
tag: "1.22"
tag: "1.20"
frontend:
common:
version: "1.2"
image:
tag: "1.22"
destination:
Expand Down
2 changes: 1 addition & 1 deletion charts/backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: backend
description: A Helm chart for testing purposes
type: application
version: "1.1.0"
version: "1.2.0"
appVersion: "1.0"
2 changes: 1 addition & 1 deletion charts/backend/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ConfigMap
metadata:
name: backend-cm
data:
COMMON_VERSION: "{{ .Values.common.version }}"
COMMON_VERSION: {{ .Values.common.version | default .Values.global.common.version | quote }}
3 changes: 3 additions & 0 deletions charts/backend/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
global:
common:
version: 0.0
common:
version: 0.0
image:
Expand Down
2 changes: 1 addition & 1 deletion charts/frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: frontend
description: A Helm chart for testing purposes
type: application
version: "1.1.0"
version: "1.2.0"
appVersion: "1.0"
2 changes: 1 addition & 1 deletion charts/frontend/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ConfigMap
metadata:
name: frontend-cm
data:
COMMON_VERSION: "{{ .Values.common.version }}"
COMMON_VERSION: {{ .Values.common.version | default .Values.global.common.version | quote }}
3 changes: 3 additions & 0 deletions charts/frontend/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
global:
common:
version: 0.0
common:
version: 0.0
image:
Expand Down

0 comments on commit f30855e

Please sign in to comment.