Skip to content

feat: implement multi-provider binding support for CRDs (#173)#594

Open
alokkumardalei-wq wants to merge 1 commit into
kbind-dev:mainfrom
alokkumardalei-wq:feature/issue-173
Open

feat: implement multi-provider binding support for CRDs (#173)#594
alokkumardalei-wq wants to merge 1 commit into
kbind-dev:mainfrom
alokkumardalei-wq:feature/issue-173

Conversation

@alokkumardalei-wq

@alokkumardalei-wq alokkumardalei-wq commented Jul 16, 2026

Copy link
Copy Markdown

Description:

This pull request addresses Issue #173 by adding support for multi-provider bindings in kube-bind. It enables a single consumer cluster to bind and manage Custom Resources from multiple provider clusters without conflict.

Changes made:

API Extensions:

  • Introduced ProviderID string in BindingResourceResponse (sdk/apis/kubebind/v1alpha2/bindingresponse_types.go).
  • Introduced ProviderID (string) and IsDefault (bool) in APIServiceBindingSpec (sdk/apis/kubebind/v1alpha2/apiservicebinding_types.go).
  • Updated CRD definitions via code generation.

Backend:

  • Updated HandleResources in manager.go to retrieve the provider cluster's kube-system namespace UID and set it as ProviderID.
  • Included ProviderID in the BindingResourceResponse payload handled by the HTTP server (handler.go).
  • Populated ProviderID in the BindingResourceResponse secret generated by the UI binding flow in bindableresourcesrequest_controller.go.

CLI Binding Flow:

  • Modified bind-apiservice plugin's createAPIServiceBindings function to map ProviderID and IsDefault into APIServiceBindingSpec.

Konnector Core Engine:

  • Updated servicebindingbundle_reconcile.go to inject the target kube-system UID into the generated APIServiceBinding spec upon reconciling provider connections.
  • Extended spec and status controllers (spec_controller.go and status_controller.go) in pkg/konnector/controllers/cluster/serviceexport/ to filter inbound syncing events. Controllers now only route resources that contain the provider.kube-bind.io/provider-id annotation matching their assigned ProviderID, or any resource if they hold the IsDefault flag.

Testing and Validation

  • Validation: Verified via local build (make build) that all integration logic compiles cleanly across both CLI and Backend components.
  • Testing: Ran make test locally to ensure no pre-existing component behaviors were negatively impacted. All changes cleanly integrate with existing dynamic resource syncing logic.

Fixes #173

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binding multiple provider with same CRD into one consumer cluster

1 participant