2

I am trying to create a helm deployment where one of the templates is creating a namespace as below

apiVersion : v1
kind : Namespace
metadata :
  name : "{{ .Values.productId }}"

I am passing the value for the productId in values file as follows:

productId: "32345"

I get the following error when I do helm install/upgrade

Error: unable to build kubernetes objects from release manifest: unable to decode "": json: cannot unmarshal number into Go struct field ObjectMeta.metadata.namespace of type string helm.go:84: [debug] unable to decode "": json: cannot unmarshal number into Go struct field ObjectMeta.metadata.namespace of type string

I am using helm version 3.8.2. Not sure what is wrong.

Raj Sharma
  • 53
  • 6

1 Answers1

0

Maybe there is no issue with the template that you have shared however i hope there is no next line

If you notice the error correctly it's on the ObjectMeta.metadata.namespace

Tried with the same version & config working fine for me enter image description here

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102