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

Run the upgrade as part of the reconciliation for instances that will be switched from unmanaged to managed after the upgrade #1890

Closed
avadhut123pisal opened this issue Jul 5, 2023 · 4 comments · Fixed by #2086
Labels
area:collector Issues for deploying collector help wanted Extra attention is needed

Comments

@avadhut123pisal
Copy link
Contributor

Run the upgrade as part of the reconciliation for instances that will be switched from unmanaged to managed after the upgrade.

Originally posted by @pavolloffay in #1888 (comment)

@pavolloffay pavolloffay added area:collector Issues for deploying collector help wanted Extra attention is needed labels Aug 2, 2023
@GenPage
Copy link

GenPage commented Aug 17, 2023

I can take a crack at this. Running into this with collectors set to Upgrade Strategy: none since we use an in-house collector image. We don't set spec.managementState and the operator is throwing:

{"level":"info","ts":"2023-08-17T16:23:13Z","logger":"controllers.OpenTelemetryCollector","msg":"Skipping reconciliation for unmanaged OpenTelemetryCollector resource","opentelemetrycollector":{"name":"otel-gateway","namespace":"opentelemetry-operator-system"},"name":"opentelemetry-operator-system/otel-gateway"}

I thought it was the Upgrade Strategy that was ignoring it at first

@GenPage
Copy link

GenPage commented Aug 21, 2023

@avadhut123pisal @pavolloffay After looking deeper into the issue, there seems to be some overlap and a need for clarification on the differences between UpgradeStrategy and ManagementState. They both try to achieve similar goals.

I propose a solution where UpgradeStrategy is either completely removed or changed to handle which parts of the spec you want to be managed. (image, config, etc). Thoughts?

@GenPage
Copy link

GenPage commented Aug 21, 2023

The more I think about it, it should just be a merge strategy, where in this case, we want the upgrade function to add in new values that haven't existed in the past but not override existing ones overridden by cluster-admins (in my case, spec.image)

  • UpgradeStrategy: Override, Merge (New Default), None

@iblancasa
Copy link
Contributor

@avadhut123pisal @pavolloffay After looking deeper into the issue, there seems to be some overlap and a need for clarification on the differences between UpgradeStrategy and ManagementState. They both try to achieve similar goals.

The UpgradeStrategy is used to enable or disable the mechanism to upgrade the instance when a new instance of the operator is deployed.
ManagementState is used to enable or disable the reconciliation. It can be used, for instance, for debugging the operator.

They should not be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:collector Issues for deploying collector help wanted Extra attention is needed
Projects
None yet
4 participants