druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 93 forks source link

Helm chart broken since the introduction of watched_namespace.yaml in chart templates. #252

Closed fredcoq closed 2 years ago

fredcoq commented 2 years ago

I have a CD pipeline synchronizing with druid-operator repo. Helm chart synchronization fails with the following error :

executing "druid-operator/templates/watched_namespace.yaml" at <ne $relname.env.WATCH_NAMESPACE "default">: 
error calling ne: incompatible types for comparison

It can be reproduced by cloning the repo and performing chart validation : Helm version 3.7.0

➜  druid-operator git:(master) helm lint ./chart/         
==> Linting ./chart/
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/: template: druid-operator/templates/watched_namespace.yaml:4:43: executing "druid-operator/templates/watched_namespace.yaml" at <ne $relname.env.WATCH_NAMESPACE "default">: error calling ne: incompatible types for comparison

Replacing $relname by .Value in watched_namespace.yaml restore the expected behavior when syncing with helm.

AdheipSingh commented 2 years ago

@achetronic can you take a look, seems like nil and string is getting compared. type error

AdheipSingh commented 2 years ago

this should fix https://github.com/druid-io/druid-operator/pull/253

achetronic commented 2 years ago

this should fix #253

Have you tested it? I did in that way pre-supposing that druid-operator would be a Helm dependency :)

AdheipSingh commented 2 years ago

yes i have tested it. added checks on CI too.

somehow index .Values.druidOperator values was coming out to be nil where as we wanted string. so just kept is simple.

pls feel to comment/review if you feel anything is missing :)

Thanks

achetronic commented 2 years ago

yes i have tested it. added checks on CI too.

somehow index .Values.druidOperator values was coming out to be nil where as we wanted string. so just kept is simple.

pls feel to comment/review if you feel anything is missing :)

Thanks

Lets do it! Thank you