Skip to content

Commit

Permalink
Move feature annotations under the api repository (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
berkayoz authored Oct 16, 2024
1 parent a618417 commit 139b187
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
19 changes: 19 additions & 0 deletions api/v1/annotations/calico/annotations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package calico

const (
AnnotationAPIServerEnabled = "k8sd/v1alpha1/calico/apiserver-enabled"
AnnotationEncapsulationV4 = "k8sd/v1alpha1/calico/encapsulation-v4"
AnnotationEncapsulationV6 = "k8sd/v1alpha1/calico/encapsulation-v6"
AnnotationAutodetectionV4FirstFound = "k8sd/v1alpha1/calico/autodetection-v4/firstFound"
AnnotationAutodetectionV4Kubernetes = "k8sd/v1alpha1/calico/autodetection-v4/kubernetes"
AnnotationAutodetectionV4Interface = "k8sd/v1alpha1/calico/autodetection-v4/interface"
AnnotationAutodetectionV4SkipInterface = "k8sd/v1alpha1/calico/autodetection-v4/skipInterface"
AnnotationAutodetectionV4CanReach = "k8sd/v1alpha1/calico/autodetection-v4/canReach"
AnnotationAutodetectionV4CIDRs = "k8sd/v1alpha1/calico/autodetection-v4/cidrs"
AnnotationAutodetectionV6FirstFound = "k8sd/v1alpha1/calico/autodetection-v6/firstFound"
AnnotationAutodetectionV6Kubernetes = "k8sd/v1alpha1/calico/autodetection-v6/kubernetes"
AnnotationAutodetectionV6Interface = "k8sd/v1alpha1/calico/autodetection-v6/interface"
AnnotationAutodetectionV6SkipInterface = "k8sd/v1alpha1/calico/autodetection-v6/skipInterface"
AnnotationAutodetectionV6CanReach = "k8sd/v1alpha1/calico/autodetection-v6/canReach"
AnnotationAutodetectionV6CIDRs = "k8sd/v1alpha1/calico/autodetection-v6/cidrs"
)
11 changes: 11 additions & 0 deletions api/v1/annotations/cilium/annotations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package cilium

const (
// List of devices facing cluster/external network (used for BPF NodePort, BPF masquerading and host firewall); supports '+' as wildcard in device name, e.g. 'eth+'
// e.g. k8sd/v1alpha1/cilium/devices="eth+ lxdbr+"
AnnotationDevices = "k8sd/v1alpha1/cilium/devices"

// Device name used to connect nodes in direct routing mode (used by BPF NodePort, BPF host routing; if empty, automatically set to a device with k8s InternalIP/ExternalIP or with a default route
// bridge type devices are ingored in automatic selection
AnnotationDirectRoutingDevice = "k8sd/v1alpha1/cilium/direct-routing-device"
)
13 changes: 13 additions & 0 deletions api/v1/annotations/lifecycle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package annotations

const (
// AnnotationSkipCleanupKubernetesNodeOnRemove if set, only the microcluster & file cleanup is done.
// This is useful, if an external controller (e.g. CAPI) is responsible for the Kubernetes node life cycle.
// By default, the Kubernetes node is removed by k8sd if a node is removed from the cluster.
AnnotationSkipCleanupKubernetesNodeOnRemove = "k8sd/v1alpha/lifecycle/skip-cleanup-kubernetes-node-on-remove"

// AnnotationSkipStopServicesOnRemove if set, the k8s services will not be stopped on the leaving node when removing the node.
// This is useful, if an external controller (e.g. CAPI) is responsible for the Kubernetes node life cycle.
// By default, all services are stopped on leaving nodes.
AnnotationSkipStopServicesOnRemove = "k8sd/v1alpha/lifecycle/skip-stop-services-on-remove"
)
6 changes: 6 additions & 0 deletions api/v1/annotations/metrics-server/annotations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package metrics_server

const (
AnnotationImageRepo = "k8sd/v1alpha1/metrics-server/image-repo"
AnnotationImageTag = "k8sd/v1alpha1/metrics-server/image-tag"
)
4 changes: 4 additions & 0 deletions api/v1/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ const (
// AnnotationSkipCleanupKubernetesNodeOnRemove if set, only the microcluster & file cleanup is done.
// This is useful, if an external controller (e.g. CAPI) is responsible for the Kubernetes node life cycle.
// By default, the Kubernetes node is removed by k8sd if a node is removed from the cluster.
//
// Deprecated: Use the respective annotation from annotations package instead.
AnnotationSkipCleanupKubernetesNodeOnRemove = "k8sd/v1alpha/lifecycle/skip-cleanup-kubernetes-node-on-remove"

// AnnotationSkipStopServicesOnRemove if set, the k8s services will not be stopped on the leaving node when removing the node.
// This is useful, if an external controller (e.g. CAPI) is responsible for the Kubernetes node life cycle.
// By default, all services are stopped on leaving nodes.
//
// Deprecated: Use the respective annotation from annotations package instead.
AnnotationSkipStopServicesOnRemove = "k8sd/v1alpha/lifecycle/skip-stop-services-on-remove"
)

0 comments on commit 139b187

Please sign in to comment.