common

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentAffinity

func ComponentAffinity(ns string, labels map[string]string) *corev1.Affinity

Affinity: Affinity, Tolerations: Tolerations,

func ComponentEnv

func ComponentEnv(ctx *ClusterContext) []corev1.EnvVar

func ComponentTolerations

func ComponentTolerations() []corev1.Toleration

func DefaultDeployAnnotations

func DefaultDeployAnnotations() map[string]string

func DefaultRollingUpdateStrategy

func DefaultRollingUpdateStrategy() appsv1.DeploymentStrategy

func FillClusterContext

func FillClusterContext(ctx *ClusterContext, multiMgr *clustermanager.ClusterManager) error

func ObjectMeta

func ObjectMeta(name string, labels map[string]string, config runtime.Object) metav1.ObjectMeta

func ObjectMetaClusterScope

func ObjectMetaClusterScope(name string, labels map[string]string, config runtime.Object) metav1.ObjectMeta

func ObjectMetaWithAnnotations

func ObjectMetaWithAnnotations(name string, labels map[string]string, annotations map[string]string, config runtime.Object) metav1.ObjectMeta

func TargetAvgCpuUtil80

func TargetAvgCpuUtil80() []autoscalev2beta1.MetricSpec

Types

type ClusterContext

func (*ClusterContext) Clientset

func (c *ClusterContext) Clientset() (kubernetes.Interface, error)

func (*ClusterContext) ClientsetForBootstrap

func (c *ClusterContext) ClientsetForBootstrap() (kubernetes.Interface, error)

func (*ClusterContext) Host

func (c *ClusterContext) Host() (string, error)

func (*ClusterContext) HostForBootstrap

func (c *ClusterContext) HostForBootstrap() (string, error)

func (*ClusterContext) IPs

func (c *ClusterContext) IPs() []string

func (*ClusterContext) RESTConfig

func (c *ClusterContext) RESTConfig(config *rest.Config) (*rest.Config, error)

func (*ClusterContext) RESTConfigForBootstrap

func (c *ClusterContext) RESTConfigForBootstrap(config *rest.Config) (*rest.Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL