controller

package
v0.0.0-...-4a2caa5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamePrefix        = "knap"
	PartOf            = "Knap"
	ManagedBy         = "Knap"
	OperatorImageName = "tliron/knap-operator"
)

Variables

This section is empty.

Functions

func AddNetworkAttachmentDefinitionToObject

func AddNetworkAttachmentDefinitionToObject(object *meta.ObjectMeta, name string)

func GetObjectNetworkAttachmentDefinition

func GetObjectNetworkAttachmentDefinition(object *meta.ObjectMeta) ([]string, bool)

func GetObjectNetworkNames

func GetObjectNetworkNames(object *meta.ObjectMeta) ([]string, bool)

func ObjectHasNetwork

func ObjectHasNetwork(object *meta.ObjectMeta, name string) bool

func ObjectHasNetworkAttachmentDefinition

func ObjectHasNetworkAttachmentDefinition(object *meta.ObjectMeta, name string) bool

Types

type Controller

type Controller struct {
	Config      *restpkg.Config
	Kubernetes  kubernetes.Interface
	Knap        knapclientset.Interface
	REST        restpkg.Interface
	Client      *clientpkg.Client
	StopChannel <-chan struct{}

	Processors *kubernetesutil.Processors
	Events     record.EventRecorder

	KubernetesInformerFactory informers.SharedInformerFactory
	KnapInformerFactory       knapinformers.SharedInformerFactory

	Networks knaplisters.NetworkLister

	Context contextpkg.Context
	Log     commonlog.Logger
}

func NewController

func NewController(toolName string, cluster bool, namespace string, kubernetes kubernetes.Interface, apiExtensions apiextensionspkg.Interface, net netpkg.Interface, knap knapclientset.Interface, config *restpkg.Config, informerResyncPeriod time.Duration, stopChannel <-chan struct{}) *Controller

func (*Controller) Run

func (self *Controller) Run(concurrency uint, startup func()) error

Jump to

Keyboard shortcuts

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