feat: add sparse checkout to git-sync containers#81395
Conversation
Most git-sync sidecars clone the full openshift/release repo (1.9 GB) but only read 1-2 subdirectories. This adds --sparse-checkout-file to limit the working tree to the paths each deployment actually needs, reducing disk usage and checkout time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Prucek The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughThis PR configures git-sync sparse checkout across app.ci deployments. New ConfigMaps (git-sync-sparse-checkout) define sparse-checkout path patterns in the ChangesGit-sync sparse checkout rollout
Estimated code review effort: 2 (Simple) | ~12 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
clusters/app.ci/release-controller/deploy-ocp-multi-priv-controller.yaml (1)
136-137: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUpdate
hack/generators/release-controllers/content/osd_rc_deployments.pyfor sparse-checkout wiring.
This generated block will drift unless the generator also emits the new--sparse-checkout-fileargs, mount, andsparse-checkoutvolume.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@clusters/app.ci/release-controller/deploy-ocp-multi-priv-controller.yaml` around lines 136 - 137, The generated release-controller deployment block is missing the new sparse-checkout wiring, so update osd_rc_deployments.py in the generator path to emit the same changes here: add the --sparse-checkout-file arguments, mount the sparse-checkout file into the container, and define the sparse-checkout volume so the generated YAML stays in sync. Use the osd_rc_deployments.py generator and the release-controller deployment resource names in the diff to locate the relevant template/output logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@clusters/app.ci/release-controller/deploy-ocp-multi-priv-controller.yaml`:
- Around line 136-137: The generated release-controller deployment block is
missing the new sparse-checkout wiring, so update osd_rc_deployments.py in the
generator path to emit the same changes here: add the --sparse-checkout-file
arguments, mount the sparse-checkout file into the container, and define the
sparse-checkout volume so the generated YAML stays in sync. Use the
osd_rc_deployments.py generator and the release-controller deployment resource
names in the diff to locate the relevant template/output logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 96b74589-0b81-457a-b060-2c01d1be7cd5
📒 Files selected for processing (33)
clusters/app.ci/assets/slack-bot.yamlclusters/app.ci/ci-chat-bot/ci-chat-bot.yamlclusters/app.ci/prow/03_deployment/crier.yamlclusters/app.ci/prow/03_deployment/deck.yamlclusters/app.ci/prow/03_deployment/gangway.yamlclusters/app.ci/prow/03_deployment/git-sync-sparse-checkout_configmap.yamlclusters/app.ci/prow/03_deployment/hook.yamlclusters/app.ci/prow/03_deployment/horologium.yamlclusters/app.ci/prow/03_deployment/multi-pr-prow-plugin.yamlclusters/app.ci/prow/03_deployment/needs_rebase.yamlclusters/app.ci/prow/03_deployment/payload-testing-prow-plugin.yamlclusters/app.ci/prow/03_deployment/pipeline-controller.yamlclusters/app.ci/prow/03_deployment/prow-controller-manager.yamlclusters/app.ci/prow/03_deployment/prowjob-dispatcher.yamlclusters/app.ci/prow/03_deployment/retester.yamlclusters/app.ci/prow/03_deployment/sinker.yamlclusters/app.ci/prow/03_deployment/statusreconciler.yamlclusters/app.ci/prow/03_deployment/tide.yamlclusters/app.ci/prow/03_deployment/tot.yamlclusters/app.ci/release-controller/deploy-ocp-arm64-controller.yamlclusters/app.ci/release-controller/deploy-ocp-arm64-priv-controller.yamlclusters/app.ci/release-controller/deploy-ocp-controller.yamlclusters/app.ci/release-controller/deploy-ocp-multi-controller.yamlclusters/app.ci/release-controller/deploy-ocp-multi-priv-controller.yamlclusters/app.ci/release-controller/deploy-ocp-ppc64le-controller.yamlclusters/app.ci/release-controller/deploy-ocp-ppc64le-priv-controller.yamlclusters/app.ci/release-controller/deploy-ocp-priv-controller.yamlclusters/app.ci/release-controller/deploy-ocp-s390x-controller.yamlclusters/app.ci/release-controller/deploy-ocp-s390x-priv-controller.yamlclusters/app.ci/release-controller/deploy-origin-controller.yamlclusters/app.ci/ship-status-dash/component-monitor/deployment.yamlclusters/app.ci/ship-status-dash/dashboard/deployment.yamlclusters/app.ci/ship-status-dash/git-sync-sparse-checkout_configmap.yaml
Summary
--sparse-checkout-fileto 31 git-sync sidecar deployments so each only checks out the subdirectories it actually readsgit-sync-sparse-checkoutinciandship-statusnamespaces) hold the sparse-checkout patterns per deployment group--release-repo-git-sync-pathSparse-checkout pattern groups
ci-operator/jobs/core-services/prow/02_config/ci-operator/jobs/+core-services/prow/02_config/ci-operator/config/ci-operator/jobs/+core-services/sanitize-prow-jobs/ci-operator/jobs/+core-services/pipeline-controller/core-services/ship-status/Test plan
--sparse-checkout-fileflag works with ConfigMap-mounted file🤖 Generated with Claude Code
Summary by CodeRabbit
This PR switches a large set of CI and release-controller deployments to use sparse checkout when syncing
openshift/release, so each component only pulls the subdirectories it needs instead of the full repository. It introduces a sharedgit-sync-sparse-checkoutConfigMap with per-component path patterns, then mounts that config into the affectedgit-syncinit and sidecar containers across Prow, release-controller, ship-status,ci-chat-bot, andslack-botdeployments.Practically, this should reduce sync time, bandwidth, and disk usage for OpenShift CI infrastructure while keeping the existing deployment layout intact.