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

Ensure generated objects are kept in sync #12

Open
seaneagan opened this issue Mar 15, 2021 · 0 comments
Open

Ensure generated objects are kept in sync #12

seaneagan opened this issue Mar 15, 2021 · 0 comments
Assignees
Labels
2 - Infra Services Relates to infrastructure services generated by SIP bug Something isn't working priority/low Items that are considered non-critical for functionality, such as quality of life improvements size m
Milestone

Comments

@seaneagan
Copy link
Contributor

Describe the bug

Any objects generated by a controller should be:

  1. deleted when the CR is deleted
  2. re-reconciled if they are manipulated outside the controller's control

The controller-runtime has an API which can be used to accomplish both of these pretty easily:
https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil#SetControllerReference

Prior to #5 we had 1. in place, since we created a standalone namespace for each SIPCluster for service resources to be created in, so when the SIPCluster was deleted we could simply delete that namespace. Now that we are creating service objects in the SIPCluster CR namespace, we should be deleting those objects each individually (as opposed to the whole namespace) when the SIPCluster is deleted.

Steps To Reproduce

  1. Delete a CIPCluster CR, notice the generated objects are not deleted.
  2. Delete a Service which was generated for a CR, not it is not automatically re-created (until the CR itself is reconciled again due to some CR change).
@seaneagan seaneagan added bug Something isn't working triage size m labels Mar 15, 2021
@seaneagan seaneagan self-assigned this Mar 16, 2021
@lb4368 lb4368 added this to the v2.1 milestone Mar 17, 2021
@jezogwza jezogwza added priority/medium Default priority for items priority/low Items that are considered non-critical for functionality, such as quality of life improvements and removed triage priority/medium Default priority for items labels Mar 24, 2021
@lb4368 lb4368 added the 2 - Infra Services Relates to infrastructure services generated by SIP label Mar 24, 2021
@lb4368 lb4368 modified the milestones: v2.1, Future May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - Infra Services Relates to infrastructure services generated by SIP bug Something isn't working priority/low Items that are considered non-critical for functionality, such as quality of life improvements size m
Projects
None yet
Development

No branches or pull requests

3 participants