-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Labels
Description
Output of helm version
:
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}
Output of kubectl version
:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+7bd2e5b", GitCommit:"7bd2e5b", GitTreeState:"clean", BuildDate:"2019-05-19T23:52:43Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
all
I am trying to use the "lookup" function, which is resulting in problems with my yaml formatting:
$ helm install --namespace myapp api ./charts/deploy/
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Secret.metadata): unknown field "type" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
The template file from which I believe the error is coming from looks like this:
---
apiVersion: v1
data:
auth: {{ (lookup "v1" "Secret" "app2" "api-k8s-htpasswd").data.auth }}
kind: Secret
metadata:
labels:
k8s-app: myap-api
name: htpasswd-secret
type: Opaque
From what I understand, the lookup function was disabled when you run helm template
, as trying to process this chart results in a nil pointer error:
Error: template: deploy/templates/htpasswd-secret.yaml:4:56: executing "deploy/templates/htpasswd-secret.yaml" at <"api-k8s-htpasswd">: nil pointer evaluating interface {}.auth
I would like to have a discussion as to why I can't use helm template
to debug my chart, as that, in my opinion, should be the primary purpose of having a template
command.
raffaelespazzoli, themoosman, alex-berger, alexkreidler, danielhoherd and 52 more