utils

package
v0.0.0-...-1ab0f97 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastAppliedConfigKey = "codis.k8s.io/last-applied-config"
)

Variables

View Source
var (
	ErrNoLastApplyConfig = errors.New("last apply config is not found!")
)

Functions

func DeploymentEqual

func DeploymentEqual(new, old *apps.Deployment) (bool, error)

func GetDashboardSvr

func GetDashboardSvr(cc *v1alpha1.CodisCluster) string

GetDashboardSvr returns CodisCluster's dashboard addr for example,sample-dashboard.codis-operator-system.svc.cluster.local

func GetOwnerRef

func GetOwnerRef(cc *v1alpha1.CodisCluster) metav1.OwnerReference

GetOwnerRef returns CodisCluster's OwnerReference

func GetStsLastAppliedConfig

func GetStsLastAppliedConfig(sts *apps.StatefulSet) (*apps.StatefulSetSpec, error)

func HPAEqual

func HPAEqual(new, old *as.HorizontalPodAutoscaler) (bool, error)

func ResourceRequirement

func ResourceRequirement(spec v1alpha1.ContainerSpec, isPvc bool) corev1.ResourceRequirements

func ServiceEqual

func ServiceEqual(new, old *corev1.Service) (bool, error)

func SetDeploymentLastAppliedConfig

func SetDeploymentLastAppliedConfig(deploy *apps.Deployment) error

func SetHPALastAppliedConfig

func SetHPALastAppliedConfig(hpa *as.HorizontalPodAutoscaler) error

func SetServiceLastAppliedConfig

func SetServiceLastAppliedConfig(svc *corev1.Service) error

func SetStsLastAppliedConfig

func SetStsLastAppliedConfig(sts *apps.StatefulSet) error

func StatefulSetEqual

func StatefulSetEqual(new *apps.StatefulSet, old *apps.StatefulSet) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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