Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

helm install with --set ends in an error "v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte"

I'm trying to run a helm chart with:

helm upgrade --install artifactory-int --set ingress.annotations.'kubernetes\.io\/tls-acme'="true"

But this drops an error message:

Ingress in version "v1beta1" cannot be handled as a Ingress: v1beta1.Ingress.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte of ...|ls-acme":true},"labe|..., bigger context ...|tadata":{"annotations":{"kubernetes.io/tls-acme":true},"labels":{"app":"artifactory","chart":"artifa|...

The error message is expecting " or n

When configuring values.yaml (see following code lines) --> everything works fine,...

ingress:
  annotations:
    kubernetes.io/tls-acme: "true"

...but I want to set the parameter with "--set" within the helm install command instead of manipulating the values.yaml

The ingress template is giving me the folloing information:

metadata:
{{- if .Values.ingress.annotations }}
  annotations:
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
{{- end }}

I tried several variatons of set, some of them passed the "ReadString" issue, but ingress annotaion is not set correctly.

some examples

--set ingress.annotations.'kubernetes\.io\/tls-acme'=true'"'
-->
metadata:
  annotations:
    kubernetes.io/tls-acme: true"

--set ingress.annotations.'kubernetes\.io\/tls-acme'="true\n"
-->
metadata:
  annotations:
    kubernetes.io/tls-acme: truen

--set ingress.annotations.'kubernetes\.io\/tls-acme'='\"true\"'
-->
metadata:
  annotations:
    kubernetes.io/tls-acme: '"true"'

What is need to be set to get the following results?

--set ingress.annotations.'kubernetes\.io\/tls-acme'=???????
-->
metadata:
  annotations:
    kubernetes.io/tls-acme: true
like image 927
chuet Avatar asked Dec 01 '25 02:12

chuet


1 Answers

To set string forcely you can run following


--set-string ingress.annotations.'kubernetes\.io\/tls-acme'="true"

like image 110
hoque Avatar answered Dec 03 '25 05:12

hoque



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!