Skip to content

OCPBUGS-65634: add service account to verify pod#638

Open
ehearne-redhat wants to merge 3 commits intoopenshift:mainfrom
ehearne-redhat:add-service-account-curl-job-1
Open

OCPBUGS-65634: add service account to verify pod#638
ehearne-redhat wants to merge 3 commits intoopenshift:mainfrom
ehearne-redhat:add-service-account-curl-job-1

Conversation

@ehearne-redhat
Copy link
Contributor

This PR addresses the revert that occurred in #609 . It includes test logic that ensures the job is deleted first before proceeding to delete the service account, assuming DeferCleanup uses LIFO.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 10, 2026
@openshift-ci-robot
Copy link

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

3 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 ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @kuiwang02

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

Details

In response to this:

This PR addresses the revert that occurred in #609 . It includes test logic that ensures the job is deleted first before proceeding to delete the service account, assuming DeferCleanup uses LIFO.

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
Copy link
Contributor

openshift-ci bot commented Feb 10, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ehearne-redhat
Once this PR has been reviewed and has the lgtm label, please assign joelanford 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

@ehearne-redhat ehearne-redhat force-pushed the add-service-account-curl-job-1 branch from d39797b to 7f4c112 Compare February 10, 2026 15:14
@ehearne-redhat
Copy link
Contributor Author

/retest

@ehearne-redhat
Copy link
Contributor Author

@oceanc80 after shift week, could you take a look? :)

@ehearne-redhat
Copy link
Contributor Author

@oceanc80 after shift week, could you take a look? :)

@oceanc80 just bumping this message so it's fresh. Let me know if you are able to review. :)

err = k8sClient.Create(ctx, serviceAccount)
Expect(err).NotTo(HaveOccurred(), "failed to create Service Account")

if err != nil && !apierrors.IsAlreadyExists(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We expect err to be nill on line 92. Maybe attenuate the Expect to be tolerant to AlreadyExists?

serviceAccount := &corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Name: jobNamePrefix,
Namespace: "default",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wasn't the reversion due to the fact that we were still creating an SA in the default namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I am aware, the reason why the revert occurred was due to race condition causing the curl job to not always consistently run and hence fail. The race condition being the service account was not cleaned up or applied before the curl job was applied.

There was some discussion in the Slack thread referenced in the revert #609 about having the verify pod in the default namespace as "suspicious". If you prefer I can move this pod to a different namespace. :)

@tmshort
Copy link
Contributor

tmshort commented Feb 19, 2026

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2026

@ehearne-redhat: 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/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments