Documentation ¶
Index ¶
- Constants
- func CheckResourceRevision(obj runtime.Object, revisionConstraint string) (bool, error)
- func DetachPodsFromStatefulset(c client.Client, statefulset *appsv1.StatefulSet, log logr.Logger, ...) error
- func GetResourceRevision(obj runtime.Object) (string, error)
- func GetWatchPredicateForOwnedResources(owner runtime.Object, isController bool, scheme *runtime.Scheme, ...) predicate.Funcs
- func GetWatchPredicateForPinot() predicate.Funcs
- func GetWatchPredicateForPinotService(name string) predicate.Funcs
- func GetWatchPredicateForPinotServicePods() predicate.Funcs
- func GetWatchPredicateForTenant() predicate.Funcs
- func IsObjectChanged(oldObj, newObj runtime.Object, ignoreStatusChange bool) (bool, error)
- func NewCachedRESTMapper(config *rest.Config) (meta.RESTMapper, error)
- func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtime.Object, ...) error
- func ReconcileNamespaceLabelsIgnoreNotFound(log logr.Logger, client runtimeClient.Client, namespace string, ...) error
- func SetOwnerReferenceToObject(obj runtime.Object, owner runtime.Object) ([]metav1.OwnerReference, error)
- func SetResourceRevision(obj runtime.Object, revision string) error
- type Cached
- func (c *Cached) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func (c *Cached) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
- func (c *Cached) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
- func (c *Cached) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
- func (c *Cached) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
- func (c *Cached) ResourceSingularizer(resource string) (singular string, err error)
- func (c *Cached) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
- type DesiredState
- type OwnerReferenceMatcher
- type RecreateAwareStatefulsetDesiredState
- func (r RecreateAwareStatefulsetDesiredState) AfterRecreate(current, desired runtime.Object) error
- func (r RecreateAwareStatefulsetDesiredState) AfterUpdate(current, desired runtime.Object, inSync bool) error
- func (r RecreateAwareStatefulsetDesiredState) BeforeRecreate(current, desired runtime.Object) error
- type StaticDesiredState
- func (s StaticDesiredState) AfterCreate(_ runtime.Object) error
- func (s StaticDesiredState) AfterDelete(_ runtime.Object) error
- func (s StaticDesiredState) AfterRecreate(_, _ runtime.Object) error
- func (s StaticDesiredState) AfterUpdate(_, _ runtime.Object, _ bool) error
- func (s StaticDesiredState) BeforeCreate(_ runtime.Object) error
- func (s StaticDesiredState) BeforeDelete(_ runtime.Object) error
- func (s StaticDesiredState) BeforeRecreate(_, _ runtime.Object) error
- func (s StaticDesiredState) BeforeUpdate(_, _ runtime.Object) error
- func (s StaticDesiredState) ShouldCreate(_ runtime.Object) (bool, error)
- func (s StaticDesiredState) ShouldDelete(_ runtime.Object) (bool, error)
- func (s StaticDesiredState) ShouldRecreate(_, _ runtime.Object) (bool, error)
- func (s StaticDesiredState) ShouldUpdate(_, _ runtime.Object) (bool, error)
Constants ¶
const (
ResourceRevisionLabel = "resource.alpha.apache.io/revision"
)
Variables ¶
This section is empty.
Functions ¶
func CheckResourceRevision ¶
func DetachPodsFromStatefulset ¶
func DetachPodsFromStatefulset(c client.Client, statefulset *appsv1.StatefulSet, log logr.Logger, additionalLabels ...map[string]string) error
DetachPodsFromStatefulset .
func GetWatchPredicateForTenant ¶ added in v0.0.2
func IsObjectChanged ¶
IsObjectChanged checks whether there is an actual difference between the two objects
func NewCachedRESTMapper ¶
func NewCachedRESTMapper(config *rest.Config) (meta.RESTMapper, error)
NewCachedRESTMapper .
func Reconcile ¶
func Reconcile(log logr.Logger, client runtimeClient.Client, desired runtime.Object, desiredState DesiredState) error
Reconcile .
func ReconcileNamespaceLabelsIgnoreNotFound ¶
func ReconcileNamespaceLabelsIgnoreNotFound(log logr.Logger, client runtimeClient.Client, namespace string, labels map[string]string, labelsToRemove []string, customLabelsToIgnoreReconcile ...string) error
ReconcileNamespaceLabelsIgnoreNotFound patches namespaces by adding/removing labels, returns without error if namespace is not found
Types ¶
type Cached ¶
Cached .
func (*Cached) KindFor ¶
func (c *Cached) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
KindFor .
func (*Cached) KindsFor ¶
func (c *Cached) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
KindsFor .
func (*Cached) RESTMapping ¶
RESTMapping .
func (*Cached) RESTMappings ¶
RESTMappings .
func (*Cached) ResourceFor ¶
func (c *Cached) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
ResourceFor .
func (*Cached) ResourceSingularizer ¶
ResourceSingularizer .
func (*Cached) ResourcesFor ¶
func (c *Cached) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
ResourcesFor .
type DesiredState ¶
type DesiredState interface { AfterRecreate(current, desired runtime.Object) error BeforeRecreate(current, desired runtime.Object) error ShouldRecreate(current, desired runtime.Object) (bool, error) AfterCreate(desired runtime.Object) error BeforeCreate(desired runtime.Object) error ShouldCreate(desired runtime.Object) (bool, error) AfterUpdate(current, desired runtime.Object, inSync bool) error BeforeUpdate(current, desired runtime.Object) error ShouldUpdate(current, desired runtime.Object) (bool, error) AfterDelete(current runtime.Object) error BeforeDelete(current runtime.Object) error ShouldDelete(current runtime.Object) (bool, error) }
DesiredState .
type OwnerReferenceMatcher ¶
type OwnerReferenceMatcher struct {
// contains filtered or unexported fields
}
func NewOwnerReferenceMatcher ¶
func NewOwnerReferenceMatcher(owner runtime.Object, ctrl bool, scheme *runtime.Scheme) *OwnerReferenceMatcher
NewOwnerReferenceMatcher initializes a new owner reference matcher
type RecreateAwareStatefulsetDesiredState ¶
type RecreateAwareStatefulsetDesiredState struct { StaticDesiredState // contains filtered or unexported fields }
RecreateAwareStatefulsetDesiredState .
func NewRecreateAwareDeploymentDesiredState ¶
func NewRecreateAwareDeploymentDesiredState(c client.Client, scheme *runtime.Scheme, log logr.Logger, podLabels map[string]string) RecreateAwareStatefulsetDesiredState
NewRecreateAwareDeploymentDesiredState .
func (RecreateAwareStatefulsetDesiredState) AfterRecreate ¶
func (r RecreateAwareStatefulsetDesiredState) AfterRecreate(current, desired runtime.Object) error
AfterRecreate .
func (RecreateAwareStatefulsetDesiredState) AfterUpdate ¶
func (r RecreateAwareStatefulsetDesiredState) AfterUpdate(current, desired runtime.Object, inSync bool) error
AfterUpdate .
func (RecreateAwareStatefulsetDesiredState) BeforeRecreate ¶
func (r RecreateAwareStatefulsetDesiredState) BeforeRecreate(current, desired runtime.Object) error
BeforeRecreate .
type StaticDesiredState ¶
type StaticDesiredState string
StaticDesiredState .
const ( // DesiredStatePresent . DesiredStatePresent StaticDesiredState = "present" // DesiredStateAbsent . DesiredStateAbsent StaticDesiredState = "absent" // DesiredStateExists . DesiredStateExists StaticDesiredState = "exists" )
func (StaticDesiredState) AfterCreate ¶
func (s StaticDesiredState) AfterCreate(_ runtime.Object) error
AfterCreate .
func (StaticDesiredState) AfterDelete ¶
func (s StaticDesiredState) AfterDelete(_ runtime.Object) error
AfterDelete .
func (StaticDesiredState) AfterRecreate ¶
func (s StaticDesiredState) AfterRecreate(_, _ runtime.Object) error
AfterRecreate .
func (StaticDesiredState) AfterUpdate ¶
func (s StaticDesiredState) AfterUpdate(_, _ runtime.Object, _ bool) error
AfterUpdate .
func (StaticDesiredState) BeforeCreate ¶
func (s StaticDesiredState) BeforeCreate(_ runtime.Object) error
BeforeCreate .
func (StaticDesiredState) BeforeDelete ¶
func (s StaticDesiredState) BeforeDelete(_ runtime.Object) error
BeforeDelete .
func (StaticDesiredState) BeforeRecreate ¶
func (s StaticDesiredState) BeforeRecreate(_, _ runtime.Object) error
BeforeRecreate .
func (StaticDesiredState) BeforeUpdate ¶
func (s StaticDesiredState) BeforeUpdate(_, _ runtime.Object) error
BeforeUpdate .
func (StaticDesiredState) ShouldCreate ¶
func (s StaticDesiredState) ShouldCreate(_ runtime.Object) (bool, error)
ShouldCreate .
func (StaticDesiredState) ShouldDelete ¶
func (s StaticDesiredState) ShouldDelete(_ runtime.Object) (bool, error)
ShouldDelete .
func (StaticDesiredState) ShouldRecreate ¶
func (s StaticDesiredState) ShouldRecreate(_, _ runtime.Object) (bool, error)
ShouldRecreate .
func (StaticDesiredState) ShouldUpdate ¶
func (s StaticDesiredState) ShouldUpdate(_, _ runtime.Object) (bool, error)
ShouldUpdate .