namespace

package
v0.0.0-...-4181570 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNewControllerFunc

func RegisterNewControllerFunc(newFunc NewControllerFunc)

RegisterNewControllerFunc

Types

type BaseController

type BaseController struct {
	NameSpace string
}

BaseController empty implementation

func (BaseController) Namespace

func (b BaseController) Namespace() string

func (BaseController) ProcessImageEvent

func (b BaseController) ProcessImageEvent(eventservice.ImageEvent)

type Controller

type Controller interface {
	// return the namespace of the current controller
	Namespace() string
	Run()
	Stop()
	ProcessImageEvent(event eventservice.ImageEvent)
}

Controller Listens for resources in the current namespace

func NewAggregationController

func NewAggregationController(namespace string, k8sClient kubernetes.Interface) Controller

type NamespaceController

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

NamespaceController namespace 控制器,根据 namespace 的 labels 判断是否启动 AggregationController

func NewNamespaceController

func NewNamespaceController(informers informers.InformerFactory, client kubernetes.Interface, imageEventCollect eventservice.ImageEventCollect) *NamespaceController

func (*NamespaceController) ImageEventHandlerFunc

func (n *NamespaceController) ImageEventHandlerFunc(event eventservice.ImageEvent)

ImageEventHandlerFunc update the deployment container image based on event.

func (*NamespaceController) Start

func (n *NamespaceController) Start(ctx context.Context) error

type NewControllerFunc

type NewControllerFunc func(namespace string, k8sClient kubernetes.Interface, namespaceInformerFactory informers.InformerFactory) Controller

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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