You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding labels: {"someKey": "true"} to values.yaml should render the helm templates and install the operator
Actual behaviour
Looks like we are usingrange to construct the labels from values.yaml on fly. But range doesn't preserve the dataType of what we pass it seems. So it fails to render the values as string even if we pass "true" or "false" consider them as bool and results in the below error
unable to decode "": json: cannot unmarshal bool into Go struct field ObjectMeta.metadata.labels of type string
Note: Labels only support string dataType for keys & values
Workaround
Modify the range and use toYaml functions which converts the values to string type as well
Steps to reproduce the behaviour
Describe step by step what you've have done to get to this point
Environment
How are the pieces configured?
Redis Operator version - 3.2.5
Kubernetes version - 1.24
Kubernetes configuration used (eg: Is RBAC active?)
Logs
Please, add the debugging logs. In order to be able to gather them, add -debug flag when running the operator.
The text was updated successfully, but these errors were encountered:
Expected behaviour
Adding
labels: {"someKey": "true"}
tovalues.yaml
should render the helm templates and install the operatorActual behaviour
Looks like we are using
range
to construct the labels fromvalues.yaml
on fly. But range doesn't preserve the dataType of what we pass it seems. So it fails to render the values as string even if we pass "true" or "false" consider them asbool
and results in the below errorunable to decode "": json: cannot unmarshal bool into Go struct field ObjectMeta.metadata.labels of type string
Note: Labels only support
string
dataType for keys & valuesWorkaround
Modify the
range
and usetoYaml
functions which converts the values tostring
type as wellSteps to reproduce the behaviour
Describe step by step what you've have done to get to this point
Environment
How are the pieces configured?
Logs
Please, add the debugging logs. In order to be able to gather them, add
-debug
flag when running the operator.The text was updated successfully, but these errors were encountered: