Skip to content

Add knative crds + move knative CRs to plugin-infra - #1219

Merged
gazarenkov merged 7 commits into
redhat-developer:mainfrom
jenniferubah:plugin-infra-knative
Jun 29, 2025
Merged

Add knative crds + move knative CRs to plugin-infra#1219
gazarenkov merged 7 commits into
redhat-developer:mainfrom
jenniferubah:plugin-infra-knative

Conversation

@jenniferubah

@jenniferubah jenniferubah commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Description

Currently, the Knative CRs (managed by Serverless Operator) are created as part of the plugin-deps. However, this should be part of the plugin-infra because there will be risks of failure when changes are made to the these CRs (by the admin) and the RHDH operator attempts reapplication/reconciliation/reversion since the plugin-deps are handled by the operator.

Which issue(s) does this PR fix or relate to

  • Relates to Enable plugins dependencies for merging Orchestrator into RHDH.

PR acceptance criteria

  • Knative CRs should be applied during the plugin infrastructure set up instead of afterwards.

  • Tests

  • Documentation

How to test changes / Special notes to the reviewer

Pull the changes, run make plugin-infra deploy IMG={IMG}
This should apply the knative CRs and create the resources after the serverless operator is ready.

Summary by Sourcery

Move Knative custom resources setup out of plugin-deps into the plugin-infra directory, adjust the Makefile to deploy and wait for CRDs accordingly, and update documentation to match the new deployment flow.

Enhancements:

  • Move KnativeEventing and KnativeServing CR definitions from plugin-deps to a dedicated infra-knative-cr.yaml under plugin-infra
  • Update Makefile plugin-infra target to apply knative CRs, wait for CRD readiness, and apply sonataflow infra in sequence

Documentation:

  • Update dynamic-plugins documentation to reflect knative CRs being deployed via plugin-infra

@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

⚠️ Files changed in bundle and installer generation!

Those changes to the operator bundle/installer manifests should have been pushed automatically to your PR branch.

NOTE: If the PR checks are stuck after this additional commit, manually close the PR and immediately reopen it to trigger the checks again.

@jenniferubah

Copy link
Copy Markdown
Contributor Author

@gazarenkov @masayag PTAL

@masayag

masayag commented Jun 5, 2025

Copy link
Copy Markdown

LGTM.
Did you try installing the openshift-serverless operator from the console after installing RHDH?
Just to make sure there isn't any conflict between importing CRDs for knative by RHDH to the one installed by the openshift-serverless operator.

@jenniferubah

jenniferubah commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

LGTM. Did you try installing the openshift-serverless operator from the console after installing RHDH? Just to make sure there isn't any conflict between importing CRDs for knative by RHDH to the one installed by the openshift-serverless operator.

Thanks! No, I didn't test that. I will test it out and provide feedback. Good point.

@gazarenkov gazarenkov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread config/profile/rhdh/plugin-infra/orchestrator/infra-serverless.yaml Outdated

@gazarenkov gazarenkov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One more, final ) thing: I think since backstage operator does not deal with knative-eventing and knative-serving anymore we can safely remove

- apiGroups:
      - "operator.knative.dev"
    resources:
      - knativeeventings
      - knativeservings
    ...

block from config/profile/rhdh/plugin-rbac/rbac-sonataflow.yaml ?

@gazarenkov
gazarenkov self-requested a review June 27, 2025 17:46
@gazarenkov
gazarenkov marked this pull request as ready for review June 27, 2025 17:47
@sourcery-ai

sourcery-ai Bot commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR relocates Knative CRs from the plugin-deps profiles into a dedicated plugin-infra manifest, updates the plugin-infra deployment workflow to apply and wait for the new CRs, and refreshes documentation to reflect these changes.

Flow diagram for new plugin-infra resource application order

flowchart TD
    Start([Start: make plugin-infra])
    ApplyServerless[Apply infra-serverless.yaml]
    WaitCRDs[Wait for CRDs to be established]
    ApplyKnative[Apply infra-knative-cr.yaml]
    ApplySonataflow[Apply infra-sonataflow.yaml]
    End([End])

    Start --> ApplyServerless --> WaitCRDs --> ApplyKnative --> ApplySonataflow --> End
Loading

File-Level Changes

Change Details Files
Relocate Knative custom resources from plugin-deps to plugin-infra
  • Remove KnativeEventing and KnativeServing CR entries from plugin-deps configmap, sonataflow.yaml, and install.yaml
  • Add a new infra-knative-cr.yaml manifest under plugin-infra to declare these CRs
  • Delete obsolete kustomization.yaml under plugin-infra
bundle/rhdh/manifests/rhdh-plugin-deps_v1_configmap.yaml
config/profile/rhdh/plugin-deps/sonataflow.yaml
dist/rhdh/install.yaml
config/profile/rhdh/plugin-infra/orchestrator/infra-knative-cr.yaml
config/profile/rhdh/plugin-infra/kustomization.yaml
Update plugin-infra deployment logic to include new CR manifests
  • Adjust Makefile plugin-infra target to apply infra-serverless, wait for CRDs, then apply infra-knative-cr and infra-sonataflow sequentially
  • Simplify plugin-infra-undeploy target to delete all orchestrator resources directly
  • Remove redundant namespace definitions from infra-serverless.yaml
Makefile
config/profile/rhdh/plugin-infra/orchestrator/infra-serverless.yaml
Refresh documentation to reflect plugin-infra CR capabilities
  • Update dynamic-plugins.md to note that CRs can be defined under plugin-infra
  • Remove outdated bullet about Knative CRs under plugin-deps section
docs/dynamic-plugins.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @jenniferubah - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@openshift-ci

openshift-ci Bot commented Jun 27, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gazarenkov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gazarenkov
gazarenkov merged commit 5512128 into redhat-developer:main Jun 29, 2025
6 of 10 checks passed
@jenniferubah

Copy link
Copy Markdown
Contributor Author

One more, final ) thing: I think since backstage operator does not deal with knative-eventing and knative-serving anymore we can safely remove

- apiGroups:
      - "operator.knative.dev"
    resources:
      - knativeeventings
      - knativeservings
    ...

block from config/profile/rhdh/plugin-rbac/rbac-sonataflow.yaml ?

Sorry I missed this @gazarenkov. I created the PR here to remove the not needed permissions

Fortune-Ndlovu pushed a commit to Fortune-Ndlovu/rhdh-operator that referenced this pull request Sep 6, 2025
…#1219)

* Add knative crds + move knative CRs to plugin-infra

* Regenerate bundle/installer manifests

Co-authored-by: jenniferubah <jenniferubah@users.noreply.github.com>

* Fix dynamic plugin doc

* Remove serverless crd folder

* Update plugin-infra cmd in makefile +location of knative CRs

* Remove kustomization file + update makefile cmd

* Remove knative namespace creation

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jenniferubah <jenniferubah@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants