Skip to content

feat(plugindefinitions): enable OCI chart replication for ClusterPluginDefinition#1956

Merged
mikolajkucinski merged 6 commits into
mainfrom
feat/cluster-plugindefinition-chart-replication
May 7, 2026
Merged

feat(plugindefinitions): enable OCI chart replication for ClusterPluginDefinition#1956
mikolajkucinski merged 6 commits into
mainfrom
feat/cluster-plugindefinition-chart-replication

Conversation

@mikolajkucinski
Copy link
Copy Markdown
Contributor

@mikolajkucinski mikolajkucinski commented Apr 29, 2026

Description

Wire the existing OCIMirroringEnabled feature flag into the ClusterPluginDefinition reconciler and run ensureChartReplication. Mirror config is loaded from the greenhouse namespace.

Note: org name is hardcoded to greenhouse (via flux.HelmRepositoryDefaultNamespace).

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)

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

@mikolajkucinski mikolajkucinski changed the title feat(plugindefinition): enable OCI chart replication for ClusterPluginDefinition feat(plugindefinitions): enable OCI chart replication for ClusterPluginDefinition Apr 29, 2026
@mikolajkucinski mikolajkucinski force-pushed the feat/cluster-plugindefinition-chart-replication branch 2 times, most recently from f793836 to c0357f7 Compare April 29, 2026 11:42
@mikolajkucinski mikolajkucinski force-pushed the feat/cluster-plugindefinition-chart-replication branch from c0357f7 to 3f6d325 Compare May 5, 2026 13:02
@github-actions github-actions Bot added size/L and removed size/XL labels May 5, 2026
@mikolajkucinski mikolajkucinski force-pushed the feat/cluster-plugindefinition-chart-replication branch from 3f6d325 to 41ebcd0 Compare May 5, 2026 13:03
@mikolajkucinski mikolajkucinski marked this pull request as ready for review May 5, 2026 13:33
@mikolajkucinski mikolajkucinski requested a review from a team as a code owner May 5, 2026 13:33
Copilot AI review requested due to automatic review settings May 5, 2026 13:33
Copy link
Copy Markdown
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

Wires the existing OCI mirroring feature flag into the ClusterPluginDefinition controller so that it can proactively warm a registry mirror (pull-through) for OCI Helm charts using Organization-provided mirror configuration (loaded from the greenhouse org/namespace).

Changes:

  • Add OCIMirroringEnabled plumbing to ClusterPluginDefinitionReconciler and invoke ensureChartReplication() during reconciliation.
  • Inject the feature flag into the ClusterPluginDefinition controller startup path.
  • Add a dedicated E2E suite covering successful and failing OCI chart replication for ClusterPluginDefinition.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/controller/plugindefinition/cluster_plugindefinition_controller.go Enables OCI chart replication flow for ClusterPluginDefinitions and adds required RBAC markers.
cmd/greenhouse/controllers.go Starts the ClusterPluginDefinition controller with the OCI mirroring feature flag value.
e2e/clusterplugindefinition/testdata/organization.yaml Adds Organization test fixture used by the new ClusterPluginDefinition E2E suite.
e2e/clusterplugindefinition/scenarios/cluster_pd_chart_replication.go Adds E2E scenarios validating replication success, idempotency, and failure behavior.
e2e/clusterplugindefinition/e2e_test.go Adds a new ClusterPluginDefinition-focused E2E test suite and environment setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/clusterplugindefinition/e2e_test.go
@mikolajkucinski mikolajkucinski force-pushed the feat/cluster-plugindefinition-chart-replication branch 3 times, most recently from 80ed308 to c207440 Compare May 6, 2026 09:57
Copy link
Copy Markdown
Contributor

@abhijith-darshan abhijith-darshan left a comment

Choose a reason for hiding this comment

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

@mikolajkucinski - could you please increase the schedule for nightly E2E -

- cron: "0 1-6 * * *" # run hourly from 1am to 6am

To every 2hours

…inDefinition

Wire the existing OCIMirroringEnabled feature flag into the
ClusterPluginDefinition reconciler and run ensureChartReplication.
Mirror config is loaded from the greenhouse namespace.

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
… scenarios

On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
@mikolajkucinski mikolajkucinski force-pushed the feat/cluster-plugindefinition-chart-replication branch from c207440 to 3b39b0a Compare May 7, 2026 09:49
@mikolajkucinski mikolajkucinski requested a review from a team as a code owner May 7, 2026 09:49
@mikolajkucinski mikolajkucinski merged commit ed59927 into main May 7, 2026
23 checks passed
@mikolajkucinski mikolajkucinski deleted the feat/cluster-plugindefinition-chart-replication branch May 7, 2026 10:10
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.

🐛 [BUG] - ClusterPluginDefinition chart pulls fail with 401

3 participants