Documentation
¶
Index ¶
- func AdditionalServices(ctx context.Context, rclient client.Client, defaultName, namespace string, ...) error
- func ConfigMap(ctx context.Context, rclient client.Client, cm *corev1.ConfigMap) error
- func Deployment(ctx context.Context, rclient client.Client, ...) error
- func HPA(ctx context.Context, rclient client.Client, ...) error
- func HandleSTSUpdate(ctx context.Context, rclient client.Client, cr STSOptions, ...) error
- func InitDeadlines(intervalCheck, appWaitDeadline, podReadyDeadline time.Duration)
- func PDB(ctx context.Context, rclient client.Client, pdb *policyv1.PodDisruptionBudget) error
- func PersistentVolumeClaim(ctx context.Context, rclient client.Client, pvc *corev1.PersistentVolumeClaim) error
- func PodIsReady(pod *corev1.Pod, minReadySeconds int32) bool
- func Role(ctx context.Context, rclient client.Client, rl *rbacv1.Role) error
- func RoleBinding(ctx context.Context, rclient client.Client, rb *rbacv1.RoleBinding) error
- func Secret(ctx context.Context, rclient client.Client, s *corev1.Secret) error
- func Service(ctx context.Context, rclient client.Client, ...) error
- func ServiceAccount(ctx context.Context, rclient client.Client, sa *corev1.ServiceAccount) error
- func VMServiceScrapeForCRD(ctx context.Context, rclient client.Client, vss *vmv1beta1.VMServiceScrape) error
- type STSOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdditionalServices ¶ added in v0.48.0
func AdditionalServices(ctx context.Context, rclient client.Client, defaultName, namespace string, prevSvc, currSvc *vmv1beta1.AdditionalServiceSpec) error
AdditionalServices reconcile AdditionalServices by conditionally removing service from previous state
func Deployment ¶
func Deployment(ctx context.Context, rclient client.Client, newDeploy, prevDeploy *appsv1.Deployment, hasHPA bool) 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, prevSts *appsv1.StatefulSet) error
HandleSTSUpdate performs create and update operations for given statefulSet with STSOptions
func InitDeadlines ¶ added in v0.48.0
InitFromConfig sets package configuration from config
func PersistentVolumeClaim ¶ added in v0.48.0
func PersistentVolumeClaim(ctx context.Context, rclient client.Client, pvc *corev1.PersistentVolumeClaim) error
PersistentVolumeClaim reconciles PVC object It updates only resource spec other fields are ignored Makes attempt to resize pvc if needed in case of deletion timestamp > 0 does nothing user must manually remove finalizer if needed
func PodIsReady ¶
PodIsReady check is pod is ready
func RoleBinding ¶ added in v0.48.0
RoleBinding reconciles rolebindg object
func Service ¶ added in v0.48.0
func Service(ctx context.Context, rclient client.Client, newService, prevService *corev1.Service) error
Service - 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 ServiceAccount ¶
ServiceAccount creates service account or updates exist one
func VMServiceScrapeForCRD ¶
func VMServiceScrapeForCRD(ctx context.Context, rclient client.Client, vss *vmv1beta1.VMServiceScrape) error
VMServiceScrapeForCRD creates or updates given object
Types ¶
type STSOptions ¶
type STSOptions struct { HasClaim bool SelectorLabels func() map[string]string HPA *vmv1beta1.EmbeddedHPA UpdateReplicaCount func(count *int32) }
STSOptions options for StatefulSet update HPA and UpdateReplicaCount optional