forked from kubernetes-sigs/kustomize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for more helm template args (kubernetes-sigs#4926)
* support for more helm template args * move templateArgs and unit tests to api/types * undo package name change * use our own simple helm chart instead of forking one * add argument to AsHelmArgs * code review * lint errors
- Loading branch information
1 parent
2361660
commit 1957d5c
Showing
21 changed files
with
432 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A simple test helm chart. | ||
name: test | ||
version: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a simple test chart. |
7 changes: 7 additions & 0 deletions
7
api/krusty/testdata/helmcharts/test-chart/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- define "apiversion" -}} | ||
{{- if .Capabilities.APIVersions.Has "foo/v1" -}} | ||
foo/v1 | ||
{{- else -}} | ||
apps/v1 | ||
{{- end -}} | ||
{{- end -}} |
18 changes: 18 additions & 0 deletions
18
api/krusty/testdata/helmcharts/test-chart/templates/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: {{ template "apiversion" . }} | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
name: my-deploy | ||
namespace: {{ .Values.data.namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Chart.Name }} | ||
template: | ||
spec: | ||
containers: | ||
- image: "{{ .Values.data.image.name }}:{{ .Values.data.image.tag }}" | ||
imagePullPolicy: {{ .Values.data.image.imagePullPolicy }} |
6 changes: 6 additions & 0 deletions
6
api/krusty/testdata/helmcharts/test-chart/templates/tests/test-pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: {{ template "apiversion" . }} | ||
kind: Pod | ||
metadata: | ||
name: {{ .Release.Name }} | ||
annotations: | ||
"helm.sh/hook": test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
data: | ||
namespace: default | ||
image: | ||
name: test-image | ||
tag: v1.0.0 | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
data: | ||
image: | ||
name: test-image-file1 | ||
tag: file1 | ||
imagePullPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data: | ||
namespace: file-2 |
Oops, something went wrong.