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

Support debugging and settings propagations of reconciliations: add option to enable debug mode during runtime per Module CR #79

Closed
5 tasks
Tracked by #13
tobiscr opened this issue Jul 8, 2022 · 8 comments

Comments

@tobiscr
Copy link
Contributor

tobiscr commented Jul 8, 2022

Description

The Kyma operator has to support debugging possibilities to enable analysis by on-call engineers and SREs during runtime.

It has to be possible to enable the debug mode for a whole Kyma instance or for particular Kyma modules. It's recommended to make the configuration quite simple, e.g by offering a debug field in the CR which accepts a boolean value.

The debug: true field should enable the debug mode. If the field is false, the debug mode is disabled.

AC:

  • Labels are properly filled with necessary metadata to enable tracability (see comment below)
  • The logger-instance of the module operator (respectively the logger used by operator responsible for the particular Kyma module) has to use the debug log-level for any printed log message. This is only possible if the module operator supports parsing the passed labels.
  • If debug mode is disabled, the default log-level (probably info) has to be used by the logger-instance
  • The debug mode can be configured Kyma wide by editing the Kyma CR. This will enable / disable the debug mode for all Kyma modules listed in the Kyma CR.
  • The debug mode can be configured per Kyma module by editing the particular module CR. If the debug mode of the Kyma CR changes, the value of the Kyma CR has precedence and overwrite the module specific value.
@tobiscr tobiscr mentioned this issue Jul 8, 2022
14 tasks
@tobiscr
Copy link
Contributor Author

tobiscr commented Jul 8, 2022

We agreed to use following labels to track correlated IDs per resource:

  • operator.kyma-project.io/managed-by (=Kyma oeprator, can be used for A/B testing)
  • operator.kyma-project.io/controller-name (=Manifest operator, can be used for A/B testing)
  • operator.kyma-project.io/kyma-name (name of Kyma installation, written to context)
  • operator.kyma-project.io/module-name (name of module retrieved from OCI descriptor)
  • operator.kyma-project.io/channel (release channel which includes the component and was parsed by Kyma operator)
  • operator.kyma-project.io/profile (profile which included the Kyma component) (scoped out)

@tobiscr tobiscr changed the title Issuing of events for debugging purposes in Kyma CR Support debugging of reconciliations: add option to enable debug mode during runtime per Module CR Sep 13, 2022
@jakobmoellerdev
Copy link
Contributor

if we scope out profile like originally accounted for, it may make sense to instead propagate labels on a more generic scope.

@jakobmoellerdev jakobmoellerdev changed the title Support debugging of reconciliations: add option to enable debug mode during runtime per Module CR Support debugging and settings propagations of reconciliations: add option to enable debug mode during runtime per Module CR Nov 30, 2022
@jakobmoellerdev
Copy link
Contributor

@pbochynski this is what is currently planned for propagation of labels. Instead of hard-coded labels we can think of dynamic label configurations instead to make it possible to extend later on.

@pbochynski
Copy link
Contributor

pbochynski commented Dec 1, 2022

I had some time to think about the use cases (profile, debug), and to be honest I am not sure if it is the right way to do it. It makes module operators dependent on convention (not API). Also propagating flags to all modules is not the smartest solution (enabling debug level for all the modules at once). I think we should have the explicit configuration in the spec of module CR instead (resources, debug). We alredy have log configuration in the spec in our first module:
https://github.com/kyma-project/keda-manager
If we add label it will be confusing.

@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2023
@janmedrek janmedrek removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2023
@jakobmoellerdev
Copy link
Contributor

While this is fine for me I suggest we then leave this feature until we find a better way of propagation. Otherwise there will be no way to define a unified debugging spec field.

@kyma-bot
Copy link
Contributor

kyma-bot commented Apr 2, 2023

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 2, 2023
@janmedrek janmedrek removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 3, 2023
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 20, 2023
@janmedrek janmedrek removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2023
@janmedrek janmedrek closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
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

No branches or pull requests

5 participants