Skip to content

Configuration Bundle#135

Merged
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
mjudeikis:bundle.poc
Jan 30, 2026
Merged

Configuration Bundle#135
kcp-ci-bot merged 1 commit intokcp-dev:mainfrom
mjudeikis:bundle.poc

Conversation

@mjudeikis
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

/retest

@mjudeikis
Copy link
Copy Markdown
Contributor Author

/joke

@mjudeikis mjudeikis force-pushed the bundle.poc branch 2 times, most recently from b0bd7a9 to ae00a0b Compare January 14, 2026 09:27
@mjudeikis
Copy link
Copy Markdown
Contributor Author

/test pull-kcp-operator-test-e2e-default

@mjudeikis
Copy link
Copy Markdown
Contributor Author

/test pull-kcp-operator-test-e2e-default
debugging in ci cluster. wot is happenign here....

@mjudeikis mjudeikis force-pushed the bundle.poc branch 3 times, most recently from 019ff78 to 160fd4f Compare January 20, 2026 10:28
@mjudeikis mjudeikis changed the title Configuration Bundle MVP Configuration Bundle Jan 20, 2026
@mjudeikis mjudeikis force-pushed the bundle.poc branch 2 times, most recently from 68fa1b5 to 2967875 Compare January 21, 2026 08:15
@mjudeikis
Copy link
Copy Markdown
Contributor Author

/retest


// GetBundleObjectsForRootShard returns the list of objects required for a RootShard bundle
// TODO(mjudeikis): These are not yet tested. Need to double check if its full list.
func GetBundleObjectsForRootShard(rootShard *operatorv1alpha1.RootShard) []operatorv1alpha1.BundleObject {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do these functions really need to be public?

@xrstf
Copy link
Copy Markdown
Contributor

xrstf commented Jan 23, 2026

review done

@mjudeikis mjudeikis force-pushed the bundle.poc branch 4 times, most recently from b1747a5 to a0063e7 Compare January 26, 2026 07:42
Add FeatureFlags
Add sub-dirs in /cmd for future extensions
Increate CI resources

Signed-off-by: Mangirdas Judeikis <mangirdas@judeikis.lt>
On-behalf-of: @SAP mangirdas.judeikis@sap.com
@mjudeikis
Copy link
Copy Markdown
Contributor Author

/test all

@xrstf xrstf closed this Jan 26, 2026
@xrstf xrstf reopened this Jan 26, 2026
@mjudeikis
Copy link
Copy Markdown
Contributor Author

green green?

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2026
@kcp-ci-bot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 925d0c1c1e94645159576a373bafd5bb89c3e3e5

@xrstf
Copy link
Copy Markdown
Contributor

xrstf commented Jan 30, 2026

/approve

@kcp-ci-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 30, 2026
@kcp-ci-bot kcp-ci-bot merged commit 6ca6327 into kcp-dev:main Jan 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. 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

3 participants