Skip to content

feat(plugins): disable service-proxy by cluster#1861

Open
IvoGoman wants to merge 3 commits intomainfrom
feat/disable-service-proxy
Open

feat(plugins): disable service-proxy by cluster#1861
IvoGoman wants to merge 3 commits intomainfrom
feat/disable-service-proxy

Conversation

@IvoGoman
Copy link
Contributor

@IvoGoman IvoGoman commented Mar 19, 2026

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)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

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?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

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.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 initClientGetter to also return the resolved Cluster object (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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants