package hpa

import "k8s.io/kubernetes/federation/pkg/federation-controller/util/hpa"

Index

Constants

const (
	// FederatedAnnotationOnHpaTargetObj as key, is used by hpa controller to
	// set selected cluster name list as annotation on the target object.
	FederatedAnnotationOnHpaTargetObj = "federation.kubernetes.io/hpa-target-cluster-list"
)

Functions

func SetHpaTargetClusterList

func SetHpaTargetClusterList(obj runtime.Object, clusterNames ClusterNames) runtime.Object

SetHpaTargetClusterList is used to set the list of clusters on the target object annotations.

Types

type ClusterNames

type ClusterNames struct {
	Names []string
}

ClusterNames stores the list of clusters represented by names as appearing on federation cluster objects. This is set by federation hpa and used by target objects federation controller to restrict that target object to only these clusters.

func GetHpaTargetClusterList

func GetHpaTargetClusterList(obj runtime.Object) (*ClusterNames, error)

GetHpaTargetClusterList is used to get the list of clusters from the target object annotations.

func (*ClusterNames) String

func (cn *ClusterNames) String() string

Source Files

hpa.go

Version
v1.8.0
Published
Sep 28, 2017
Platform
darwin/amd64
Imports
3 packages
Last checked
35 seconds ago

Tools for package owners.