Skip to content

Commit d9ee090

Browse files
committed
adress reviews
1 parent 6a4b199 commit d9ee090

5 files changed

Lines changed: 22 additions & 14 deletions

File tree

docs/proposals/v2-extended.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Status: **DRAFT — for iteration**
44
* Authors: @mjudeikis
55
* Date: 2026-06-10
6-
* Builds on: [v2-slim-core.md](v2-slim-core.md) (Proposed))
6+
* Builds on: [v2-slim-core.md](v2-slim-core.md) (Proposed)
77

88
## Summary
99

v2/konnector/deploy/charts/konnector/files/crds/core.kube-bind.io_connections.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,17 @@ spec:
238238
connect and immutable thereafter.
239239
type: string
240240
x-kubernetes-validations:
241-
- message: localClusterUID is immutable
242-
rule: self == oldSelf
241+
- message: localClusterUID is immutable once set
242+
rule: oldSelf == '' || self == oldSelf
243243
remoteClusterUID:
244244
description: |-
245245
remoteClusterUID is the identity of the provider cluster, pinned on first
246246
connect and immutable thereafter. A Secret later pointing at a different
247247
cluster is rejected rather than silently re-homing synced objects.
248248
type: string
249249
x-kubernetes-validations:
250-
- message: remoteClusterUID is immutable
251-
rule: self == oldSelf
250+
- message: remoteClusterUID is immutable once set
251+
rule: oldSelf == '' || self == oldSelf
252252
type: object
253253
required:
254254
- spec

v2/konnector/engine/binding/reconciler.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ func (b *base) reconcileAccessor(ctx context.Context, obj corev1alpha1.BindingAc
9898
}
9999

100100
var (
101-
boundAPIs []corev1alpha1.BoundAPI
102-
notExported []string
101+
boundAPIs []corev1alpha1.BoundAPI
102+
notExported []string
103+
pendingSchema []string
103104
)
104105
for _, api := range spec.APIs {
105106
exported, ok := conn.Status.ExportsAPI(api.Name)
@@ -114,7 +115,9 @@ func (b *base) reconcileAccessor(ctx context.Context, obj corev1alpha1.BindingAc
114115
crd := &apiextensionsv1.CustomResourceDefinition{}
115116
if err := b.client.Get(ctx, client.ObjectKey{Name: api.Name}, crd); err != nil {
116117
if apierrors.IsNotFound(err) {
117-
notExported = append(notExported, api.Name)
118+
// The API is exported, but the Connection has not installed the
119+
// synthesized CRD yet — a transient wait, not "not exported".
120+
pendingSchema = append(pendingSchema, api.Name)
118121
continue
119122
}
120123
return fmt.Errorf("getting synthesized CRD %q: %w", api.Name, err)
@@ -151,6 +154,11 @@ func (b *base) reconcileAccessor(ctx context.Context, obj corev1alpha1.BindingAc
151154
fmt.Sprintf("APIs not exported by the provider yet: %s", strings.Join(notExported, ", ")))
152155
return nil
153156
}
157+
if len(pendingSchema) > 0 {
158+
setReady(status, obj, metav1.ConditionFalse, corev1alpha1.ReasonPending,
159+
fmt.Sprintf("waiting for the Connection to install the synthesized CRD(s): %s", strings.Join(pendingSchema, ", ")))
160+
return nil
161+
}
154162

155163
// Sync related Secrets/ConfigMaps in the declared direction, scoped like the
156164
// binding.

v2/sdk/apis/core/v1alpha1/connection_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ type ConnectionStatus struct {
134134
// cluster is rejected rather than silently re-homing synced objects.
135135
//
136136
// +optional
137-
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="remoteClusterUID is immutable"
137+
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="remoteClusterUID is immutable once set"
138138
RemoteClusterUID string `json:"remoteClusterUID,omitempty"`
139139

140140
// localClusterUID is the identity of the consumer cluster, pinned on first
141141
// connect and immutable thereafter.
142142
//
143143
// +optional
144-
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="localClusterUID is immutable"
144+
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="localClusterUID is immutable once set"
145145
LocalClusterUID string `json:"localClusterUID,omitempty"`
146146

147147
// activeSchemaSource is the schema source actually in effect after resolving

v2/sdk/config/crd/core.kube-bind.io_connections.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,17 @@ spec:
238238
connect and immutable thereafter.
239239
type: string
240240
x-kubernetes-validations:
241-
- message: localClusterUID is immutable
242-
rule: self == oldSelf
241+
- message: localClusterUID is immutable once set
242+
rule: oldSelf == '' || self == oldSelf
243243
remoteClusterUID:
244244
description: |-
245245
remoteClusterUID is the identity of the provider cluster, pinned on first
246246
connect and immutable thereafter. A Secret later pointing at a different
247247
cluster is rejected rather than silently re-homing synced objects.
248248
type: string
249249
x-kubernetes-validations:
250-
- message: remoteClusterUID is immutable
251-
rule: self == oldSelf
250+
- message: remoteClusterUID is immutable once set
251+
rule: oldSelf == '' || self == oldSelf
252252
type: object
253253
required:
254254
- spec

0 commit comments

Comments
 (0)