janitor

package
v0.2.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const AgentName = "janitor-controller"
View Source
const AnchorSuffix = "-anchor"
View Source
const InstallationTargetUID = "InstallationTargetUID"

Variables

This section is empty.

Functions

func ConfigMapAnchorToOwnerReference

func ConfigMapAnchorToOwnerReference(configMap *corev1.ConfigMap) metav1.OwnerReference

func CreateAnchorName

func CreateAnchorName(it *shipper.InstallationTarget) (string, error)

func CreateConfigMapAnchor

func CreateConfigMapAnchor(it *shipper.InstallationTarget) (*corev1.ConfigMap, error)

Types

type AnchorWorkItem

type AnchorWorkItem struct {
	ObjectMeta            metav1.ObjectMeta
	Key                   string
	InstallationTargetUID string
	ReleaseName           string
	ClusterName           string
	Namespace             string
	Name                  string
}

func (AnchorWorkItem) GetKey

func (i AnchorWorkItem) GetKey() string

type Controller

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

func NewController

func NewController(
	shipperclientset shipperclient.Interface,
	shipperInformerFactory shipperinformers.SharedInformerFactory,
	store clusterclientstore.Interface,
	recorder record.EventRecorder,
) *Controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{})

type EventBroadcaster

type EventBroadcaster interface {
	Broadcast(recorder record.EventRecorder)
}

TODO: Perhaps this is useful outside janitor?

type InstallationTargetWorkItem

type InstallationTargetWorkItem struct {
	ObjectMeta metav1.ObjectMeta
	Key        string
	Namespace  string
	Name       string
	AnchorName string
	Clusters   []string
}

func (InstallationTargetWorkItem) GetKey

type RecordableError

type RecordableError struct {
	Object      interface{}
	Reason      string
	MessageFmt  string
	MessageArgs []interface{}
	EventType   string
}

func NewRecordableError

func NewRecordableError(
	eventType string,
	reason string,
	messageFmt string,
	args ...interface{},
) *RecordableError

func (RecordableError) Broadcast

func (e RecordableError) Broadcast(obj runtime.Object, recorder record.EventRecorder)

func (RecordableError) Error

func (e RecordableError) Error() string

type WorkItem

type WorkItem interface {
	GetKey() string
}

Jump to

Keyboard shortcuts

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