k8s

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TRACE_API        = false
	CoreGroupVersion = "core.haproxy.org/v1alpha1"
)

TRACE_API outputs all k8s events received from k8s API nolint golint

Variables

View Source
var ErrIgnored = errors.New("ignored resource")

Functions

This section is empty.

Types

type BackendCR

type BackendCR struct {
}

func NewBackendCR

func NewBackendCR() BackendCR

func (BackendCR) GetInformer

func (c BackendCR) GetInformer(eventChan chan SyncDataEvent, factory informers.SharedInformerFactory) cache.SharedIndexInformer

func (BackendCR) GetKind

func (c BackendCR) GetKind() string

type CR

type CR interface {
	GetKind() string
	GetInformer(chan SyncDataEvent, crinformers.SharedInformerFactory) cache.SharedIndexInformer
}

A Custom Resource interface Any CR should be able to provide its kind, its kubernetes Informer and a method to process the update of a CR

type DefaultsCR

type DefaultsCR struct {
}

func NewDefaultsCR

func NewDefaultsCR() DefaultsCR

func (DefaultsCR) GetInformer

func (c DefaultsCR) GetInformer(eventChan chan SyncDataEvent, factory informers.SharedInformerFactory) cache.SharedIndexInformer

func (DefaultsCR) GetKind

func (c DefaultsCR) GetKind() string

type GlobalCR

type GlobalCR struct {
}

func NewGlobalCR

func NewGlobalCR() GlobalCR

func (GlobalCR) GetInformer

func (c GlobalCR) GetInformer(eventChan chan SyncDataEvent, factory informers.SharedInformerFactory) cache.SharedIndexInformer

func (GlobalCR) GetKind

func (c GlobalCR) GetKind() string

type K8s

type K8s interface {
	GetClientset() *k8sclientset.Clientset
	MonitorChanges(eventChan chan SyncDataEvent, ingressChan chan ingress.Sync, stop chan struct{})
	UpdatePublishService(ingresses []*ingress.Ingress, publishServiceAddresses []string)
}

func New

func New(osArgs utils.OSArgs, whitelist map[string]struct{}, publishSvc *utils.NamespaceValue) K8s

type SyncDataEvent

type SyncDataEvent struct {
	SyncType
	Namespace string
	Name      string
	Data      interface{}
	// contains filtered or unexported fields
}

k8s.SyncDataEvent represents converted k8s received message

type SyncType

type SyncType string

SyncType represents type of k8s received message

const (
	// SyncType values
	COMMAND         SyncType = "COMMAND"
	CONFIGMAP       SyncType = "CONFIGMAP"
	ENDPOINTS       SyncType = "ENDPOINTS"
	INGRESS         SyncType = "INGRESS"
	INGRESS_CLASS   SyncType = "INGRESS_CLASS"
	NAMESPACE       SyncType = "NAMESPACE"
	POD             SyncType = "POD"
	SERVICE         SyncType = "SERVICE"
	SECRET          SyncType = "SECRET"
	CR_GLOBAL       SyncType = "Global"
	CR_DEFAULTS     SyncType = "Defaults"
	CR_BACKEND      SyncType = "Backend"
	PUBLISH_SERVICE SyncType = "PUBLISH_SERVICE"
)

Jump to

Keyboard shortcuts

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