chi

package
v0.0.1-0...-ce92ebd Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const FinalizerName = "finalizer.clickhouseinstallation.altinity.com"

FinalizerName specifies name of the finalizer to be used with CHI

Variables

View Source
var (
	// ErrOperatorPodNotSpecified specifies error when there is not namespace/name pair provided pointing to operator pod
	ErrOperatorPodNotSpecified = fmt.Errorf("operator pod not specfied")
)

Functions

This section is empty.

Types

type Announcer

type Announcer struct {
	a.Announcer
	// contains filtered or unexported fields
}

Announcer handler all log/event/status messages going outside of controller/worker

func NewAnnouncer

func NewAnnouncer() Announcer

NewAnnouncer creates new announcer

func (Announcer) A

func (a Announcer) A() Announcer

A adds full code address as 'file:line:function'

func (Announcer) E

func (a Announcer) E() Announcer

E adds 'end of the function' tag

func (Announcer) Error

func (a Announcer) Error(format string, args ...interface{})

Error is inspired by log.Errorf()

func (Announcer) F

func (a Announcer) F() Announcer

F adds function name

func (Announcer) FL

func (a Announcer) FL() Announcer

FL adds filename

func (Announcer) Fatal

func (a Announcer) Fatal(format string, args ...interface{})

Fatal is inspired by log.Fatalf()

func (Announcer) Info

func (a Announcer) Info(format string, args ...interface{})

Info is inspired by log.Infof()

func (Announcer) L

func (a Announcer) L() Announcer

L adds line number

func (Announcer) M

func (a Announcer) M(m ...interface{}) Announcer

M adds object meta as 'namespace/name'

func (Announcer) P

func (a Announcer) P()

P triggers log to print line

func (Announcer) S

func (a Announcer) S() Announcer

S adds 'start of the function' tag

func (Announcer) Silence

func (a Announcer) Silence() Announcer

Silence produces silent announcer

func (Announcer) V

func (a Announcer) V(level log.Level) Announcer

V is inspired by log.V()

func (Announcer) Warning

func (a Announcer) Warning(format string, args ...interface{})

Warning is inspired by log.Warningf()

func (Announcer) WithController

func (a Announcer) WithController(ctrl *Controller) Announcer

WithController specifies controller to be used in case `chi`-related announces need to be done

func (Announcer) WithEvent

func (a Announcer) WithEvent(
	chi *chop.ClickHouseInstallation,
	action string,
	reason string,
) Announcer

WithEvent is used in chained calls in order to produce event into `chi`

func (Announcer) WithStatusAction

func (a Announcer) WithStatusAction(chi *chop.ClickHouseInstallation) Announcer

WithStatusAction is used in chained calls in order to produce action into `ClickHouseInstallation.Status.Action`

func (Announcer) WithStatusActions

func (a Announcer) WithStatusActions(chi *chop.ClickHouseInstallation) Announcer

WithStatusActions is used in chained calls in order to produce action in ClickHouseInstallation.Status.Actions

func (Announcer) WithStatusError

func (a Announcer) WithStatusError(chi *chop.ClickHouseInstallation) Announcer

WithStatusError is used in chained calls in order to produce error in ClickHouseInstallation.Status.Error

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller defines CRO controller

func NewController

func NewController(
	chopClient chopclientset.Interface,
	extClient apiextensions.Interface,
	kubeClient kube.Interface,
	chopInformerFactory chopinformers.SharedInformerFactory,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
) *Controller

NewController creates instance of Controller

func (*Controller) EventError

func (c *Controller) EventError(
	chi *chop.ClickHouseInstallation,
	action string,
	reason string,
	message string,
)

EventError emits event Error

func (*Controller) EventInfo

func (c *Controller) EventInfo(
	chi *chop.ClickHouseInstallation,
	action string,
	reason string,
	message string,
)

EventInfo emits event Info

func (*Controller) EventWarning

func (c *Controller) EventWarning(
	chi *chop.ClickHouseInstallation,
	action string,
	reason string,
	message string,
)

EventWarning emits event Warning

func (*Controller) GetCHIByObjectMeta

func (c *Controller) GetCHIByObjectMeta(objectMeta *meta.ObjectMeta) (*chiv1.ClickHouseInstallation, error)

GetCHIByObjectMeta gets CHI by namespaced name

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Run syncs caches, starts workers

type DropDns

type DropDns struct {
	PriorityQueueItem
	// contains filtered or unexported fields
}

DropDns specifies drop dns queue item

func NewDropDns

func NewDropDns(initiator *v1.ObjectMeta) *DropDns

NewDropDns creates new drop dns queue item

func (DropDns) Handle

func (r DropDns) Handle() queue.T

Handle returns handle of the queue item

type PriorityQueueItem

type PriorityQueueItem struct {
	// contains filtered or unexported fields
}

PriorityQueueItem specifies item of the priority queue

func (PriorityQueueItem) Priority

func (i PriorityQueueItem) Priority() int

Priority gets priority of the queue item

type ReconcileCHI

type ReconcileCHI struct {
	PriorityQueueItem
	// contains filtered or unexported fields
}

ReconcileCHI specifies reconcile request queue item

func NewReconcileCHI

func NewReconcileCHI(cmd string, old, new *chi.ClickHouseInstallation) *ReconcileCHI

NewReconcileCHI creates new reconcile request queue item

func (ReconcileCHI) Handle

func (r ReconcileCHI) Handle() queue.T

Handle returns handle of the queue item

type ReconcileCHIT

type ReconcileCHIT struct {
	PriorityQueueItem
	// contains filtered or unexported fields
}

ReconcileCHIT specifies reconcile CHI template queue item

func NewReconcileCHIT

func NewReconcileCHIT(cmd string, old, new *chi.ClickHouseInstallationTemplate) *ReconcileCHIT

NewReconcileCHIT creates new reconcile CHI template queue item

func (ReconcileCHIT) Handle

func (r ReconcileCHIT) Handle() queue.T

Handle returns handle of the queue item

type ReconcileChopConfig

type ReconcileChopConfig struct {
	PriorityQueueItem
	// contains filtered or unexported fields
}

ReconcileChopConfig specifies CHOp config queue item

func NewReconcileChopConfig

func NewReconcileChopConfig(cmd string, old, new *chi.ClickHouseOperatorConfiguration) *ReconcileChopConfig

NewReconcileChopConfig creates new CHOp config queue item

func (ReconcileChopConfig) Handle

func (r ReconcileChopConfig) Handle() queue.T

Handle returns handle of the queue item

type StatefulSetPollOptions

type StatefulSetPollOptions struct {
	StartBotheringAfterTimeout time.Duration
	CreateTimeout              time.Duration
	Timeout                    time.Duration
	MainInterval               time.Duration
	BackgroundInterval         time.Duration
}

StatefulSetPollOptions specifies polling options

func NewStatefulSetPollOptions

func NewStatefulSetPollOptions() *StatefulSetPollOptions

NewStatefulSetPollOptions creates new poll options

func (*StatefulSetPollOptions) Ensure

Ensure ensures poll options do exist

func (*StatefulSetPollOptions) FromConfig

FromConfig makes poll options from config

func (*StatefulSetPollOptions) SetCreateTimeout

func (o *StatefulSetPollOptions) SetCreateTimeout(timeout time.Duration) *StatefulSetPollOptions

SetCreateTimeout sets create timeout

Jump to

Keyboard shortcuts

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