Skip to content

feat(operator): collect OKP workload diagnostics - #396

Merged
rm3l merged 1 commit into
redhat-developer:mainfrom
maysunfaisal:collect-intelligent-assistant-workloads-operator
Sep 28, 2026
Merged

rm3l merged 1 commit into
redhat-developer:mainfrom
maysunfaisal:collect-intelligent-assistant-workloads-operator

Conversation

@maysunfaisal

@maysunfaisal maysunfaisal commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Description

Collect diagnostics for the standalone Offline Knowledge Portal (OKP) Deployment created by the RHDH Operator when the intelligent-assistant-okp flavor is enabled.

For each Backstage custom resource, the operator collector now finds a Deployment that:

  • is controlled by that Backstage CR, including a matching CR UID;
  • belongs to the rhdh.redhat.com API group;
  • contains the okp container; and
  • is separate from the primary RHDH workload.

The matched workload is collected under operator/backstage-crs/ns=<namespace>/<cr-name>/okp-deployment/. The output includes the Deployment manifest and description, pods, current and previous logs, process information, and rollout history. Backstage-specific application data and heap dumps are intentionally skipped because OKP is not a Backstage application container.

When Intelligent Assistant is enabled without the OKP flavor, no matching OKP Deployment exists, so the collector continues normally without creating an okp-deployment/ directory. Existing RHDH and Lightspeed Core collection remains unchanged.

The documentation is updated to describe the dedicated okp-deployment/ output used for both Helm- and Operator-managed installations.

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

https://redhat.atlassian.net/browse/RHIDP-16868

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

Local validation:

make test
golangci-lint run ./...
go vet ./...

The configured pre-commit hook also passes against the changed files.

To test against an Operator-managed RHDH installation with the intelligent-assistant-okp flavor enabled:

BASE_COLLECTION_PATH=/tmp/rhdh-must-gather-operator-okp \
  go run ./cmd/gather \
  --namespaces <rhdh-namespace>,<operator-namespace> \
  --since 6h \
  --without-helm \
  --without-orchestrator \
  --without-namespace-inspect \
  --without-platform \
  --without-route \
  --without-ingress

Verify that the following directory is present:

/tmp/rhdh-must-gather-operator-okp/operator/backstage-crs/ns=<rhdh-namespace>/<cr-name>/okp-deployment/

It should contain:

deployment.yaml
deployment.describe.txt
logs/
pods/
processes/
rollout-history/

Also verify that:

  • OKP current.txt contains logs when activity occurred within the requested log window;
  • previous.txt can report that no previous terminated container exists when the OKP container has not restarted;
  • no data/ or heap-dumps/ directory is created for OKP; and
  • an Intelligent Assistant-only installation without the OKP flavor does not create okp-deployment/.

Detect OKP Deployments controlled by each Backstage custom resource and collect their Kubernetes resources, logs, processes, and rollout history without Backstage application data.

Co-authored-by: Codex <noreply@openai.com>
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR images are available (for 1 week):

  1. quay.io/rhdh-community/rhdh-must-gather:pr-396
  2. quay.io/rhdh-community/rhdh-must-gather:pr-396-e6c62ccbb

@maysunfaisal
maysunfaisal marked this pull request as ready for review September 24, 2026 21:15
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Sep 24, 2026
@maysunfaisal

Copy link
Copy Markdown
Member Author

@rm3l @gazarenkov can you pls take a look? i tested it with redhat-developer/rhdh-operator#3370

@github-actions

Copy link
Copy Markdown
Contributor

PR images are available (for 1 week):

  1. quay.io/rhdh-community/rhdh-must-gather:pr-396
  2. quay.io/rhdh-community/rhdh-must-gather:pr-396-e6c62ccbb

@rm3l
rm3l merged commit 7aacca2 into redhat-developer:main Sep 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants