Skip to content

Conversation

@mjudeikis
Copy link
Contributor

Summary

Introduces a complete Bundle resource system for kcp-operator enabling export of RootShard, Shard, and FrontProxy configurations as bundles. Bundles encapsulate all necessary resources (secrets, deployments, services), allowing deployment outside the operator-managed cluster.

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes kcp-dev/kcp#3715

Changes Made

Core Bundle System

  • Bundle CRD: New CustomResourceDefinition for Bundle resource (v1alpha1) with status tracking for object states and phases (Provisioning, Ready, Deleting)
  • Bundle Controller: Reconciles Bundle objects, collecting specified resources and managing their lifecycle

Integration with Existing Controllers

  • RootShard, Shard, FrontProxy Controllers:
    • Detect operator.kcp.io/bundle annotation to trigger Bundle creation
    • Scale deployments to 0 locally when bundled (resources exported instead)
    • Track bundle status as conditions in object status
    • Add new "Bundled" phase to component lifecycle
    • Support for bundle-aware status conditions

Helper Functions and Utilities

  • Bundle Helpers (internal/controller/bundle/helpers.go):
    • EnsureBundleForOwner(): Creates Bundle objects when annotation present
    • GetBundleReadyCondition(): Returns bundle readiness condition
    • Constructs appropriate BundleTarget based on owner type

Certificate and Deployment Updates

  • Proper label propagation to generated secrets from cert-manager
  • Label copying to avoid mutation of shared label maps
  • Deployment scaling logic: stores desired replicas in annotation, scales to 0 when bundled
  • Support for both root-shard and component-level bundle annotations

Build System Improvements

  • Makefile: Added ARCH, TARGETOS, TOOLS_DIR variables for cross-platform builds
  • New docker-buildx target for multi-architecture builds (linux/amd64, linux/arm64) for local dev (arm to amd)
  • Updated docker-build target to use TARGETOS/ARCH for platform-specific builds
  • Build path reorganisation: operator code now in cmd/operator/ subdirectory to open space for other entrypoints in the future.

Generated Code

  • Updated Apply configurations for Bundle resource
  • Enhanced register.go with GroupVersionKind constants for all resource types
  • Auto-generated deepcopy and client utilities for new Bundle type

Release Notes

Adds Bundle resource for exporting kcp-operator components (RootShard, Shard, FrontProxy) for deployment outside operator-managed clusters. Bundles capture all necessary configuration as sealed resources.

@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 13, 2026
@mjudeikis mjudeikis changed the title Bundle.poc Configuration Bundle MVP Jan 13, 2026
@mjudeikis mjudeikis marked this pull request as draft January 13, 2026 16:24
@kcp-ci-bot kcp-ci-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2026
@mjudeikis
Copy link
Contributor Author

/rest all

@mjudeikis mjudeikis marked this pull request as ready for review January 14, 2026 08:57
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2026
@mjudeikis
Copy link
Contributor Author

/retest

@mjudeikis
Copy link
Contributor Author

/joke

Signed-off-by: Mangirdas Judeikis <[email protected]>
On-behalf-of: @SAP [email protected]
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@kcp-ci-bot
Copy link
Contributor

@mjudeikis: 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
pull-kcp-operator-test-e2e-canary 0c77d34 link false /test pull-kcp-operator-test-e2e-canary
pull-kcp-operator-test-e2e-0.28 0c77d34 link true /test pull-kcp-operator-test-e2e-0.28
pull-kcp-operator-test-e2e-default 0c77d34 link true /test pull-kcp-operator-test-e2e-default

Full PR test history

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

dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: Implement kcp-operator multi-region mode

2 participants