Skip to content

[release-4.22] OCPBUGS-88026: fall back to kube-system/global-pull-secret for Insights token#1305

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-1302-to-release-4.22
Jun 24, 2026
Merged

[release-4.22] OCPBUGS-88026: fall back to kube-system/global-pull-secret for Insights token#1305
openshift-merge-bot[bot] merged 2 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-1302-to-release-4.22

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #1302

/assign opokornyy

judexzhu and others added 2 commits June 10, 2026 12:47
On ARO HCP clusters, openshift-config/pull-secret only contains the ACR
registry credential — no cloud.openshift.com token. Customers add their
Red Hat pull secret (including cloud.openshift.com) day-2 via the
additional-pull-secret method, which HCCO merges into
kube-system/global-pull-secret.

This change makes updateToken() check kube-system/global-pull-secret as
a fallback when openshift-config/pull-secret has no cloud.openshift.com
token, enabling Insights reporting on HCP clusters without requiring
platform-level changes.

Changes:
- Generalize fetchSecret() to accept a namespace parameter
- Add fallback lookup to kube-system/global-pull-secret in updateToken()
- Add read-only RBAC (Role+RoleBinding) for global-pull-secret in kube-system
- Include namespace in fetchSecret log/error messages for debuggability
- Add tests for fallback and primary-wins-over-fallback precedence

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses review feedback to replace hardcoded string literals with
named constants for better readability and maintainability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 42db0e50-4f4b-475a-8137-101cf3e14735

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

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

@openshift-ci openshift-ci Bot requested review from katushiik11 and ncaak June 10, 2026 12:48
@opokornyy

Copy link
Copy Markdown
Contributor

/cc @judexzhu

@openshift-ci openshift-ci Bot requested a review from judexzhu June 10, 2026 12:48
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-87889 has been cloned as Jira Issue OCPBUGS-88026. Will retitle bug to link to clone.
/retitle [release-4.22] OCPBUGS-88026: fall back to kube-system/global-pull-secret for Insights token

Details

In response to this:

This is an automated cherry-pick of #1302

/assign opokornyy

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.

@openshift-ci openshift-ci Bot changed the title [release-4.22] OCPBUGS-87889: fall back to kube-system/global-pull-secret for Insights token [release-4.22] OCPBUGS-88026: fall back to kube-system/global-pull-secret for Insights token Jun 10, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-88026, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #1302

/assign opokornyy

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.

@opokornyy

Copy link
Copy Markdown
Contributor

/retest

@judexzhu

Copy link
Copy Markdown
Contributor

/lgtm

@judexzhu

Copy link
Copy Markdown
Contributor

/retest-required

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2026
@judexzhu judexzhu removed their assignment Jun 22, 2026
@opokornyy

Copy link
Copy Markdown
Contributor

/override ci/prow/insights-operator-e2e-tests

This is a known issue of the python kubernetes client

@opokornyy

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

@opokornyy: Overrode contexts on behalf of opokornyy: ci/prow/insights-operator-e2e-tests

Details

In response to this:

/override ci/prow/insights-operator-e2e-tests

This is a known issue of the python kubernetes client

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 kubernetes-sigs/prow repository.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@opokornyy: This pull request references Jira Issue OCPBUGS-88026, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@opokornyy

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@opokornyy: This pull request references Jira Issue OCPBUGS-88026, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-87889 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-87889 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents
Details

In response to this:

/jira refresh

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Jun 24, 2026
@opokornyy

Copy link
Copy Markdown
Contributor

/approve

@opokornyy

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, opokornyy

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 Jun 24, 2026
@opokornyy

Copy link
Copy Markdown
Contributor

/verify later @opokornyy

@opokornyy

Copy link
Copy Markdown
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jun 24, 2026
@opokornyy

Copy link
Copy Markdown
Contributor

/verified later @opokornyy

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Jun 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@opokornyy: This PR has been marked to be verified later by @opokornyy.

Details

In response to this:

/verified later @opokornyy

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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 0168ccc into openshift:release-4.22 Jun 24, 2026
12 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-88026: All pull requests linked via external trackers have merged:

This pull request has the verified-later tag and will need to be manually moved to VERIFIED after testing. Jira Issue OCPBUGS-88026 has been moved to the MODIFIED state.

Details

In response to this:

This is an automated cherry-pick of #1302

/assign opokornyy

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.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 4.22.0-0.nightly-2026-06-25-210812

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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 verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants