controllers

package
v1.1.43 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

This is a copy from "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" So we can add owner references with controller flag set to false.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddControllerReference

func AddControllerReference(owner, object v1.Object, scheme *runtime.Scheme) error

AddControllerReference sets owner as a Controller OwnerReference on owned. This is used for garbage collection of the owned object and for reconciling the owner object on changes to owned (with a Watch + EnqueueRequestForOwner). Since only one OwnerReference can be a controller, it returns an error if there is another OwnerReference with Controller flag set.

func EventPropertiesAsColumns

func EventPropertiesAsColumns(taxonomy *model.EventTaxonomy, binding dwhv1beta1.ClickhouseTableBinding) []*clickhouse.Column

EventPropertiesAsColumns returns a list of columns from the properties of an EventTaxonomy

func NewControllerRef

func NewControllerRef(owner v1.Object, gvk schema.GroupVersionKind) *v1.OwnerReference

NewControllerRef creates an OwnerReference pointing to the given owner.

Types

type AlreadyOwnedError

type AlreadyOwnedError struct {
	Object v1.Object
	Owner  v1.OwnerReference
}

AlreadyOwnedError is an error returned if the object you are trying to assign a controller reference is already owned by another controller Object is the subject and Owner is the reference for the current owner

func (*AlreadyOwnedError) Error

func (e *AlreadyOwnedError) Error() string

type EventTaxonomyReconciler

type EventTaxonomyReconciler struct {
	client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	StatefulDB *clickhouse.StatefulDB
}

EventTaxonomyReconciler reconciles an EventTaxonomy object

func (*EventTaxonomyReconciler) Reconcile

Reconcile reads that state of the cluster for an EventTaxonomy object and makes changes based on the state read and what is in the EventTaxonomy.Spec Automatically generate RBAC rules to allow the Controller to read EventTaxonomy objects +kubebuilder:rbac:groups=dwh.zedge.io,resources=eventtaxonomies,verbs=get;list;watch;create;update;patch;delete

func (*EventTaxonomyReconciler) SetupWithManager

func (r *EventTaxonomyReconciler) SetupWithManager(mgr ctrl.Manager) error

add adds a new Controller to mgr with r as the reconcile.Reconciler

Jump to

Keyboard shortcuts

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