Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions engine/connection/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ func (r *Reconciler) heartbeat(ctx context.Context, providerClient client.Client
lease.Annotations = map[string]string{}
}
lease.Annotations[corev1alpha1.AnnotationConsumerClusterUID] = conn.Status.LocalClusterUID
lease.Annotations[corev1alpha1.AnnotationConnection] = conn.Name
lease.Spec.HolderIdentity = ptr.To(conn.Status.LocalClusterUID)
lease.Spec.LeaseDurationSeconds = ptr.To(int32(leaseDurationSeconds))
if lease.Spec.AcquireTime == nil {
Expand Down
7 changes: 4 additions & 3 deletions sdk/apis/core/v1alpha1/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ const (
// the provider.
LabelManaged = "core.kbind.io/managed"

// AnnotationConnection records, on a pulled consumer CRD, the name of the
// Connection whose provider it was pulled from. The sync engine uses it to
// pin the provider cluster for that API.
// AnnotationConnection records the name of the Connection.
// Used on pulled consumer CRD so that the sync engine can pin
// the provider cluster for that API. It's also used on Leases to maintain
// the link between consumer's Connection and provider's Lease.
AnnotationConnection = "core.kbind.io/connection"

// AnnotationConsumerClusterUID records the consumer cluster identity on a
Expand Down