From 3990f2c1e409a486bbf04ae611186d891b1821bc Mon Sep 17 00:00:00 2001 From: Mangirdas Judeikis Date: Thu, 27 Nov 2025 16:40:46 +0200 Subject: [PATCH 1/4] Pre 0.6.0 release fixes --- deploy/charts/backend/Chart.yaml | 2 +- docs/content/setup/helm.md | 3 +- docs/content/usage/.pages | 1 + docs/content/usage/index.md | 3 +- docs/content/usage/integrations/.pages | 2 + .../usage/integrations/cert-manager.md | 103 ++++++++++++ .../claimedresources_controller.go | 1 + pkg/resources/resources.go | 15 +- pkg/resources/resources_test.go | 148 ++++++++++++++++++ 9 files changed, 271 insertions(+), 7 deletions(-) create mode 100644 docs/content/usage/integrations/.pages create mode 100644 docs/content/usage/integrations/cert-manager.md diff --git a/deploy/charts/backend/Chart.yaml b/deploy/charts/backend/Chart.yaml index 4cbde61ba..80657f8fa 100644 --- a/deploy/charts/backend/Chart.yaml +++ b/deploy/charts/backend/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.5.1" +appVersion: "v0.6.0" diff --git a/docs/content/setup/helm.md b/docs/content/setup/helm.md index e26ab2122..b91d36649 100644 --- a/docs/content/setup/helm.md +++ b/docs/content/setup/helm.md @@ -64,8 +64,7 @@ helm upgrade \ --set 'gatewayApi.route.hostnames[0]=kube-bind.example.com' \ --set gatewayApi.route.path=/ \ --set gatewayApi.route.pathType=PathPrefix \ - --set image.tag=${VERSION} \ - kube-bind \ + --set image.tag=v${VERSION} \ kube-bind oci://ghcr.io/kube-bind/charts/backend --version ${VERSION} ``` diff --git a/docs/content/usage/.pages b/docs/content/usage/.pages index 0432813a3..60fed3eb5 100644 --- a/docs/content/usage/.pages +++ b/docs/content/usage/.pages @@ -2,3 +2,4 @@ nav: - index.md - api-concepts.md - synchronization.md + - integrations \ No newline at end of file diff --git a/docs/content/usage/index.md b/docs/content/usage/index.md index 067456399..822627891 100644 --- a/docs/content/usage/index.md +++ b/docs/content/usage/index.md @@ -88,8 +88,7 @@ If you're new to kube-bind: 1. **Start with the [Quickstart Guide](../setup/quickstart.md)** for a hands-on introduction 2. **Review [API Concepts](api-concepts.md)** to understand the fundamental types -3. **Explore [Template References](template-references.md)** for advanced use cases -4. **Check the [Reference Documentation](../reference/)** for complete API specifications +3. **Check the [Reference Documentation](../reference/)** for complete API specifications The konnector agents establish a secure, authenticated connection that allows: diff --git a/docs/content/usage/integrations/.pages b/docs/content/usage/integrations/.pages new file mode 100644 index 000000000..c695c2b86 --- /dev/null +++ b/docs/content/usage/integrations/.pages @@ -0,0 +1,2 @@ +nav: + - cert-manager.md \ No newline at end of file diff --git a/docs/content/usage/integrations/cert-manager.md b/docs/content/usage/integrations/cert-manager.md new file mode 100644 index 000000000..7eabff506 --- /dev/null +++ b/docs/content/usage/integrations/cert-manager.md @@ -0,0 +1,103 @@ +--- +title: Cert-Manager Integration +description: | + Guide on integrating kube-bind with cert-manager for automated TLS certificate management. +weight: 10 +--- + +# Cert-Manager Integration + +1. **Install cert-manager** in your Kubernetes cluster, where kube-bind backend is running, if you haven't already. You can follow the official installation guide [here](https://cert-manager.io/docs/installation/kubernetes/). + + +2. **Create a `kube-bind` template for `Certificate` resources** to allow service consumers to request TLS certificates. Below is an example template: + +```yaml +kubectl apply -f - < Date: Thu, 27 Nov 2025 16:56:46 +0200 Subject: [PATCH 2/4] revert fake fix --- .../cluster/serviceexport/status/status_controller.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/konnector/controllers/cluster/serviceexport/status/status_controller.go b/pkg/konnector/controllers/cluster/serviceexport/status/status_controller.go index ae32ad3ee..8bc96badc 100644 --- a/pkg/konnector/controllers/cluster/serviceexport/status/status_controller.go +++ b/pkg/konnector/controllers/cluster/serviceexport/status/status_controller.go @@ -185,7 +185,7 @@ func (c *controller) enqueueProvider(logger klog.Logger, obj any) { // Try to map the provider name back to the consumer name, // but only to check if we "own" the object; we will actually // enqueue the provider key after all. - consumerKey, err := c.reconciler.isolationStrategy.ToConsumerKey(types.NamespacedName{ + consumerKey, err := c.isolationStrategy.ToConsumerKey(types.NamespacedName{ Namespace: ns, Name: name, }) @@ -216,7 +216,7 @@ func (c *controller) enqueueConsumer(logger klog.Logger, obj any) { return } - providerKey, err := c.reconciler.isolationStrategy.ToProviderKey(types.NamespacedName{ + providerKey, err := c.isolationStrategy.ToProviderKey(types.NamespacedName{ Namespace: ns, Name: name, }) @@ -250,7 +250,10 @@ func (c *controller) enqueueServiceNamespace(logger klog.Logger, obj any) { return // not for us } - strategy := c.reconciler.isolationStrategy.(*isolation.ServiceNamespacedStrategy) + strategy, ok := c.isolationStrategy.(*isolation.ServiceNamespacedStrategy) + if !ok { // should not happen... but... + return + } nsOnProviderCluster, err := strategy.ProviderNamespace(name) if err != nil { runtime.HandleError(err) @@ -289,7 +292,7 @@ func (c *controller) Start(ctx context.Context, numThreads int) { // APIServiceNamespaces are only of interest when syncing namespaced // objects, and since these event handlers need the appropriate isolation // strategy, we only start them when necessary. - if _, ok := c.reconciler.isolationStrategy.(*isolation.ServiceNamespacedStrategy); ok { + if _, ok := c.isolationStrategy.(*isolation.ServiceNamespacedStrategy); ok { c.serviceNamespaceInformer.Informer().AddDynamicEventHandler(ctx, controllerName, cache.ResourceEventHandlerFuncs{ AddFunc: func(obj any) { c.enqueueServiceNamespace(logger, obj) From 837e07ccb4eeb245af86b8af33d927cdfd901680 Mon Sep 17 00:00:00 2001 From: Mangirdas Judeikis Date: Thu, 27 Nov 2025 17:07:52 +0200 Subject: [PATCH 3/4] nits --- docs/content/usage/integrations/cert-manager.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/usage/integrations/cert-manager.md b/docs/content/usage/integrations/cert-manager.md index 7eabff506..0f59e84a0 100644 --- a/docs/content/usage/integrations/cert-manager.md +++ b/docs/content/usage/integrations/cert-manager.md @@ -1,5 +1,5 @@ --- -title: Cert-Manager Integration +title: Cert-Manager description: | Guide on integrating kube-bind with cert-manager for automated TLS certificate management. weight: 10 @@ -71,8 +71,8 @@ Resources bound successfully! 5. **Create a `Certificate` resource** in your consumer cluster. The cert-manager in the provider cluster will handle the issuance and management of the TLS certificate. -!!! note: - `my-selfsigned-issuer` must be present in the provider cluster for this example to work. +!!! note + my-selfsigned-issuer must be present in the provider cluster for this example to work. ```yaml kubectl apply -f - < Date: Thu, 27 Nov 2025 17:18:41 +0200 Subject: [PATCH 4/4] nit --- pkg/resources/resources.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go index beaf9a97b..3180d9158 100644 --- a/pkg/resources/resources.go +++ b/pkg/resources/resources.go @@ -218,11 +218,7 @@ func IsClaimedWithReference( } logger.V(4).Info("listing objects for reference claim", "gvr", gvr) - objs, err := consumerClient.Resource(schema.GroupVersionResource{ - Group: ref.Group, - Resource: ref.Resource, - Version: version, - }).List(ctx, metav1.ListOptions{}) + objs, err := consumerClient.Resource(gvr).List(ctx, metav1.ListOptions{}) if err != nil { logger.Error(err, "failed to list objects for reference claim. Invalidating all claim.", "group", ref.Group, "resource", ref.Resource, "version", version) return false