feat(plugins): disable service-proxy by cluster#1861
Open
Conversation
introduces a new annotation greenhouse.sap/disable-service-proxy if a cluster is annotated with this annotation set to true then the retrieval of exposed services is skipped. any existing exposed services are removed from the status.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for disabling service-proxy / exposed-services discovery per Cluster via a new annotation, and wires that into the Flux Plugin controller’s status computation.
Changes:
- Extend
initClientGetterto also return the resolvedClusterobject (when applicable). - Introduce
Cluster.IsExposedServicesDisabled()based on a new cluster annotation key. - Update Flux plugin status collection to skip exposed-service retrieval (and attempt to clear it) when disabled; add tests for the new behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/plugin/util.go | initClientGetter now returns the resolved Cluster alongside the RESTClientGetter. |
| internal/controller/plugin/plugin_controller_flux.go | Passes the “exposed services disabled” flag into status fetching; adds logic intended to skip/clear exposed services. |
| internal/controller/plugin/plugin_controller_flux_test.go | Adds a controller test exercising the “disabled” annotation behavior. |
| api/v1alpha1/cluster_types.go | Adds the annotation constant and IsExposedServicesDisabled() helper. |
| api/v1alpha1/cluster_types_test.go | Adds unit tests for IsExposedServicesDisabled(). |
| api/v1alpha1/plugin_types.go | Adds ExposedServicesDisabledReason for the Plugin condition reason. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
introduces a new annotation greenhouse.sap/service-proxy-disabled
if a cluster is annotated with this annotation set to true then the
retrieval of exposed services is skipped. any existing exposed services
are removed from the status.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added to documentation?
Checklist