reconcile

package
v0.43.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

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, hasHPA bool) error

Deployment performs an update or create operator for deployment and waits until it's replicas is ready

func HPA

func HPA(ctx context.Context, rclient client.Client, targetHPA client.Object) error

HPA creates or update horizontalPodAutoscaler object

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 PDB

PDB creates or updates PodDisruptionBudget

func PodIsReady

func PodIsReady(pod *corev1.Pod, minReadySeconds int32) bool

PodIsReady check is pod is ready

func ServiceAccount

func ServiceAccount(ctx context.Context, rclient client.Client, sa *v1.ServiceAccount) error

ServiceAccount creates service account or updates exist one

func ServiceForCRD

func ServiceForCRD(ctx context.Context, rclient client.Client, newService *v1.Service) error

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

Jump to

Keyboard shortcuts

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