forked from helm/helm
-
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.
Integrates HIP-0019 lint ignorer with
- adds ignorer usage to cmd/helm/lint.go - adds ignorer usage to pkg/action/lint.go and its lint_test.go See HIP-0019 proposal at helm/community: helm/community#353 Co-authored-by: Danilo Patrucco <[email protected]> Signed-off-by: Daniel J. Pritchett <[email protected]>
- Loading branch information
1 parent
f93c255
commit c3bf835
Showing
15 changed files
with
138 additions
and
19 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
4 changes: 4 additions & 0 deletions
4
pkg/action/testdata/charts/messy-chart-with-lintignore/.helmlintignore
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 @@ | ||
error_lint_ignore=icon is recommended | ||
error_lint_ignore=apiVersion is required. The value must be either \"v1\" or \"v2\" | ||
error_lint_ignore=file does not exist | ||
error_lint_ignore=chart directory is missing these dependencies: mariadb |
2 changes: 2 additions & 0 deletions
2
pkg/action/testdata/charts/messy-chart-with-lintignore/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,2 @@ | ||
name: chart-with-missing-deps | ||
version: 2.1.8 |
6 changes: 6 additions & 0 deletions
6
pkg/action/testdata/charts/messy-chart-with-lintignore/requirements.lock
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 @@ | ||
dependencies: | ||
- name: mariadb | ||
repository: https://charts.helm.sh/stable/ | ||
version: 4.3.1 | ||
digest: sha256:82a0e5374376169d2ecf7d452c18a2ed93507f5d17c3393a1457f9ffad7e9b26 | ||
generated: 2018-08-02T22:07:51.905271776Z |
7 changes: 7 additions & 0 deletions
7
pkg/action/testdata/charts/messy-chart-with-lintignore/requirements.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,7 @@ | ||
dependencies: | ||
- name: mariadb | ||
version: 4.x.x | ||
repository: https://charts.helm.sh/stable/ | ||
condition: mariadb.enabled | ||
tags: | ||
- wordpress-database |
3 changes: 3 additions & 0 deletions
3
pkg/action/testdata/charts/withsubchartlintignore/.helmlintignore
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,3 @@ | ||
error_lint_ignore=chart metadata is missing these dependencies** | ||
rules/testdata/withsubchartlintignore/charts/subchart/templates/subchart.yaml <include "this.is.test.data" .> | ||
rules/testdata/withsubchartlintignore/charts/subchart/templates/subchart.yaml unexpected EOF |
16 changes: 16 additions & 0 deletions
16
pkg/action/testdata/charts/withsubchartlintignore/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,16 @@ | ||
apiVersion: v2 | ||
name: withsubchart | ||
description: A Helm chart for Kubernetes | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.16.0" | ||
icon: http://riverrun.io | ||
|
||
dependencies: | ||
- name: subchart | ||
version: 0.1.16 | ||
repository: "file://../subchart" | ||
import-values: | ||
- child: subchart | ||
parent: subchart | ||
|
6 changes: 6 additions & 0 deletions
6
pkg/action/testdata/charts/withsubchartlintignore/charts/subchart/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,6 @@ | ||
apiVersion: v2 | ||
name: subchart | ||
description: A Helm chart for Kubernetes | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.16.0" |
3 changes: 3 additions & 0 deletions
3
pkg/action/testdata/charts/withsubchartlintignore/charts/subchart/templates/subchart.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,3 @@ | ||
metadata: | ||
name: {{ .Values.subchart.name | lower }} | ||
{{- if not (include "this.is.test.data" .) }} |
2 changes: 2 additions & 0 deletions
2
pkg/action/testdata/charts/withsubchartlintignore/charts/subchart/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 @@ | ||
subchart: | ||
name: subchart |
2 changes: 2 additions & 0 deletions
2
pkg/action/testdata/charts/withsubchartlintignore/templates/mainchart.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 @@ | ||
metadata: | ||
name: {{ .Values.subchart.name | lower }} |
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