Skip to content

Commit

Permalink
feat(sync): sync to none cluster when object is fed hpa
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-lucky committed Nov 9, 2023
1 parent 070a686 commit 93cc36d
Show file tree
Hide file tree
Showing 12 changed files with 739 additions and 210 deletions.
2 changes: 1 addition & 1 deletion config/sample/host/01-ftc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ spec:
kind: HorizontalPodAutoscaler
pluralName: horizontalpodautoscalers
scope: Namespaced
version: v1
version: v2beta2
controllers:
- - kubeadmiral.io/federatedhpa-controller
- - kubeadmiral.io/global-scheduler
Expand Down
14 changes: 8 additions & 6 deletions pkg/controllers/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ const (
TemplateGeneratorMergePatchAnnotation = FederateControllerPrefix + "template-generator-merge-patch"

LatestReplicasetDigestsAnnotation = DefaultPrefix + "latest-replicaset-digests"

HPAScaleTargetRefPath = DefaultPrefix + "scale-target-ref-path"
)

// The following consts are labels key-values used by Kubeadmiral controllers.

const (
FedHPAEnableKey = DefaultPrefix + "fed-hpa-enabled"
)

// PropagatedAnnotationKeys and PropagatedLabelKeys are used to store the keys of annotations and labels that are present
Expand Down Expand Up @@ -190,9 +198,3 @@ var (
//
//nolint:lll
const MaxFederatedObjectNameLength = 253

// HPAScaleTargetRefPath defines the fed hpa annotations and labels
const (
HPAScaleTargetRefPath = DefaultPrefix + "scale-target-ref-path"
FedHPAEnableKey = DefaultPrefix + "fed-hpa-enabled"
)
Loading

0 comments on commit 93cc36d

Please sign in to comment.