Replies: 4 comments 6 replies
-
Awesomely thorough. Great. About the repos out of date: please understand that you need to use the flag
its not
Helm specs? That makes no sense. The k8s resources have schemas and the linter just checks for deprecations and warns about them. Or throws an error even. IMPORTANT NOTE: Static analysis might differ from what the k8s api approves.
What is "it"? Where is the time going? What command is that again?
When a template is invalid (meaning it should not be accepted by the k8s api) that should be caught by
That is what we have now:
Separate issues indeed. Targeting one chart alleviates pain already.
Indeed. Warnings are ok, they suggest work is coming up when an upgrade is wanted. |
Beta Was this translation helpful? Give feedback.
-
True, it is because with helm3 you need to build the chart in order to create dependencies. |
Beta Was this translation helpful? Give feedback.
-
So what is the outcome of this Discussion ? |
Beta Was this translation helpful? Give feedback.
-
It is clear now:
Locking this discussion |
Beta Was this translation helpful? Give feedback.
-
We had a conversation last week about comparing the two commands mentioned in the title,
helm(file) lint
vsotomi validate-templates
. Here is the report I said I would create.helm lint
I think it's quite a convenient command, because it already has in-built targeting of separate charts. However, it still seems like work-in-progress (helm/helm#8596, helm/helm#6215, helm/helm#6258, helm/helm#2033, helm/helm#3880)
Whether this is useful output is open for discussion below.
helmfile lint
Where it gets interesting is the charts it is throwing an error, running it on the master repo it will exit on
istio-operator
,prometheus-operator
andweave-scope
. I had to performhelmfile lint
in the Otomi Docker obviously, so just seeotomi lint
as equivalent tohelmfile lint
.Basically going through all the
helmfiles
, it is throwing here forweave-scope
because I resolvedistio-operator
andprometheus-operator
.Reproduction of
charts/istio-operator
errorHad to add quotes to its
chart.yaml
:Reproduction of
charts/prometheus-operator
errorHere it seems
helm lint
is more lenient thanhelmfile lint
, becausehelmfile lint
will exit upon error and it looks like helm didn't catch it, even though I have the same versions available:Here's the output of
helmfile lint
, it looks like it does a repo update besides linting and then throws:The problem is that the repository of the dependency is not actual anymore in
Helm 3
.Old:
New:
This will pass.
otomi validate-templates
tl;dr
otomi validate-templates
validates against Kubernetes v1.18 for all clusters. Whereashelm lint
andhelmfile lint
might just lint against Helm specs and yaml in general.otomi validate-templates
doesn't seem to catch a lot of the yaml spec, only for Drone, and it doesn't throw an error if it finds something. That can be both good and bad: at least we have under control whether to throw an error, as it was a problem with upstream Helm on some issue in a v3.4.x version, but maybe it should throw an error and let the host/CI runner know.Moving forward
I would propose the following (open for discussion of course):
otomi lint
command, make it part of the CIBeta Was this translation helpful? Give feedback.
All reactions