Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions helm-valueFiles-glob/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: demo-app
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-single-star
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/single-star/*.yaml
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-double-star
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/double-star/**/*.yaml # a.yaml, b.yaml, nested/c.yaml
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-03.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-numeric-prefix
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/numeric-prefix/*.yaml # 00-, 10-, 20- will be applied in that order
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-multi-key
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/multi-key/*.yaml # a.yaml, b.yaml will be applied in that order
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
18 changes: 18 additions & 0 deletions helm-valueFiles-glob/apps/app-05.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-multi-entry
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/multi-entry/base.yaml
- values/multi-entry/overrides/*.yaml # x.yaml and y.yaml
- values/multi-entry/final.yaml
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-06.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-char-class
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/char-class/[a-b].yaml # a.yaml, b.yaml (c.yaml will be ignored)
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
16 changes: 16 additions & 0 deletions helm-valueFiles-glob/apps/app-07.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-single-char-wildcard
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
valueFiles:
- values/single-char-wildcard/e?.yaml # ea.yaml and eb.yaml (eab.yaml will be ignored)
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
18 changes: 18 additions & 0 deletions helm-valueFiles-glob/apps/app-08.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: glob-ignore-missing
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: helm-valueFiles-glob
helm:
ignoreMissingValueFiles: true
valueFiles:
# no files will be matched, but since ignoreMissingValueFiles is true, it will not error out
# hence default values will be used for the helm chart
- values/no-match/staging-*.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- values/no-match/staging-*.yaml
- values/no-match/staging-*.yaml
destination:

(The spaces number may be wrong though as suggesting from the GH UI)

server: https://kubernetes.default.svc
namespace: default
project: default
7 changes: 7 additions & 0 deletions helm-valueFiles-glob/templates/cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
data:
foo: {{ .Values.foo }}
bar: {{ .Values.bar }}
2 changes: 2 additions & 0 deletions helm-valueFiles-glob/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
foo: default
bar: default
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/char-class/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: a-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/char-class/b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: b-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/char-class/c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: c-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/double-star/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: a-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/double-star/b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: b-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/double-star/nested/c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: c-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/ignore-missing/real.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: real-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-entry/base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: base-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-entry/final.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: final-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-entry/overrides/x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: x-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-entry/overrides/y.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: y-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-key/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: foo-from-a
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/multi-key/b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar: bar-from-b
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/no-match/real.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: real-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/numeric-prefix/00-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: base
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/numeric-prefix/10-region.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: region
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/numeric-prefix/20-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: dev
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/single-char-wildcard/ea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: from-ea
2 changes: 2 additions & 0 deletions helm-valueFiles-glob/values/single-char-wildcard/eab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
foo: overriden-by-eab
bar: overriden-by-eab
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/single-char-wildcard/eb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar: from-eb
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/single-star/a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: a-value
1 change: 1 addition & 0 deletions helm-valueFiles-glob/values/single-star/b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo: b-value