Skip to content

Conversation

@amitupadh
Copy link
Contributor

What type of PR is this?

bug

What this PR does / why we need it?

Fixes issue where ocm-access-token secret in openshift-ocm-agent-operator namespace was not updated after pull-secret rotation, causing ocm-agent pods to fail with stale credentials.

Changes:

  • Added periodic reconciliation to detect pull-secret changes
  • Added token comparison logic to detect when tokens differ
  • Automatically updates ocm-access-token secret when pull-secret changes
  • Automatically restarts ocm-agent pods after secret update

Which Jira/Github issue(s) this PR fixes?

Fixes SREP-2362

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 17, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 17, 2025

@amitupadh: This pull request references SREP-2362 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

bug

What this PR does / why we need it?

Fixes issue where ocm-access-token secret in openshift-ocm-agent-operator namespace was not updated after pull-secret rotation, causing ocm-agent pods to fail with stale credentials.

Changes:

  • Added periodic reconciliation to detect pull-secret changes
  • Added token comparison logic to detect when tokens differ
  • Automatically updates ocm-access-token secret when pull-secret changes
  • Automatically restarts ocm-agent pods after secret update

Which Jira/Github issue(s) this PR fixes?

Fixes SREP-2362

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 requested review from a7vicky and chamalabey December 17, 2025 20:48
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amitupadh
Once this PR has been reviewed and has the lgtm label, please assign theautoroboto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 17.46032% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.21%. Comparing base (171865b) to head (d6fbbc7).

Files with missing lines Patch % Lines
pkg/ocmagenthandler/ocmagenthandler.go 0.00% 17 Missing ⚠️
pkg/ocmagenthandler/ocmagenthandler_deployment.go 0.00% 15 Missing ⚠️
pkg/ocmagenthandler/ocmagenthandler_secret.go 39.13% 14 Missing ⚠️
controllers/ocmagent/ocmagent_controller.go 25.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
- Coverage   67.86%   66.21%   -1.65%     
==========================================
  Files          23       23              
  Lines        1506     1542      +36     
==========================================
- Hits         1022     1021       -1     
- Misses        408      445      +37     
  Partials       76       76              
Files with missing lines Coverage Δ
controllers/ocmagent/ocmagent_controller.go 33.33% <25.00%> (-5.89%) ⬇️
pkg/ocmagenthandler/ocmagenthandler_secret.go 63.72% <39.13%> (-5.17%) ⬇️
pkg/ocmagenthandler/ocmagenthandler_deployment.go 86.42% <0.00%> (-4.52%) ⬇️
pkg/ocmagenthandler/ocmagenthandler.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2025

@amitupadh: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants