Skip to content

OCPBUGS-65622: add controller for downloads service account deletion logic#1111

Open
ehearne-redhat wants to merge 1 commit intoopenshift:mainfrom
ehearne-redhat:downloads-service-account-controller
Open

OCPBUGS-65622: add controller for downloads service account deletion logic#1111
ehearne-redhat wants to merge 1 commit intoopenshift:mainfrom
ehearne-redhat:downloads-service-account-controller

Conversation

@ehearne-redhat
Copy link
Contributor

@ehearne-redhat ehearne-redhat commented Feb 14, 2026

@yapei pointed out correctly that the service account downloads is not deleted once the pod downloads completes/deletes.

This PR addresses this by adding a controller, similar to how downloads deployment has its own controller in pkg/console/controllers/downloadsdeployment/controller.go.

It also moves the service account in bindata/assets/deployments/downloads-deployment.yaml down to spec.spec so it is placed correctly.

The service account is now managed dynamically, so static reference to it in manifests/06-sa.yaml has been removed. Now, it has its own file in bindata/assets/serviceaccounts/downloads-sa.yaml .

Permissions for the controller to perform CRUD on service account objects has been given to console-operator ClusterRole.

@openshift-ci openshift-ci bot requested review from jhadvig and spadgett February 14, 2026 08:46
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 14, 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 therealjon 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 changed the title OCPBUGS-65622 - add controller for downloads service account deletion logic OCPBUGS-65622: add controller for downloads service account deletion logic Feb 14, 2026
@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 14, 2026
@openshift-ci-robot
Copy link
Contributor

@ehearne-redhat: This pull request references Jira Issue OCPBUGS-65622, 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 @yapei

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

Details

In response to this:

@yapei pointed out correctly that the service account downloads is not deleted once the pod downloads completes/deletes.

This PR addresses this by adding a controller, similar to how downloads deployment has its own controller in pkg/console/controllers/downloadsdeployment/controller.go.

It also moves the service account in bindata/assets/deployments/downloads-deployment.yaml down to spec.spec so it is placed correctly.

The service account is now managed dynamically, so static reference to it in manifests/06-sa.yaml has been removed. Now, it has its own file in bindata/assets/serviceaccounts/downloads-sa.yaml .

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 a review from yapei February 14, 2026 08:47
@ehearne-redhat ehearne-redhat force-pushed the downloads-service-account-controller branch from 5c08afe to 7ba9a63 Compare February 15, 2026 22:34
@openshift-ci-robot
Copy link
Contributor

@ehearne-redhat: This pull request references Jira Issue OCPBUGS-65622, which is valid.

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

Requesting review from QA contact:
/cc @yapei

Details

In response to this:

@yapei pointed out correctly that the service account downloads is not deleted once the pod downloads completes/deletes.

This PR addresses this by adding a controller, similar to how downloads deployment has its own controller in pkg/console/controllers/downloadsdeployment/controller.go.

It also moves the service account in bindata/assets/deployments/downloads-deployment.yaml down to spec.spec so it is placed correctly.

The service account is now managed dynamically, so static reference to it in manifests/06-sa.yaml has been removed. Now, it has its own file in bindata/assets/serviceaccounts/downloads-sa.yaml .

Permissions for the controller to perform CRUD on service account objects has been given to console-operator ClusterRole.

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.

@ehearne-redhat ehearne-redhat force-pushed the downloads-service-account-controller branch from 7ba9a63 to 0504779 Compare February 16, 2026 09:37
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 16, 2026

@ehearne-redhat: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit 0504779 link true /test unit
ci/prow/e2e-azure-ovn-upgrade 0504779 link true /test e2e-azure-ovn-upgrade

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.

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Thanks @ehearne-redhat for the PR. I would suggest to implement the SA logic into the downloadsdeployment controller since the logic is basically similar. Maybe we could rename it just to downloads folder wise.
We might need to be cautions with the DownloadsDeploymentSync condition if renaming, cause since we would need to add it into the StaleConditionsController.

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.

3 participants