This is my yaml file:
{{ if and (eq .Values.deploytest "true") (eq .Values-development.deploytest "false") }}
....
and i got the following error: bad character U+002D '-' Any idea?
This is my yaml file:
{{ if and (eq .Values.deploytest "true") (eq .Values-development.deploytest "false") }}
....
and i got the following error: bad character U+002D '-' Any idea?
.Values-development
is not a name helm will let you use this way.
There are a few workarounds.
You can remove the hyphen, either by just compounding the name to .Valuesdevelopment
:
{{ if and (eq .Values.deploytest "true") (eq .Valuesdevelopment.deploytest "false") }}
or restructuring the tree to .Values.development
:
{{ if and (eq .Values.deploytest "true") (eq .Values.development.deploytest "false") }}
or by using a lookup function such as index
:
{{ $myChk := index . "Values-development" }}
{{ if and (eq .Values.deploytest "true") (eq $myChk.deploytest "false") }}
Typing these off the cuff; YMMV.