Skip to content

feat(pluginpresets): remove admission check on PluginDefinition existence#1954

Merged
IvoGoman merged 2 commits into
mainfrom
feat/pluginpresets/admission
May 11, 2026
Merged

feat(pluginpresets): remove admission check on PluginDefinition existence#1954
IvoGoman merged 2 commits into
mainfrom
feat/pluginpresets/admission

Conversation

@IvoGoman
Copy link
Copy Markdown
Contributor

Description

In order to make PluginPresets more CI-friendly. The admission check for (Cluster-)PluginDefinition existence has been removed.

If the PluginPreset references a non-existing (Cluster-)PluginDefinition this will be reflected in the Status on the next reconciliation.

Co-authored-by: Copilot copilot@github.com

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

@IvoGoman IvoGoman requested review from a team as code owners April 28, 2026 12:50
@github-actions github-actions Bot added size/L documentation Improvements or additions to documentation feature core-apis labels Apr 28, 2026
@IvoGoman IvoGoman requested a review from Copilot April 28, 2026 12:58
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

This PR makes PluginPresets “CI-friendly” by removing the admission-time requirement that the referenced (Cluster-)PluginDefinition already exists, and instead surfaces missing definitions via PluginPreset status during reconciliation.

Changes:

  • Updated PluginPreset validating webhook to stop fetching/validating referenced (Cluster-)PluginDefinition on create.
  • Added controller logic + test to reflect missing PluginDefinition via PluginFailed condition (reason PluginDefinitionNotFound) and propagate message into Ready condition.
  • Updated docs to describe the new behavior and removed outdated “immutable” wording for Plugin’s pluginDefinitionRef.

Reviewed changes

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

Show a summary per file
File Description
internal/webhook/v1alpha1/pluginpreset_webhook.go Removes admission-time (Cluster-)PluginDefinition existence/option validation for PluginPreset create.
internal/webhook/v1alpha1/pluginpreset_webhook_test.go Adjusts admission tests to expect PluginPreset creation to succeed even when definitions are missing.
internal/controller/plugin/pluginpreset_controller.go Attempts to detect missing PluginDefinition during plugin reconciliation and set PluginFailed/Ready messaging accordingly.
internal/controller/plugin/pluginpreset_controller_test.go Adds coverage asserting PluginPreset status reflects a missing (Cluster-)PluginDefinition.
api/v1alpha1/pluginpreset_types.go Introduces PluginDefinitionNotFound condition reason constant.
docs/user-guides/plugin/plugin-management.md Documents new “admit first, reflect missing definition in status” behavior.
docs/reference/components/pluginpreset.md Adds note that PluginPreset may reference a not-yet-created PluginDefinition.
docs/reference/components/plugin.md Removes “immutable” wording for spec.pluginDefinitionRef.

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

Comment thread internal/controller/plugin/pluginpreset_controller.go
Comment thread internal/controller/plugin/pluginpreset_controller.go
IvoGoman and others added 2 commits May 11, 2026 11:53
…ence

In order to make PluginPresets more CI-friendly. The admission check for (Cluster-)PluginDefinition existence has been removed.

If the PluginPreset references a non-existing (Cluster-)PluginDefinition this will be reflected in the Status on the next reconciliation.

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
@IvoGoman IvoGoman force-pushed the feat/pluginpresets/admission branch from 3f98c52 to f96b778 Compare May 11, 2026 09:53
@IvoGoman IvoGoman merged commit 4e6a252 into main May 11, 2026
25 checks passed
@IvoGoman IvoGoman deleted the feat/pluginpresets/admission branch May 11, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-apis documentation Improvements or additions to documentation feature helm-charts size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] - Move existence check of (Cluster-)PluginDefinition for PluginPreset to reconciliation

3 participants