Documentation
¶
Index ¶
- Variables
- func BuildHandlerChain(handler http.Handler, authn authenticator.Request, authz authorizer.Authorizer) http.Handler
- func CreateLeaderElectionConfig(name string, k8sClient kubernetes.Interface, ...) (*leaderelection.LeaderElectionConfig, error)
- func GetInstanceType(labels map[string]string) (string, bool)
- func GetOperatingSystem(labels map[string]string) (string, bool)
- func GetRegion(labels map[string]string) (string, bool)
- func GetZone(labels map[string]string) (string, bool)
- func NewBaseHandler(name string, debugging componentconfig.DebuggingConfiguration, ...) *mux.PathRecorderMux
- func NewK8sConfig(c componentconfig.ClientConnectionConfiguration, maxIdleConnsPerHost int) (*rest.Config, error)
- func NodesResourceTotal(nodes []*v1.Node, filter NodeFilterFunc, reverse bool) v1.ResourceList
- func PodsRequestsAndLimitsTotal(pods []*v1.Pod, filter PodFilterFunc, reverse bool) (v1.ResourceList, v1.ResourceList)
- func PodsSpecRequestsAndLimitsTotal(specs []spec.CloudPodSpec) (v1.ResourceList, v1.ResourceList)
- type ClientCreator
- type EventRecorderSet
- type NodeFilterFunc
- type PodFilterFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. // NOTE: If you are copying this file to start a new api group, STOP! Copy the // extensions group instead. This Scheme is special and should appear ONLY in // the api group, unless you really know what you're doing. // TODO(lavalamp): make the above error impossible. Scheme = runtime.NewScheme() // Codecs provides access to encoding and decoding for the scheme Codecs = serializer.NewCodecFactory(Scheme) )
Functions ¶
func BuildHandlerChain ¶
func BuildHandlerChain(handler http.Handler, authn authenticator.Request, authz authorizer.Authorizer) http.Handler
BuildHandlerChain wraps the given handler with the standard filters.
func CreateLeaderElectionConfig ¶
func CreateLeaderElectionConfig( name string, k8sClient kubernetes.Interface, eventRecorder events.EventRecorder, LeaderElection componentconfig.LeaderElectionConfiguration) (*leaderelection.LeaderElectionConfig, error)
CreateLeaderElectionConfig creates a LeaderElectionConfig.
func NewBaseHandler ¶
func NewBaseHandler( name string, debugging componentconfig.DebuggingConfiguration, checks ...healthz.HealthChecker) *mux.PathRecorderMux
NewBaseHandler creates healthz and metrics handlers.
func NewK8sConfig ¶
func NewK8sConfig(c componentconfig.ClientConnectionConfiguration, maxIdleConnsPerHost int) (*rest.Config, error)
NewK8sConfig creates a cluster config of kubernetes.
func NodesResourceTotal ¶ added in v0.3.0
func NodesResourceTotal(nodes []*v1.Node, filter NodeFilterFunc, reverse bool) v1.ResourceList
func PodsRequestsAndLimitsTotal ¶ added in v0.3.0
func PodsRequestsAndLimitsTotal(pods []*v1.Pod, filter PodFilterFunc, reverse bool) (v1.ResourceList, v1.ResourceList)
func PodsSpecRequestsAndLimitsTotal ¶ added in v0.3.0
func PodsSpecRequestsAndLimitsTotal(specs []spec.CloudPodSpec) (v1.ResourceList, v1.ResourceList)
Types ¶
type ClientCreator ¶
type ClientCreator func(name string) kubernetes.Interface
func CreateK8sClient ¶
func CreateK8sClient(c componentconfig.ClientConnectionConfiguration, maxIdleConnsPerHost int) (ClientCreator, error)
CreateK8sClient creates the k8s build in core client and custom client.
type EventRecorderSet ¶
type EventRecorderSet struct {
// contains filtered or unexported fields
}
ClientSet is a set of k8s EventRecorder.
func NewEventRecorderSet ¶
func NewEventRecorderSet(name string, num int, creator events.EventBroadcasterAdapter) *EventRecorderSet
NewEventRecorderSet creates a EventRecorderSet.
type NodeFilterFunc ¶ added in v0.3.0
type PodFilterFunc ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.