rimas
f30badd570
Fix test
...
Signed-off-by: rimas <rmocius@gmail.com>
4 years ago
rimas
ce1a46899f
Fixes #9083
...
Signed-off-by: rimas <rmocius@gmail.com>
4 years ago
Nandor Kracser
dfb5a5e8cc
lint: lint all documents in a multi-doc yaml file
...
Signed-off-by: Nandor Kracser <bonifaido@gmail.com>
4 years ago
Christophe VILA
8a4c0bc7b1
added test for https://github.com/helm/helm/pull/8913 related to https://github.com/helm/helm/issues/8621
...
Signed-off-by: Christophe VILA <christophe.vila@thalesgroup.com>
4 years ago
Christophe VILA
f736af95eb
do not check YAML if nothing was parsed
...
Signed-off-by: Christophe VILA <christophe.vila@thalesgroup.com>
4 years ago
Matt Butcher
fe2d7f7792
this rewrites a whole bunch of old repo URLs to the new repo URL ( #8902 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
ed5fba5142
refactor the release name validation to be consistent across Helm
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
04fb35814f
Fixed a variable name collision caused by two PR merges ( #8681 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
70d03e5cef
Fix/8467 linter failing ( #8496 )
...
* add output to get debug info on linter failing
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* trap cases where the YAML indent is incorrect.
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Butcher
96d9ab9663
fix name length check on lint ( #8543 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
4 years ago
Matt Farina
11f658e223
Fixing linting of templates on Windows
...
When the engine stored templates in the map the keys were generated
based on path and not filepath. filepath was being used in the linter
when retrieving content from the keys. On Windows the keys ended up
being different.
This change is to use path joins to create the lookup key. Since the
name path was used in the code it needed to be changed in order to
import the package.
Tests already exist and were failing on windows. This got in because
CI is not run on Windows.
Closes #6418
Signed-off-by: Matt Farina <matt@mattfarina.com>
4 years ago
Matt Butcher
2750e4d781
Lint dependencies ( #7970 )
...
* feat: add dependency tests
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* replaced on-disk fixtures with in-memory fixtures
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Matthew Fisher
d61aaf3fd7
Merge pull request #7235 from karuppiah7890/fix-lint
...
Show errors when linting for Chart.yaml version and appVersion fields of type non-string
5 years ago
Matthew Fisher
e7ab975112
Merge pull request #8142 from technosophos/feat/1990-match-labels-lint
...
feat: Detect missing selector during lint
5 years ago
Karuppiah Natarajan
47c38ec23d
Show errors when linting for Chart.yaml version and appVersion fields of type non-string
...
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
5 years ago
Matt Farina
dbd001e532
Removing tiller language
...
Since Tiller is no longer part of Helm v3, internal documentation
language about Tiller can be removed
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Matt Butcher
118d46eb3e
feat: Detect missing selector during lint
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Matt Butcher
59eed4e81f
feat: make the linter coalesce the passed-in values before running values tests ( #7984 )
...
* fix: make the linter coalesce the passed-in values before running values tests
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* fixed typo
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Martin Hickey
e4768e6460
Update lint deprecation list
...
Add api group:
- apiextensions.k8s.io/v1beta1
- rbac.authorization.k8s.io/v1alpha1
Also, some kinds moved from extensions/v1 to extensions/v1beta1
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
5 years ago
Matt Butcher
08e546f169
fix: removed strict template errors in linter ( #8017 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Matt Butcher
bf9d629dc0
feat: implement deprecation warnings in helm lint ( #7986 )
...
* feat: implement deprecation warnings in helm lint
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* added more deprecated APIs
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Matt Butcher
6fc9353056
feat: lint the names of templated resources ( #8011 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Matt Butcher
549193dbcb
test: forward-port regression test from Helm 2 ( #7927 )
...
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Martin Hickey
9a0e7d8a31
Improve error message to check in unit test
...
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
5 years ago
Martin Hickey
ca931b472b
Merge pull request #7691 from longkb/add_ut_for_values
...
Add unit test for lint/values.go
5 years ago
Kim Bao Long
9d20e44ad1
Add unit test for lint/values.go
...
Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
5 years ago
Matt Butcher
16024dc19a
fix: add new static linter and fix issues it found ( #7655 )
...
* fix: add new static linter and fix issues it found
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
* fixed two additional linter errors.
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
5 years ago
Josh Soref
02ad2b1187
Spelling ( #7258 )
...
* spelling: constraint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: cryptographic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dependency
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: doesnot
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: don't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unexpected
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: dreadnought
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: default
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: envvars
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: evaluates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: execute
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: extractor
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: frobnitz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: generated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: implementation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: jabba
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: keywords
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: kubernetes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: override
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: package
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: parsable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: progress
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: recursively
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: release
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: cache
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: representing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: serializer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: subchart
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: utilities
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
5 years ago
Scott Morgan
32ce016054
fix(lint): Remove requirement that directory name and chart name match
...
Signed-off-by: Scott Morgan <morgandev@gmail.com>
5 years ago
Scott Morgan
eb833ccead
remove unused variable
...
Signed-off-by: Scott Morgan <morgandev@gmail.com>
5 years ago
Scott Morgan
8a8463e08d
fix(lint): Remove requirement that directory name and chart name match
...
Signed-off-by: Scott Morgan <morgandev@gmail.com>
5 years ago
Taylor Thomas
caf629a3e9
feat(lint): Adds v3 chart checks to linter
...
Fixes #5733
This adds two specific checks. A warning if a chart has a `crd-install` hook
and an error if the chart contains `.Release.Time`. Further checks can be added
down the road as needed using the same pattern I use here
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
5 years ago
Matthew Fisher
c1e63a2a17
Merge pull request #6536 from karuppiah7890/fix-lint-for-no-package-found
...
fix silent lint ignore for non existing packaged charts
5 years ago
Karuppiah Natarajan
bb9426c4e2
fix(pkg/lint): fix lint silently ignoring non existing packaged charts
...
Closes #6428
Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
5 years ago
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Matt Farina
967f4fed42
Update dependencies
...
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
modules
* Tests and checks updated. These already landed in v2 via PR 6457
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Vibhav Bobade
68a8f36a92
Fix Adding Errors from Linter.Messages to result.Errors
...
This also fixes <nil> beig added to result.Errors
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
5 years ago
Martin Hickey
4d47052395
Update linting and checking for apiVersion v1/v2
...
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
5 years ago
Oleg Sidorov
ec440d446d
Replaced ghodss/yaml with sigs.k8s.io/yaml
...
This commit replaces usage of github.com/ghodss/yaml with it's forked
version maintained by SIG community. The replaced library has
low-to-none support activity unlike the latter. We believe the new
Helm branch could benefit from using the community-supported version on
a long-term run as yaml parser is a key component of Helm chart rendering
engine.
This commit locks sigs.k8s.io/yaml dependency version on 1.1.0 which
is backwards compatible with ghodss/yaml 1.0.0.
This change also resolves the outdated dependency version lock for
ghodss/yaml (currently 1.0.0) and makes it possible to port changes from
https://github.com/helm/helm/pull/6010 to dev-v3.
Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
6 years ago
Thomas O'Donnell
213f714604
Stop Lint from breaking when using required
...
Have updated the required filter so that it doesn't break when linting a
chart. This work is based off #4221 and #4748 which didn't make it into
the v3 branch.
Signed-off-by: Thomas O'Donnell <andy.tom@gmail.com>
6 years ago
Adam Reese
590bf10ab5
fix(pkg/action): add namespace to release options
...
ref: https://github.com/helm/helm/issues/5732
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Matt Farina
50e06b1447
Adding apiVersion guidance to the linting
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
6 years ago
Matt Farina
069eec9e42
Updatin gthe apiVersion linting for Helm v3
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
6 years ago
Matt Farina
29842e040f
Adding lint check for apiVersion which is a required field
...
Fixes #5727
Signed-off-by: Matt Farina <matt@mattfarina.com>
6 years ago
Adam Reese
b7a14de590
Merge pull request #5601 from adamreese/v3/capabilities
...
ref(pkg/chartutil): remove k8s version object dependency
6 years ago
Adam Reese
097834de0a
ref(pkg/chartutil): remove k8s version object dependency
...
Flattens the `.Capabilities` built-in and removes useless kubernetes
runtime metadata.
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Matt Farina
250b63eced
Updating the labels for consistency
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
6 years ago
Luis Davim
82ffe56ca6
Reduce template code duplication. Fixes #5372
...
Signed-off-by: Luis Davim <luis.davim@jet.com>
6 years ago
Luis Davim
4425f86865
Add app.kubernetes.io/version label
...
Signed-off-by: Luis Davim <luis.davim@jet.com>
6 years ago
Matt Farina
af7eab0325
Updating to the k8s label convention
...
Closes #4335
Signed-off-by: Matt Farina <matt@mattfarina.com>
6 years ago