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

Prevent reconciling on more than one NATS-CR #45

Closed
5 tasks done
Tracked by #8
k15r opened this issue May 23, 2023 · 1 comment · Fixed by #62
Closed
5 tasks done
Tracked by #8

Prevent reconciling on more than one NATS-CR #45

k15r opened this issue May 23, 2023 · 1 comment · Fixed by #62
Assignees
Labels
area/eventing Issues or PRs related to eventing

Comments

@k15r
Copy link
Contributor

k15r commented May 23, 2023

Description
At the moment, we support reconciling multiple instances of the NATS CR. For now, we will limit this functionality to only support reconciling a single instance (with a specific name within kyma-system namespace). All other instances of the NATS CR will not get ready and will have a clear condition telling the user about the limitation.

Questions

  • Should we use admission webhook?
    • We cannot use admission webhook, because the lifecycle manager may deploy the nats-manager and CR at the same time. And if we have an admission webhook, it will not allow to create the CR until the webhook is ready.
    • Also, we will follow the convention of accepting multiple CRs, and reflecting the error in conditions. It's done like this in other module-managers.

Hint
In reconciler, get name and namespace, look if values are not allowed, set state to error, but pass reconciliation. Have a flag to disable this feature for tests.

Acceptance

  • Make the name and namespace of the CR configurable in NATS-Manager.
  • limit reconciling NATS CRs to one specific instance
  • add a condition with a clear message to inform the user about the limitation
  • set other instances of NATS CR to an error state
  • integration test should still be able to create nats cr with different names & namespaces
@k15r k15r mentioned this issue May 23, 2023
14 tasks
@mfaizanse mfaizanse added the area/eventing Issues or PRs related to eventing label May 26, 2023
@mfaizanse mfaizanse self-assigned this Jun 12, 2023
@mfaizanse mfaizanse linked a pull request Jun 12, 2023 that will close this issue
@mfaizanse
Copy link
Member

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eventing Issues or PRs related to eventing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants