Skip to content

OPRUN-4666,OPRUN-4671,OPRUN-4672,OPRUN-4673,OPRUN-4674,OPRUN-4659: Synchronize From Upstream Repositories + Remove spec.serviceAccount tests - #771

Closed
tmshort wants to merge 142 commits into
openshift:mainfrom
tmshort:PR-762-new
Closed

OPRUN-4666,OPRUN-4671,OPRUN-4672,OPRUN-4673,OPRUN-4674,OPRUN-4659: Synchronize From Upstream Repositories + Remove spec.serviceAccount tests#771
tmshort wants to merge 142 commits into
openshift:mainfrom
tmshort:PR-762-new

Conversation

@tmshort

@tmshort tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Manual sync to remove openshift/ e2e related to deprecated ServiceAccount usage in ClusterExtension API, Synthetic Permissions, and PreFlight Admissions.

Forked from current #762
With the the fix commit from #767

Summary by CodeRabbit

  • New Features

    • Added dynamic GraphQL catalog queries with pagination and query-complexity safeguards.
    • Added admission-policy examples and guidance for restricting ClusterExtension access.
    • Added end-to-end demo scenarios with recorded, rendered demonstrations.
  • Changes

    • ClusterExtension serviceAccount is now optional, deprecated, and ignored; a warning appears when it is configured.
    • Installation uses the operator’s trusted cluster-admin permissions model.
    • Added support and examples for single-namespace and own-namespace installation modes.
  • Documentation

    • Updated manifests, tutorials, API references, and demos to reflect the simplified configuration.

tmshort and others added 30 commits July 2, 2026 07:57
…back (#2791)

- Upgrade go.opentelemetry.io/otel/exporters/otlp/otlptrace,
  otlptracegrpc, and otel/sdk from v1.43.0 to v1.44.0 to match otel,
  otel/metric, and otel/trace already at v1.44.0
- Move E2E_TIMEOUT fallback from target-specific ?= into the e2e-run-%
  recipe via $(or $(E2E_TIMEOUT),20m) so the 20m default is explicit
  and the 25m override from test-experimental-e2e is unambiguous

Signed-off-by: Todd Short <tshort@redhat.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.21.6 to 0.21.7.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Commits](google/go-containerregistry@v0.21.6...v0.21.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-version: 0.21.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Convert terminal demos from standalone shell scripts recorded via
asciinema to Godog BDD scenarios that generate asciicast v2 files
programmatically. This makes demos into verified tests that can
never silently break while producing terminal recordings.

The recording infrastructure captures kubectl commands and their
stdout/stderr with real execution timing during @demo-tagged
scenario execution. Per-step dedup handles polling transparently
so only successful results appear in the recording. Step text is
emitted as comments and commands are colored for readability.

Demo scenarios:
- ClusterCatalog Quickstart: queries the operatorhubio catalog API
- SingleNamespace Install Mode: installs mariadb-operator with a
  separate watch namespace, verifies rolebindings
- OwnNamespace Install Mode: installs mariadb-operator with
  watch namespace equal to install namespace
- Webhook Support: installs telegraf-operator, verifies mutating
  webhook injects sidecar container into test pod

Not converted (no matching demo scenarios):
- Synthetic User Permissions: feature gate disabled in experimental
- Helm Chart Support: blocked by OCPBUGS-95281

The update-demos Makefile target now builds OLM from source using the
experimental e2e infrastructure, deploys with all feature gates and
operatorhubio catalog, runs demo scenarios, converts recordings to
SVG via svg-term-cli, and tears down the cluster. Demo recordings
are embedded in docs via the mkdocs-asciinema-player plugin and
served from GitHub Pages, removing the dependency on asciinema.org
for hosting recordings. Demo scenarios are excluded from regular
e2e test runs via ~@demo filter.

CI workflow (update-demos.yaml):
- On PR: generates demos, uploads asciicast and SVG files as job
  artifacts
- On merge to main: generates demos, deploys docs with updated
  recordings via make deploy-docs

Old demo shell scripts, the asciinema generate-asciidemo.sh wrapper,
and hack/demo/ resource files have been removed.

Co-authored-by: Claude <noreply@anthropic.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.38.0 to 0.55.0.
- [Commits](golang/net@v0.38.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/sigstore/fulcio](https://github.com/sigstore/fulcio) from 1.8.5 to 1.8.6.
- [Release notes](https://github.com/sigstore/fulcio/releases)
- [Changelog](https://github.com/sigstore/fulcio/blob/main/CHANGELOG.md)
- [Commits](sigstore/fulcio@v1.8.5...v1.8.6)

---
updated-dependencies:
- dependency-name: github.com/sigstore/fulcio
  dependency-version: 1.8.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: jjaruszewski <jjaruszewski@man.poznan.pl>
GitHub Actions does not support expressions in the permissions block.
The dynamic expression was causing every workflow run to fail with
"workflow file issue" before any job could start.

Use static contents:write (matching pages.yaml convention). The deploy
step is already gated by `if: github.event_name == 'push'`.

Co-authored-by: Claude <noreply@anthropic.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.21.3 to 11.0.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](facelessuser/pymdown-extensions@10.21.3...11.0)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-version: '11.0'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.21.1 to 3.21.2.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.21.1...v3.21.2)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Track ClusterObjectSets in addedResources when applied, matching
the pattern established for ClusterExtensions in #2783. This removes
the special-case cleanup block in ScenarioCleanup and ensures multiple
ClusterObjectSets per scenario are all cleaned up correctly.

Co-authored-by: Per G. da Silva <pegoncal@redhat.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The HelmChartSupport feature gate (alpha, default off) and all code for
detecting, pulling, caching, and loading native Helm chart bundles from
OCI registries is removed. The path forward on the next bundle format is
unclear and may not be Helm, so maintaining this code is not justified.

The Helm backend that converts registry+v1 bundles into Helm chart
objects for installation (RegistryV1HelmChartProvider) is unaffected.

Co-authored-by: Claude <noreply@anthropic.com>
Bumps [click](https://github.com/pallets/click) from 8.4.1 to 8.4.2.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.md)
- [Commits](pallets/click@8.4.1...8.4.2)

---
updated-dependencies:
- dependency-name: click
  dependency-version: 8.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.20.2 to 1.20.3.
- [Release notes](https://github.com/cert-manager/cert-manager/releases)
- [Changelog](https://github.com/cert-manager/cert-manager/blob/master/RELEASE.md)
- [Commits](cert-manager/cert-manager@v1.20.2...v1.20.3)

---
updated-dependencies:
- dependency-name: github.com/cert-manager/cert-manager
  dependency-version: 1.20.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.46.0 to 0.47.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.46.0...v0.47.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2026.5.9 to 2026.6.28.
- [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt)
- [Commits](mrabarnett/mrab-regex@2026.5.9...2026.6.28)

---
updated-dependencies:
- dependency-name: regex
  dependency-version: 2026.6.28
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.6 to 1.19.0.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](klauspost/compress@v1.18.6...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](dorny/paths-filter@v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.21.0 to 0.22.0.
- [Commits](golang/sync@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* shift to file-based cache, leveraging existing metas indexer

* review comments

Signed-off-by: grokspawn <jordan@nimblewidget.com>

* bounds-protect type evaluation depth

Signed-off-by: grokspawn <jordan@nimblewidget.com>

* more review comments

Signed-off-by: grokspawn <jordan@nimblewidget.com>

---------

Signed-off-by: grokspawn <jordan@nimblewidget.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 11.0 to 11.0.1.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](facelessuser/pymdown-extensions@11.0...11.0.1)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-version: 11.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(api): deprecate spec.serviceAccount and adopt cluster-admin scope

Mark spec.serviceAccount as deprecated in the ClusterExtension API.
Remove PreAuthorizer integration, SA-scoped RBAC templates, and
restconfig action. Simplify the controller to use cluster-admin
scope directly.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* feat: add ValidatingAdmissionPolicy for serviceAccount deprecation warning

Create VAP and VAPB resources that emit a warning when
spec.serviceAccount is set on a ClusterExtension. Add integration
test infrastructure for warning collection.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* test: clean up e2e tests for serviceAccount deprecation

Remove SA-specific e2e test scenarios, SA RBAC templates, and the
extension developer test suite. Simplify test steps to use
cluster-admin scope.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* refactor: remove per-SA infrastructure and feature gates

Delete authentication and authorization packages, feature gates,
k8smaintainer tool, SA demo scripts, and documentation. Remove
k8s.io/kubernetes dependency and unnecessary k8s staging replace
directives.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* refactor: replace contentmanager with shared TrackingCache

Delete the contentmanager package and replace it with boxcutter's
shared TrackingCache. Simplify revision engine factory to use
the base config directly. Remove SA label constants.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* docs: update documentation for cluster-admin scope

Remove SA-related documentation, tutorials, and demo scripts.
Clean up remaining ServiceAccount references from unit tests.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>

* Add documentation examples for using ValidatingAdmissionPolicy to protect OLMv1 API access.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
Co-Authored-By: Predrag Knezevic <pknezevi@redhat.com>
Co-Authored-By: Daniel Franz <dfranz@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>

* docs: rewrite cluster-admin scope section in design decisions doc

Also updates go.mod/go.sum to fix k8s.io/client-go version.

---------

Signed-off-by: Daniel Franz <dfranz@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Franz <dfranz@redhat.com>
Co-authored-by: Joe Lanford <joe.lanford@gmail.com>
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](marocchino/sticky-pull-request-comment@v3.0.4...v3.0.5)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-version: 3.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the k8s-dependencies group with 1 update: [sigs.k8s.io/structured-merge-diff/v6](https://github.com/kubernetes-sigs/structured-merge-diff).


Updates `sigs.k8s.io/structured-merge-diff/v6` from 6.4.0 to 6.4.1
- [Changelog](https://github.com/kubernetes-sigs/structured-merge-diff/blob/master/RELEASE.md)
- [Commits](kubernetes-sigs/structured-merge-diff@v6.4.0...v6.4.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/structured-merge-diff/v6
  dependency-version: 6.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v10.3.0...v10.4.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.47.0 to 0.48.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/cert-manager/cert-manager](https://github.com/cert-manager/cert-manager) from 1.20.3 to 1.21.0.
- [Release notes](https://github.com/cert-manager/cert-manager/releases)
- [Changelog](https://github.com/cert-manager/cert-manager/blob/master/RELEASE.md)
- [Commits](cert-manager/cert-manager@v1.20.3...v1.21.0)

---
updated-dependencies:
- dependency-name: github.com/cert-manager/cert-manager
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tmshort and others added 7 commits July 24, 2026 00:16
…cluster version

Add a second ReleaseGate-eligible OTE test verifying that an operator
whose olm.maxOpenShiftVersion exceeds the current cluster version does
not block cluster upgrade (InstalledOLMOperatorsUpgradeable stays True).

The existing test only covered the blocking path (maxOCPVersion ==
current version → False). This covers the complementary allow path
(maxOCPVersion == next minor → True), directly exercising the
normalization logic introduced for the 4.23/5.0 co-release boundary.

A nextMinorVersion() helper mirrors the 4.23→5.1 special case so the
bundle annotation is always set to the correct next upgrade target.

Run 'make build-update' to register the new allow-case test in the
extension metadata after adding it to olmv1-incompatible.go.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Todd Short <tshort@redhat.com>
Automate the ClusterExtension rollout failure coverage for OCP-88331 and OCP-88332 by building in-cluster bundle and catalog images for successful and failing bundle versions.

The new QE specs verify ProgressDeadlineExceeded on an initial failed rollout and ProbeFailure while upgrading to a bad revision under the BoxCutter runtime.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
Co-authored-by: Bruno Andrade <bruno.balint@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Todd Short <tshort@redhat.com>
…eAccount usage in ClusterExtension API, Synthetic Permissions, and PreFlight Admissions

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 24, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 24, 2026

Copy link
Copy Markdown

@tmshort: This pull request references OPRUN-4666 which is a valid jira issue.

This pull request references OPRUN-4671 which is a valid jira issue.

This pull request references OPRUN-4672 which is a valid jira issue.

This pull request references OPRUN-4673 which is a valid jira issue.

This pull request references OPRUN-4674 which is a valid jira issue.

This pull request references OPRUN-4659 which is a valid jira issue.

Details

In response to this:

Manual sync to remove openshift/ e2e related to deprecated ServiceAccount usage in ClusterExtension API, Synthetic Permissions, and PreFlight Admissions.

Forked from current #762
With the the fix commit from #767

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Walkthrough

This PR deprecates ignored ClusterExtension.spec.serviceAccount configuration, switches controller operations to cluster-admin credentials, replaces service-account preauthorization and content-manager wiring, modernizes catalog GraphQL loading, and adds e2e demo recording, admission-policy tests, and documentation updates.

Changes

OLMv1 trust and API model

Layer / File(s) Summary
Deprecated service-account contract
api/v1/*, applyconfigurations/api/v1/*, helm/olmv1/base/operator-controller/crd/*
spec.serviceAccount becomes optional, deprecated, ignored, and clearable after being set.
Controller permissions and validation
cmd/operator-controller/main.go, internal/operator-controller/controllers/*, manifests/*, helm/olmv1/templates/*
Controller wiring uses a shared tracking cache and cluster-admin binding; admission warnings replace service-account existence validation.
Service-account cleanup across tests and examples
openshift/tests-extension/*, test/e2e/features/*, config/samples/*, docs/*
Fixtures, manifests, templates, and examples stop creating or referencing installer service accounts and related RBAC.
Access-control documentation and tests
docs/howto/how-to-protect-olmv1-api-access.md, test/e2e/features/vap-access-control.feature
Documents and tests RBAC plus ValidatingAdmissionPolicy restrictions for ClusterExtension operations.

Dynamic GraphQL catalog serving

Layer / File(s) Summary
Schema discovery and query validation
internal/catalogd/graphql/*
Schema metadata is serialized without sample-object caches, array inference samples multiple elements, loaders provide pagination, and query depth, alias, and field limits are enforced.
Provider-backed service and storage
internal/catalogd/service/*, internal/catalogd/storage/*, internal/catalogd/server/*
GraphQL services load persisted schemas and indexed objects through a provider, cache schemas with singleflight, apply request contexts and timeouts, and map missing catalogs to HTTP 404 responses.
GraphQL and storage validation
internal/catalogd/graphql/*_test.go, internal/catalogd/service/*_test.go, internal/catalogd/storage/*_test.go
Tests cover serialization, discovery, pagination, introspection, complexity limits, cache behavior, persisted schemas, and indexed object loading.

Demo and e2e workflow

Layer / File(s) Summary
Demo recording pipeline
test/e2e/steps/asciicast_*.go, test/e2e/steps/demo_steps.go, Makefile
@demo scenarios record asciicast files, query catalog and workload state, and render recordings to SVG.
Demo scenarios and e2e execution
test/e2e/features/demos.feature, test/e2e/features/*, test/e2e/steps/*
Adds catalog, install-mode, webhook, and admission-policy scenarios while making Kubernetes command execution context-aware.
Documentation and build integration
README.md, docs/draft/*, mkdocs.yml, requirements.txt, .gitignore
Embeds generated demos, enables the Asciinema MkDocs plugin, updates demo dependencies, and ignores generated recordings.

Image and deployment updates

Layer / File(s) Summary
Helm image handling removal
internal/shared/util/image/*
Image layers are applied directly; Helm chart detection, extraction, caching, and related tests are removed.
Deployment annotations and maintenance
internal/operator-controller/rukpak/render/registryv1/*, test/regression/convert/*, scripts/install.tpl.sh, go.mod
Generated deployments include olm.operatorNamespace; installation cleanup and dependency versions are updated.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant GraphQLClient
  participant GraphQLHandler
  participant CachedGraphQLService
  participant LocalDirV1
  participant ObjectLoader
  GraphQLClient->>GraphQLHandler: Submit query
  GraphQLHandler->>CachedGraphQLService: ExecuteQuery(ctx, catalog, query)
  CachedGraphQLService->>CachedGraphQLService: ValidateQueryComplexity
  CachedGraphQLService->>LocalDirV1: LoadCatalogSchema(catalog)
  CachedGraphQLService->>LocalDirV1: NewObjectLoader(catalog)
  CachedGraphQLService->>ObjectLoader: Load paged objects
  ObjectLoader-->>CachedGraphQLService: JSON objects
  CachedGraphQLService-->>GraphQLHandler: GraphQL result
  GraphQLHandler-->>GraphQLClient: HTTP response
Loading
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@openshift-ci
openshift-ci Bot requested review from ankitathomas and pedjak July 24, 2026 13:22
@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (1)
test/extension-developer-e2e/extension_developer_test.go (1)

138-169: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use t.Cleanup so resources are torn down on assertion failure. The final c.Delete calls only execute on the success path; if the EventuallyWithT install assertion fails, the ClusterCatalog and the fixed-name ClusterExtension "registryv1" are left on the cluster and can break reruns.

♻️ Register cleanup right after create
 	require.NoError(t, c.Create(context.Background(), catalog))
+	t.Cleanup(func() { _ = c.Delete(context.Background(), catalog) })
 	require.NoError(t, c.Create(context.Background(), clusterExtension))
+	t.Cleanup(func() { _ = c.Delete(context.Background(), clusterExtension) })

Then drop the trailing c.Delete calls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/extension-developer-e2e/extension_developer_test.go` around lines 138 -
169, Register t.Cleanup handlers immediately after successfully creating the
ClusterCatalog and ClusterExtension in the test, using c.Delete to remove each
resource even when EventuallyWithT fails. Remove the trailing c.Delete calls
after the assertion, preserving cleanup for both catalog and the fixed-name
ClusterExtension "registryv1".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitignore:
- Around line 57-58: The .gitignore entry for docs/demos/ incorrectly excludes
assets required by the published documentation and README. Remove that ignore
rule so the demo recordings can be committed and included by the mkdocs build;
README.md requires no direct change.

In `@docs/draft/howto/enable-webhook-support.md`:
- Around line 55-59: Fix the asciinema-player embed in the webhook support
how-to by either adding the missing webhook-support.cast asset at the referenced
location or updating the "file" value to an existing tracked cast asset path;
ensure the resulting player reference resolves correctly.

In `@docs/howto/how-to-protect-olmv1-api-access.md`:
- Around line 49-65: Update the ClusterRoleBinding example to grant
clusterextension-installer-role only to team-monitoring, removing the alice User
subject, or update the associated policy matchConditions to include every
granted subject. Keep the RBAC subjects and policy subjects aligned so no
unprotected user receives the installer role.
- Around line 39-41: Update the documented role permissions and corresponding
policy examples to avoid unrestricted ClusterExtension deletion: either remove
delete from the role or add a DELETE policy that uses oldObject to enforce the
same ownership and namespace restrictions. Apply the chosen fix consistently at
the referenced permission and policy examples.

In
`@helm/olmv1/templates/rbac/clusterrolebinding-operator-controller-manager-rolebinding.yml`:
- Around line 11-15: The operator controller is granted the overly broad
built-in cluster-admin role; replace roleRef.name in
helm/olmv1/templates/rbac/clusterrolebinding-operator-controller-manager-rolebinding.yml
lines 11-15 with an appropriate scoped or aggregated ClusterRole, then
regenerate openshift/operator-controller/manifests-experimental.yaml lines
887-891 from the template so both manifests match.

In `@manifests/experimental-e2e.yaml`:
- Around line 2226-2230: Confirm and explicitly document approval of the
intentional cluster-admin binding for the operator-controller ServiceAccount in
manifests/experimental-e2e.yaml:2226-2230,
manifests/experimental.yaml:2187-2191, and
manifests/standard-e2e.yaml:1397-1401; state that no scoped alternative is
planned for these feature sets, rather than changing the bindings.

In `@test/e2e/steps/demo_steps.go`:
- Around line 201-221: Update PodHasContainerCount to propagate the result of
waitFor instead of discarding it, returning the timeout or polling error when
the pod never reaches expected containers and nil only on success. Follow
waitFor’s actual return contract, including converting a non-error failure
result into an appropriate error if necessary, while preserving the existing
recording behavior.

---

Nitpick comments:
In `@test/extension-developer-e2e/extension_developer_test.go`:
- Around line 138-169: Register t.Cleanup handlers immediately after
successfully creating the ClusterCatalog and ClusterExtension in the test, using
c.Delete to remove each resource even when EventuallyWithT fails. Remove the
trailing c.Delete calls after the assertion, preserving cleanup for both catalog
and the fixed-name ClusterExtension "registryv1".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread .gitignore
Comment thread docs/draft/howto/enable-webhook-support.md
Comment thread docs/howto/how-to-protect-olmv1-api-access.md
Comment thread docs/howto/how-to-protect-olmv1-api-access.md
Comment thread manifests/experimental-e2e.yaml
Comment thread test/e2e/steps/demo_steps.go
@grokspawn

Copy link
Copy Markdown
Contributor

/lgtm
/verified-by CI

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2026
@grokspawn

Copy link
Copy Markdown
Contributor

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@grokspawn: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/test openshift-e2e-aws

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/test openshift-e2e-aws-techpreview

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-upgrade-ovn-single-node

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/test openshift-e2e-aws
/test openshift-e2e-aws-techpreview

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@tmshort

tmshort commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of merged #767

@tmshort tmshort closed this Jul 24, 2026
@tmshort
tmshort deleted the PR-762-new branch July 27, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.