Helm Chart Operator 2.0 issue

hi @simon.murray and @tommie

I did helm repo update to get the latest operator 2.0.1 version and when I use helm3 to lint to see possible errors it shows below :

Can we know how to fix this ?

~/couchbase [master]
~/helm3/helm lint couchbase-operator-2.0.1.tgz
==> Linting couchbase-operator-2.0.1.tgz
[ERROR] templates/: parse error at (couchbase-operator/templates/_helpers.tpl:129): function "lookup" not defined

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

If I extract this tgz file and put my own values.yaml and run it I will end up with below errors :

~/couchbase [master]
~/helm3/helm install HOS-TC-gaind1 couchbase-operator/ --values couchbase-operator/values.yaml --namespace bi-dev --debug --dry-run
install.go:158: [debug] Original chart version: “”
install.go:175: [debug] CHART PATH: /home/couchbase/couchbase-operator

install.go:180: [debug] WARNING: This chart or one of its subcharts contains CRDs. Rendering may fail or contain inaccuracies.
Error: template: couchbase-operator/templates/couchbase-tls.yaml:1:22: executing “couchbase-operator/templates/couchbase-tls.yaml” at <include “couchbase-cluster.tls” .>: error calling include: template: couchbase-operator/templates/_helpers.tpl:220:63: executing “couchbase-cluster.tls” at <include “couchbase-cluster.tls.server-secret” .>: error calling include: template: couchbase-operator/templates/_helpers.tpl:209:14: executing “couchbase-cluster.tls.server-secret” at <.Values.cluster.tls>: nil pointer evaluating interface {}.tls
helm.go:75: [debug] template: couchbase-operator/templates/couchbase-tls.yaml:1:22: executing “couchbase-operator/templates/couchbase-tls.yaml” at <include “couchbase-cluster.tls” .>: error calling include: template: couchbase-operator/templates/_helpers.tpl:220:63: executing “couchbase-cluster.tls” at <include “couchbase-cluster.tls.server-secret” .>: error calling include: template: couchbase-operator/templates/_helpers.tpl:209:14: executing “couchbase-cluster.tls.server-secret” at <.Values.cluster.tls>: nil pointer evaluating interface {}.tls

Here is my values.yaml

Please help

Hi @eldorado,

It’s not possible to use --debug and --dry-run on initial install of chart since CRD’s are not yet installed, the template engine is not able to render Custom Resources.

Thanks tommie .
The issue as you mentioned is not --dry-run or --debug . Since we have CRD already exist so that was not a problem .
the issue I had is instead of using custom values.yaml we override of existing values.yaml which causes issue but below resolves the problem :

~/helm3/helm install hostcoperatorgaind1 couchbase-operator/ --values couchbase-operator/tc_operator_values.yaml --namespace bi-cb --skip-crds

Sure we can use --debug and --dry-run at end as well no problem there . --skip-crds is very important if K8s Admin create own CRD and there is tighter security .

Also to help others and worth to mention is that with Helm3 I am seeing in the name of the deployment “Capital Case” , character “-” or character ‘_’ not allowed .