Skip to content

Commit 0b319d9

Browse files
dilyevskyclaude
andcommitted
[mirror] use coordination.apoxy.dev for mirror lease heartbeat
Move the mirror lease from the built-in coordination.k8s.io API (which stays local to the edge cluster) to coordination.apoxy.dev so it routes through the apiservice proxy to the cloud apiserver. This allows the cloud-side GC controller to detect expired leases and clean up orphaned mirrored objects. - Change api/coordination/v1 group from coordination.k8s.io to coordination.apoxy.dev - Add +genclient marker and include in codegen/update.sh - Register coordination.apoxy.dev/v1 as an aggregated APIService - Add Lease to defaultResources() and scheme init() - Switch mirror controller from k8s coordination client to the generated versioned client (apoxyClient.CoordinationV1()) - Regenerate client, lister, and informer code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d7fb8d5 commit 0b319d9

File tree

29 files changed

+785
-105
lines changed

29 files changed

+785
-105
lines changed

api/coordination/v1/doc.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// +k8s:deepcopy-gen=package
1+
// +k8s:deepcopy-gen=package,register
22
// +k8s:openapi-gen=true
3+
// +groupName=coordination.apoxy.dev
34

4-
// Package v1 contains the coordination.k8s.io/v1 Lease API type for the Apoxy apiserver.
5+
// Package v1 contains the coordination.apoxy.dev/v1 Lease API type for the Apoxy apiserver.
56
package v1

api/coordination/v1/register.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

api/coordination/v1/types.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ import (
88
"sigs.k8s.io/apiserver-runtime/pkg/builder/resource"
99
)
1010

11+
// +genclient
1112
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
1213
// +k8s:openapi-gen=true
1314
// +kubebuilder:object:root=true
1415

15-
// Lease is a wrapper around the standard coordination.k8s.io/v1 Lease that
16-
// implements the apiserver-runtime resource.Object interface. It reuses the
17-
// upstream LeaseSpec so clients can use the standard coordination API.
16+
// Lease is a wrapper around the standard coordination/v1 LeaseSpec that
17+
// implements the apiserver-runtime resource.Object interface. Served under
18+
// the coordination.apoxy.dev group so edge clusters can route it through
19+
// the apiservice proxy to the cloud apiserver.
1820
type Lease struct {
1921
metav1.TypeMeta `json:",inline"`
2022
metav1.ObjectMeta `json:"metadata,omitempty"`

api/coordination/v1/zz_generated.deepcopy.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/coordination/v1/zz_generated.register.go

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/informers/coordination/interface.go

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/informers/coordination/v1/interface.go

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/informers/coordination/v1/lease.go

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/informers/factory.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)