Skip to content

Derive Konflux tenant and SA from existing pipelines (ROSA-730) - #799

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
tnierman:fix-tenant-discovery
Jul 14, 2026
Merged

Derive Konflux tenant and SA from existing pipelines (ROSA-730)#799
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
tnierman:fix-tenant-discovery

Conversation

@tnierman

@tnierman tnierman commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

The agentic SDLC check pipeline template previously constructed the Konflux tenant namespace and service account from the operator name (<operator>-tenant, build-pipeline-<operator>). This fails for repos onboarded to Konflux with non-standard naming.

This PR reads both values from existing .tekton/*-pull-request.yaml files instead, which are the source of truth (created by Konflux during onboarding, never regenerated by boilerplate). Falls back to the convention if no existing pipelines are found.

Affected repos

Repo Actual tenant Convention would produce
configure-alertmanager-operator camo-hcm-tenant configure-alertmanager-operator-tenant
configure-goalert-operator fedramp-srep-tenant configure-goalert-operator-tenant

CAMO also has a non-standard SA: build-pipeline-configure-alertmanager-operator-master vs build-pipeline-configure-alertmanager-operator.

How it works

# Read from existing Konflux pipelines, skip the agentic check itself
TENANT_NAMESPACE=$(grep -h 'namespace:' .tekton/*-pull-request.yaml | grep -v agentic | head -1 | awk '{print $2}')
TENANT_NAMESPACE=${TENANT_NAMESPACE:-${OPERATOR_NAME}-tenant}

SERVICE_ACCOUNT=$(grep -h 'serviceAccountName:' .tekton/*-pull-request.yaml | grep -v agentic | head -1 | awk '{print $2}')
SERVICE_ACCOUNT=${SERVICE_ACCOUNT:-build-pipeline-${OPERATOR_NAME}}

Related

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • boilerplate/openshift/golang-osd-operator/agentic-sdlc-check-pull-request.yaml.tmpl is excluded by !boilerplate/**
  • boilerplate/openshift/golang-osd-operator/update is excluded by !boilerplate/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 76909ed4-6e88-40be-8b8b-2fe4d8c33122

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from AlexSmithGH and lucasponce July 14, 2026 18:16
Some repos (configure-alertmanager-operator, configure-goalert-operator)
have non-standard Konflux tenant namespaces and service accounts from
early onboarding. Instead of constructing these from the operator name,
read them from the existing Konflux pipeline files in .tekton/ which
are the source of truth. Falls back to the <operator>-tenant and
build-pipeline-<operator> conventions if no existing pipelines exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tnierman
tnierman force-pushed the fix-tenant-discovery branch from 47cde97 to 402d43e Compare July 14, 2026 18:23
@joshbranham

Copy link
Copy Markdown
Contributor

/lgtm
/approve

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

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joshbranham, tnierman

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 14, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit fd8027b into openshift:master Jul 14, 2026
5 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants