-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(loader): error out when loading irregular files
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
- Loading branch information
Matthew Fisher
committed
Oct 29, 2019
1 parent
82a100b
commit 5a7d4f1
Showing
44 changed files
with
261 additions
and
0 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
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
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 @@ | ||
LICENSE placeholder. |
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 @@ | ||
ignore/ |
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,8 @@ | ||
dependencies: | ||
- name: alpine | ||
version: "0.1.0" | ||
repository: https://example.com/charts | ||
- name: mariner | ||
version: "4.3.2" | ||
repository: https://example.com/charts | ||
digest: invalid |
27 changes: 27 additions & 0 deletions
27
pkg/chart/loader/testdata/frobnitz_with_dev_null/Chart.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,27 @@ | ||
apiVersion: v1 | ||
name: frobnitz | ||
description: This is a frobnitz. | ||
version: "1.2.3" | ||
keywords: | ||
- frobnitz | ||
- sprocket | ||
- dodad | ||
maintainers: | ||
- name: The Helm Team | ||
email: helm@example.com | ||
- name: Someone Else | ||
email: nobody@example.com | ||
sources: | ||
- https://example.com/foo/bar | ||
home: http://example.com | ||
icon: https://example.com/64x64.png | ||
annotations: | ||
extrakey: extravalue | ||
anotherkey: anothervalue | ||
dependencies: | ||
- name: alpine | ||
version: "0.1.0" | ||
repository: https://example.com/charts | ||
- name: mariner | ||
version: "4.3.2" | ||
repository: https://example.com/charts |
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 an install document. The client may display this. |
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 @@ | ||
LICENSE placeholder. |
11 changes: 11 additions & 0 deletions
11
pkg/chart/loader/testdata/frobnitz_with_dev_null/README.md
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,11 @@ | ||
# Frobnitz | ||
|
||
This is an example chart. | ||
|
||
## Usage | ||
|
||
This is an example. It has no usage. | ||
|
||
## Development | ||
|
||
For developer info, see the top-level repository. |
1 change: 1 addition & 0 deletions
1
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me
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 should be ignored by the loader, but may be included in a chart. |
5 changes: 5 additions & 0 deletions
5
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.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,5 @@ | ||
apiVersion: v1 | ||
name: alpine | ||
description: Deploy a basic Alpine Linux pod | ||
version: 0.1.0 | ||
home: https://helm.sh/helm |
9 changes: 9 additions & 0 deletions
9
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md
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,9 @@ | ||
This example was generated using the command `helm create alpine`. | ||
|
||
The `templates/` directory contains a very simple pod resource with a | ||
couple of parameters. | ||
|
||
The `values.toml` file contains the default values for the | ||
`alpine-pod.yaml` template. | ||
|
||
You can install this example using `helm install ./alpine`. |
5 changes: 5 additions & 0 deletions
5
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.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,5 @@ | ||
apiVersion: v1 | ||
name: mast1 | ||
description: A Helm chart for Kubernetes | ||
version: 0.1.0 | ||
home: "" |
4 changes: 4 additions & 0 deletions
4
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.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,4 @@ | ||
# Default values for mast1. | ||
# This is a YAML-formatted file. | ||
# Declare name/value pairs to be passed into your templates. | ||
# name = "value" |
Binary file added
BIN
+252 Bytes
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{.Release.Name}}-{{.Chart.Name}} | ||
labels: | ||
app.kubernetes.io/managed-by: {{.Release.Service}} | ||
app.kubernetes.io/name: {{.Chart.Name}} | ||
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" | ||
spec: | ||
restartPolicy: {{default "Never" .restart_policy}} | ||
containers: | ||
- name: waiter | ||
image: "alpine:3.9" | ||
command: ["/bin/sleep","9000"] |
2 changes: 2 additions & 0 deletions
2
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.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,2 @@ | ||
# The pod name | ||
name: "my-alpine" |
Binary file added
BIN
+967 Bytes
pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz
Binary file not shown.
1 change: 1 addition & 0 deletions
1
pkg/chart/loader/testdata/frobnitz_with_dev_null/docs/README.md
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 placeholder for documentation. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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 @@ | ||
/dev/null |
1 change: 1 addition & 0 deletions
1
pkg/chart/loader/testdata/frobnitz_with_dev_null/templates/template.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 @@ | ||
Hello {{.Name | default "world"}} |
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 @@ | ||
# A values file contains configuration. | ||
|
||
name: "Some Name" | ||
|
||
section: | ||
name: "Name in a section" |
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 @@ | ||
ignore/ |
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,8 @@ | ||
dependencies: | ||
- name: alpine | ||
version: "0.1.0" | ||
repository: https://example.com/charts | ||
- name: mariner | ||
version: "4.3.2" | ||
repository: https://example.com/charts | ||
digest: invalid |
27 changes: 27 additions & 0 deletions
27
pkg/chart/loader/testdata/frobnitz_with_symlink/Chart.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,27 @@ | ||
apiVersion: v1 | ||
name: frobnitz | ||
description: This is a frobnitz. | ||
version: "1.2.3" | ||
keywords: | ||
- frobnitz | ||
- sprocket | ||
- dodad | ||
maintainers: | ||
- name: The Helm Team | ||
email: helm@example.com | ||
- name: Someone Else | ||
email: nobody@example.com | ||
sources: | ||
- https://example.com/foo/bar | ||
home: http://example.com | ||
icon: https://example.com/64x64.png | ||
annotations: | ||
extrakey: extravalue | ||
anotherkey: anothervalue | ||
dependencies: | ||
- name: alpine | ||
version: "0.1.0" | ||
repository: https://example.com/charts | ||
- name: mariner | ||
version: "4.3.2" | ||
repository: https://example.com/charts |
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 an install document. The client may display this. |
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,11 @@ | ||
# Frobnitz | ||
|
||
This is an example chart. | ||
|
||
## Usage | ||
|
||
This is an example. It has no usage. | ||
|
||
## Development | ||
|
||
For developer info, see the top-level repository. |
1 change: 1 addition & 0 deletions
1
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/_ignore_me
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 should be ignored by the loader, but may be included in a chart. |
5 changes: 5 additions & 0 deletions
5
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.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,5 @@ | ||
apiVersion: v1 | ||
name: alpine | ||
description: Deploy a basic Alpine Linux pod | ||
version: 0.1.0 | ||
home: https://helm.sh/helm |
9 changes: 9 additions & 0 deletions
9
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md
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,9 @@ | ||
This example was generated using the command `helm create alpine`. | ||
|
||
The `templates/` directory contains a very simple pod resource with a | ||
couple of parameters. | ||
|
||
The `values.toml` file contains the default values for the | ||
`alpine-pod.yaml` template. | ||
|
||
You can install this example using `helm install ./alpine`. |
5 changes: 5 additions & 0 deletions
5
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.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,5 @@ | ||
apiVersion: v1 | ||
name: mast1 | ||
description: A Helm chart for Kubernetes | ||
version: 0.1.0 | ||
home: "" |
4 changes: 4 additions & 0 deletions
4
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.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,4 @@ | ||
# Default values for mast1. | ||
# This is a YAML-formatted file. | ||
# Declare name/value pairs to be passed into your templates. | ||
# name = "value" |
Binary file added
BIN
+252 Bytes
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: {{.Release.Name}}-{{.Chart.Name}} | ||
labels: | ||
app.kubernetes.io/managed-by: {{.Release.Service}} | ||
app.kubernetes.io/name: {{.Chart.Name}} | ||
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" | ||
spec: | ||
restartPolicy: {{default "Never" .restart_policy}} | ||
containers: | ||
- name: waiter | ||
image: "alpine:3.9" | ||
command: ["/bin/sleep","9000"] |
2 changes: 2 additions & 0 deletions
2
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/values.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,2 @@ | ||
# The pod name | ||
name: "my-alpine" |
Binary file added
BIN
+967 Bytes
pkg/chart/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz
Binary file not shown.
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 placeholder for documentation. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
1 change: 1 addition & 0 deletions
1
pkg/chart/loader/testdata/frobnitz_with_symlink/templates/template.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 @@ | ||
Hello {{.Name | default "world"}} |
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 @@ | ||
# A values file contains configuration. | ||
|
||
name: "Some Name" | ||
|
||
section: | ||
name: "Name in a section" |