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

feat(network): update operator-controlled networking objects #424

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Jul 11, 2022

This PR accomplishes a few things:

  1. Services, Ingresses and Routes will be updated across operator versions, and reflect changes the user makes to the Cryostat CR.
  2. Uses the same code paths (CreateOrUpdate's mutateFn) when creating or updating the object. Ensures that when the operator sets a new field in an object, we don't need to ensure that change is made in two places.
  3. Begins refactoring the long cryostat_controller.go and resource_definitions.go into resource-specific source files. I plan to repeat this pattern with the other resource types. The Cryostat controller's Reconcile method should be much smaller and simpler by fanning out to resource-specific delegates once this is complete.

Apologies for the PR being large. I initially planned to break this into two or three smaller PRs, but these types depend on each other.

Fixes: #410, #411

@ebaron ebaron added the feat New feature or request label Jul 11, 2022
@ebaron ebaron requested a review from andrewazores July 11, 2022 20:57
@ebaron ebaron linked an issue Jul 11, 2022 that may be closed by this pull request
Copy link
Member

@andrewazores andrewazores left a comment

Choose a reason for hiding this comment

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

Built a bundle and deployed this on crc and tested various configuration changes (reports, core service config, storage config). Everything still looks like it's working. Fanning out to different sub reconcile loops makes a lot of sense - the main reconcile loop has grown a lot over time.

@ebaron ebaron merged commit 5212264 into cryostatio:main Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Existing Ingresses should be updated Existing Services should be updated
2 participants