Skip to content

Add scheduling options to the operator-managed Jobs - #1690

Open
fontaineajulien wants to merge 1 commit into
pulp:mainfrom
fontaineajulien:job-scheduling
Open

fontaineajulien wants to merge 1 commit into
pulp:mainfrom
fontaineajulien:job-scheduling

Conversation

@fontaineajulien

Copy link
Copy Markdown

Closes #1628.

The operator builds its Jobs in commonJob() with a pod spec that has no nodeSelector, tolerations or affinity, and the CR has no field to set them. On clusters split into node pools, these Jobs can land on nodes that cannot run them, for example nodes that cannot pull the Pulp image from a private registry. A migration Job that never starts blocks the api, content and worker Deployments in wait_on_database_migrations.sh.

This PR adds the same scheduling fields that the long-running components already have to PulpJob:

spec:
  migration_job:
    node_selector: {...}
    tolerations: [...]
    affinity: {...}
  admin_password_job: {...}   # same fields
  signing_job: {...}          # same fields
  • commonJob() copies them into the Job pod spec. Unset fields produce the same pod spec as before.
  • The update-content-checksums Job follows migration_job, as it already does for its container resources.
  • I ran make manifests and make bundle. The CRD change is additive only.
  • New unit tests in controllers/repo_manager/job_test.go. go test ./... passes, including the envtest suite.

Adds node_selector, tolerations and affinity to PulpJob, so admin_password_job,
migration_job and signing_job can place their Job pods like the other Pulp
components. commonJob() copies them into the pod spec. The update-content-checksums
Job follows migration_job, as it already does for its resources.

Ran `make manifests` and `make bundle` to update the CRDs.

closes pulp#1628

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from dkliban and ipanova October 5, 2026 10:59
@openshift-ci

openshift-ci Bot commented Oct 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@openshift-ci

openshift-ci Bot commented Oct 5, 2026

Copy link
Copy Markdown

Hi @fontaineajulien. Thanks for your PR.

I'm waiting for a pulp member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose nodeSelector configuration for operator-managed Jobs (migration, reset-admin-password, update-content-checksums)

1 participant