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

Add functionality to allow configuring the loglevel the operator is deployed with in the Helm chart #489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soenkeliebau
Copy link
Member

This introduces a variable called 'logLevel' which, when set to an empty string is not propagated to the deployment by the Helm chart at all, so that the default value for the loglevel in the operator code remains effective.

When set to a non-empty string the value is propagated as environment variable _OPERATOR_LOG into the pod template of the operator deployment.

Additionally this adds code to the Tiltfile that allows configuring this via a local override, in a similar fashion to what we already allow for the default registry.

Users can create a file called tilt_options.json and in there define a loglevel as follows:

{
  "loglevel": "DEBUG"
}

When this file is present the value from here will be read and passed to the Helm chart by Tilt. If this file is not present, an empty string is passed through, triggering the behavior described above where the default loglevel defined in the operator code remains effective.

This PR doesn't introduce a default for the 'logLevel' variable in the Helm charts, as the values.yaml files are not managed by templating. However adding a default for that variable should be an optional step, that we can do later at our convenience, or totally omit, since an unset value will just fall through to the default loglevel from code again.

…eployed with in the Helm chart.

This introduces a variable called 'logLevel' which, when set to an empty string is not propagated to the deployment by the Helm chart at all, so that the default value for the loglevel in the operator code remains effective.

When set to a non-empty string the value is propagated as environment variable <PRODUCTNAME>_OPERATOR_LOG into the pod template of the operator deployment.

Additionally this adds code to the Tiltfile that allows configuring this via a local override, in a similar fashion to what we already allow for the default registry.

Users can create a file called `tilt_options.json` and in there define a loglevel as follows:
{
  "loglevel": "DEBUG"
}

When this file is present the value from here will be read and passed to the Helm chart by Tilt. If this file is not present, an empty string is passed through, triggering the behavior described above where the default loglevel defined in the operator code remains effective.

This PR doesn't introduce a default for the 'logLevel' variable in the Helm charts, as the values.yaml files are not managed by templating. However adding a default for that variable should be an optional step, that we can do later at our convenience, or totally omit.
@adwk67
Copy link
Member

adwk67 commented Mar 20, 2025

I'm fine with this, as I asked the question that triggered it and have tested it locally, but would be happy to let others approve (or not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants