Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set env var OPERATOR_ID in Helm installation #3739

Closed
daniel-geiger-ibmde opened this issue Oct 11, 2022 · 4 comments
Closed

Unable to set env var OPERATOR_ID in Helm installation #3739

daniel-geiger-ibmde opened this issue Oct 11, 2022 · 4 comments
Labels
kind/bug Something isn't working

Comments

@daniel-geiger-ibmde
Copy link

As per https://camel.apache.org/camel-k/1.10.x/installation/advanced/multi.html the env var OPERATOR_ID must be set on the operator deployment to set the operator id. However the current helm chart doesn't expose the option to set any custom env vars in templates/operator.yaml.

In addition, default behaviour as described at https://camel.apache.org/camel-k/1.10.x/installation/advanced/multi.html does not apply - at least when deploying operator and integrations to a namespace other than camel-k:
Any Integration CRs annotated with the default "camel.apache.org/operator.id: camel-k" won't get picked up by the operator without OPERATOR_ID env variable set. The operator will only pick up the Integration CR after (manually) deleting the annotation. (So it seems the default operator-id is NULL rather than "camel-k".)

@daniel-geiger-ibmde daniel-geiger-ibmde changed the title Unable to set env var OPERATOR_ID in Helm chart Unable to set env var OPERATOR_ID in Helm installation Oct 11, 2022
@christophd
Copy link
Contributor

Hi,

there is a bug with OPERATOR_ID env var that will be fixed in v1.10.1 (see #3657)

There is a workaround to set KAMEL_OPERATOR_ID env var. With that the operator should start to pick up the integrations annotated with camel.apache.org/operator.id: camel-k.

With the upcoming fix in v1.10.1 both OPERATOR_ID and KAMEL_OPERATOR_ID will work as expected.

However this only solves on part of your problem. The missing option on the Helm chart still is a problem. I guess you would expect the Helm chart to set the default OPERATOR_ID=camel-k in addition to let the user specify another id, right?

@daniel-geiger-ibmde
Copy link
Author

daniel-geiger-ibmde commented Oct 12, 2022

Hi Christoph, thanks for responding so quickly :-)

I totally agree regarding the helm chart. A new optional helm variable operator.id with a default value of camel-k would be most clear... at least to me ;-)

Regarding explanation of the default "camel-k" at https://camel.apache.org/camel-k/1.10.x/installation/advanced/multi.html: I think a brief hint could be helpful, that there will be no default operator id if neither of the env variables OPERATOR_ID or KAMEL_OPERATOR_ID is set. (From the current wording, one could assume that the default is implemented somewhere in the operator itself.)

@squakez squakez added the kind/bug Something isn't working label Oct 13, 2022
@MehrCurry
Copy link
Contributor

I have seen the fix in #3657. But it seems again that the helm chart has no possibility to set the environment variables. I missed i something?

@daniel-geiger-ibmde
Copy link
Author

@MehrCurry - this is the fix.

Works like a charm - thanks guys! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants