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

vmalertmanager: ignore content of configSecret if name clashes with default #955

Merged
merged 2 commits into from
May 20, 2024

Conversation

f41gh7
Copy link
Collaborator

@f41gh7 f41gh7 commented May 16, 2024

Ignores any content from secret define at cr.spec.configSecret, if it name clashes with name of the secret created by operator.

#954

@f41gh7 f41gh7 requested review from Amper and Haleygo as code owners May 16, 2024 16:51
…efault

Ignores any content from secret define at cr.spec.configSecret, if it name clashes with name of the secret created by operator.

#954
@Haleygo
Copy link
Contributor

Haleygo commented May 16, 2024

But this also means we will override the original secret contents that user had, so the wrost scenario is: user predefined all the configs under secret vmalertmanager-example-config and specified secret in vmalertmanager, now operator will ignore the configs and erase them.
What about trying merging configs or changing default secret name if conflict happens?

@f41gh7
Copy link
Collaborator Author

f41gh7 commented May 17, 2024

But this also means we will override the original secret contents that user had, so the wrost scenario is: user predefined all the configs under secret vmalertmanager-example-config and specified secret in vmalertmanager, now operator will ignore the configs and erase them. What about trying merging configs or changing default secret name if conflict happens?

There is no easy way to check an owner of this secret. It's possible to use heuristic and check labels. But it's not reliable solution.

I think, it's fine to overwrite user created secret and notify about it. And it ll be more predictable behavior.

Copy link
Contributor

@Haleygo Haleygo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@f41gh7 f41gh7 merged commit c8534a5 into master May 20, 2024
2 checks passed
@f41gh7 f41gh7 deleted the gh-954 branch May 20, 2024 07:53
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