kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
320 stars 49 forks source link

Fix helm linting errors in Lokomotive #682

Open surajssd opened 4 years ago

surajssd commented 4 years ago

I did a helm lint in various charts we have in lokomotive and they failed with following errors:

Contour:

$ cd ./assets/components/contour/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[ERROR] templates/: template: contour/templates/02-service-envoy.yaml:22:11: executing "contour/templates/02-service-envoy.yaml" at <eq .Values.envoy.serviceType "NodePort">: error calling eq: invalid type for comparison

Error: 1 chart(s) linted, 1 chart(s) failed

Calico Host Protection for Packet:

$ cd ./assets/lokomotive-kubernetes/packet/flatcar-linux/kubernetes/calico-host-protection/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] Chart.yaml: chart type is not valid in apiVersion 'v1'. It is valid in apiVersion 'v2'
[ERROR] templates/: template: calico-host-protection/templates/NOTES.txt:1:3: executing "calico-host-protection/templates/NOTES.txt" at <include "calico.validateValues" .>: error calling include: template: calico-host-protection/templates/_helpers.tpl:15:51: executing "calico.validateValues" at <fail>: error calling fail: 
VALUES VALIDATION:
calico:managementCIDRs
    You must set at least on management CIDR.
    Please set the.managementCIDRs parameter (--set.managementCIDRs={})
calico:clusterCIDRs
    You must set at least on management CIDR.
    Please set the.clusterCIDRs parameter (--set.clusterCIDRs={})

Error: 1 chart(s) linted, 1 chart(s) failed

kube-apiserver:

$ cd ./assets/lokomotive-kubernetes/bootkube/resources/charts/kube-apiserver/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] Chart.yaml: chart type is not valid in apiVersion 'v1'. It is valid in apiVersion 'v2'

Error: 1 chart(s) linted, 1 chart(s) failed

kubelet:

$ cd ./assets/lokomotive-kubernetes/bootkube/resources/charts/kubelet/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] Chart.yaml: chart type is not valid in apiVersion 'v1'. It is valid in apiVersion 'v2'

Error: 1 chart(s) linted, 1 chart(s) failed

kubernetes:

$ cd ./assets/lokomotive-kubernetes/bootkube/resources/charts/kubernetes/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] Chart.yaml: chart type is not valid in apiVersion 'v1'. It is valid in apiVersion 'v2'

Error: 1 chart(s) linted, 1 chart(s) failed

pod-checkpointer:

$ cd ./assets/lokomotive-kubernetes/bootkube/resources/charts/pod-checkpointer/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[INFO] Chart.yaml: icon is recommended
[ERROR] Chart.yaml: chart type is not valid in apiVersion 'v1'. It is valid in apiVersion 'v2'

Error: 1 chart(s) linted, 1 chart(s) failed

rook-ceph:

$ cd ./assets/components/rook-ceph/ && helm lint .
/home/surajd/lokomotive
==> Linting .
[ERROR] templates/: template: rook-ceph/templates/clusterrole.yaml:286:37: executing "rook-ceph/templates/clusterrole.yaml" at <.Values.agent.mountSecurityMode>: nil pointer evaluating interface {}.mountSecurityMode

Error: 1 chart(s) linted, 1 chart(s) failed
invidian commented 4 years ago

Not sure how to label that. Bug? Tech debt? Enhancement? Any ideas? Maybe we could just have label Quality :smile:

knrt10 commented 4 years ago

For cert-manager, created PR upstream. Will try to create upstream PR for other components if possible along the way