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: adds controller to allow addon to reconcile on changes #46

Merged
merged 16 commits into from
Jun 4, 2024

Conversation

JoaoBraveCoding
Copy link
Collaborator

This PR introduces a controller that will watch for resources used for the addon configuration and it will annotate the corresponding ManifestWorks triggering a reconciliation

@coveralls
Copy link

coveralls commented May 6, 2024

Pull Request Test Coverage Report for Build 9368976680

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 66.065%

Totals Coverage Status
Change from base Build 9347262783: 0.0%
Covered Lines: 183
Relevant Lines: 277

💛 - Coveralls

@iblancasa
Copy link
Contributor

It seems I have permission to push to this branch. I added a commit and reverted it. Added my changes in JoaoBraveCoding#11

iblancasa and others added 2 commits May 14, 2024 14:29
* Move the watcher cli application to be a go routine

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix lint

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix lint

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Update internal/controllers/watcher/controller.go

Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>

* Update internal/controllers/watcher/controller.go

Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>

* Update main.go

Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>

* Update main.go

Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>

* Add suggestion

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

---------

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa
Copy link
Contributor

What is missing to move from draft to Ready for review?

Copy link
Collaborator Author

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

@iblancasa some points to improve

internal/controllers/watcher/controller.go Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
@JoaoBraveCoding
Copy link
Collaborator Author

FYI: Tested the current version of this PR with some of my suggestions together with #48 and everything worked out 👌

* If a secret is updated, check if there is any reference to it in any
  of the ManifestWorks
* Change some comments

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa
Copy link
Contributor

@JoaoBraveCoding I added the changes yesterday. I tested the changes and I think everything is working fine. Is ok if we move to Ready for review?

@periklis
Copy link
Collaborator

@iblancasa yes please move to ready for review. I am constantly skim over this and would like to add my review. Thanks for all the dedication and work you both put in here

@JoaoBraveCoding JoaoBraveCoding marked this pull request as ready for review May 23, 2024 10:11
@JoaoBraveCoding JoaoBraveCoding requested review from a team as code owners May 23, 2024 10:11
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@@ -1,6 +1,9 @@
images:
- name: controller
newName: quay.io/rhobs/multicluster-observability-addon
newName: quay.io/jmarcal/multicluster-observability-addon
Copy link
Contributor

Choose a reason for hiding this comment

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

Remember to revert this

internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
internal/controllers/watcher/controller.go Outdated Show resolved Hide resolved
deploy/resources/cluster-management-addon.yaml Outdated Show resolved Hide resolved
internal/controllers/watcher/controller.go Show resolved Hide resolved
@iblancasa
Copy link
Contributor

@JoaoBraveCoding LGTM. Is there anything else to be implemented?

Copy link
Collaborator

@periklis periklis left a comment

Choose a reason for hiding this comment

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

LGTM besides the comments from @JoaoBraveCoding related to #48

@JoaoBraveCoding
Copy link
Collaborator Author

Just tested once again and everything works! Merging as per the approved from @periklis and @iblancasa.

@JoaoBraveCoding JoaoBraveCoding merged commit 81a763d into rhobs:main Jun 4, 2024
3 checks passed
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.

None yet

4 participants