reconciler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package reconciler provide runtime client function wrap

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPVCRetentionMark

func AddPVCRetentionMark(c client.Client, ctx context.Context, namespace string, labelSelector map[string]string) (err error)

AddPVCRetentionMark add deadline annottion to pvc

func ApplyConfigMap

func ApplyConfigMap(c client.Client, ctx context.Context, data *corev1.ConfigMap, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

ApplyConfigMap apply statefulset

func ApplyCronJob

func ApplyCronJob(c client.Client, ctx context.Context, data *batchv1.CronJob, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

ApplyCronJob apply conjob

func ApplyDeployment

func ApplyDeployment(c client.Client, ctx context.Context, data *appsv1.Deployment, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

func ApplySecret

func ApplySecret(c client.Client, ctx context.Context, data *corev1.Secret, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

ApplySecret apply secret

func ApplyService

func ApplyService(c client.Client, ctx context.Context, data *corev1.Service, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

ApplyService apply service

func ApplyStatefulSet

func ApplyStatefulSet(c client.Client, ctx context.Context, data *appsv1.StatefulSet, parentObject metav1.Object, scheme *runtime.Scheme) (err error)

ApplyStatefulSet apply statefulset

func BuildCRPVCLabels

func BuildCRPVCLabels(metaObj metav1.Object, obj runtime.Object) map[string]string

BuildCRPVCLabels generate CR subresource pvc labels

func CheckOwnerRefExists

func CheckOwnerRefExists(owner metav1.Object, refs []metav1.OwnerReference) (refExists bool)

CheckOwnerRefExists check onwer reference exists

func DeleteSubResource

func DeleteSubResource(c client.Client, ctx context.Context, cr metav1.Object, list ...client.ObjectList) (err error)

DeleteSubResource delete CR instance sub resources Notice: argument [ list ] will store data, so don't make reference to them for gc

func RemovePVCRetentionMark

func RemovePVCRetentionMark(c client.Client, ctx context.Context, namespace string, labelSelector map[string]string) (err error)

RemovePVCRetentionMark delete deadline annottion from pvc

Types

type PVCCleaner

type PVCCleaner struct {
}

func (*PVCCleaner) Create

Create is called in response to an create event - e.g. Pod Creation.

func (*PVCCleaner) Delete

Delete is called in response to a delete event - e.g. Pod Deleted.

func (*PVCCleaner) Generic

Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or external trigger request - e.g. reconcile Autoscaling, or a Webhook.

func (*PVCCleaner) Update

Update is called in response to an update event - e.g. Pod Updated.

Jump to

Keyboard shortcuts

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