Documentation
¶
Index ¶
- func Deployment(ctx context.Context, rclient client.Client, newDeploy *appsv1.Deployment, ...) error
- func HPA(ctx context.Context, rclient client.Client, targetHPA client.Object) error
- func HandleSTSUpdate(ctx context.Context, rclient client.Client, cr STSOptions, ...) error
- func PDB(ctx context.Context, rclient client.Client, pdb *policyv1.PodDisruptionBudget) error
- func PodIsFailedWithReason(pod corev1.Pod) (bool, string)
- func PodIsReady(pod corev1.Pod, minReadySeconds int32) bool
- func ServiceAccount(ctx context.Context, rclient client.Client, sa *v1.ServiceAccount) error
- func ServiceForCRD(ctx context.Context, rclient client.Client, newService *v1.Service) error
- func VMServiceScrapeForCRD(ctx context.Context, rclient client.Client, ...) error
- type STSOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deployment ¶
func Deployment(ctx context.Context, rclient client.Client, newDeploy *appsv1.Deployment, waitDeadline time.Duration) error
Deployment performs an update or create operator for deployment and waits until it's replicas is ready
func HandleSTSUpdate ¶
func HandleSTSUpdate(ctx context.Context, rclient client.Client, cr STSOptions, newSts *appsv1.StatefulSet, c *config.BaseOperatorConf) error
HandleSTSUpdate performs create and update operations for given statefulSet with STSOptions
func PodIsFailedWithReason ¶
PodIsFailedWithReason reports if pod failed and the reason of fail
func PodIsReady ¶
PodIsReady check is pod is ready
func ServiceAccount ¶
ServiceAccount creates service account or updates exist one
func ServiceForCRD ¶
ServiceForCRD - reconcile needed and actual state of service for given crd, it will recreate service if needed. NOTE it doesn't perform validation: in case of spec.type= LoadBalancer or NodePort, clusterIP: None is not allowed, its users responsibility to define it correctly.
func VMServiceScrapeForCRD ¶
func VMServiceScrapeForCRD(ctx context.Context, rclient client.Client, vss *victoriametricsv1beta1.VMServiceScrape) error
VMServiceScrapeForCRD creates or updates given object
Types ¶
type STSOptions ¶
type STSOptions struct { HasClaim bool SelectorLabels func() map[string]string VolumeName func() string UpdateStrategy func() appsv1.StatefulSetUpdateStrategyType HPA *victoriametricsv1beta1.EmbeddedHPA UpdateReplicaCount func(count *int32) }
STSOptions options for StatefulSet update HPA and UpdateReplicaCount optional