AmadeusITGroup / workflow-controller

Kubernetes workflow controller
Apache License 2.0
24 stars 15 forks source link

No Workflows from CronWorkflow #89

Open sdminonne opened 5 years ago

sdminonne commented 5 years ago

Testcase here: https://gist.github.com/davidc-donorschoose/79bb22c203000d4ecea702618923e709

sdminonne commented 5 years ago

See discussion

clamoriniere1A commented 5 years ago

Hi @davidc-donorschoose

I was able to reproduce your issue using your gist. I was also able to found the issue in the yaml content.

                  env:
                     # ....
                      - name: PRIMARY_DEV_CLUSTER
                        value: false
                   #   ...

the problem is the "boolean" as in the value that should be a string. Theoretically it should works like this, but Kubernetes api-machinery is a complex piece of code, it converts the yaml input into json before decoding the content into the golang struct, that is why the input value is seen as a "boolean" by the decoder, but the field in the golang struct is a "string".

To avoid this issue, you need to force the type in the yaml file.

                  env:
                     # ....
                      - name: PRIMARY_DEV_CLUSTER
                        value: "false"
                   #   ...

I validated that the workflow-controller is able to create the workflow with this change.

Let us know if it fixes your issue or if you have any other issues, and thank for using and testing the workflow-controller