k8s

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRSGroupVersionV1alpha1 = "core.haproxy.org/v1alpha1"
	CRSGroupVersionV1alpha2 = "core.haproxy.org/v1alpha2"
	CRSGroupVersionV1       = "ingress.v1.haproxy.org/v1"
	GATEWAY_API_VERSION     = "v0.5.1" //nolint:golint,stylecheck
)

TRACE_API outputs all k8s events received from k8s API

Variables

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

Functions

func ConvertFromK8SLabelSelector added in v1.10.0

func ConvertFromK8SLabelSelector(labelSelector *metav1.LabelSelector) *store.LabelSelector

func ConvertToK8SLabelSelector added in v1.10.0

func ConvertToK8SLabelSelector(labelSelector *store.LabelSelector) *metav1.LabelSelector

func GetRestConfig added in v1.9.13

func GetRestConfig(osArgs utils.OSArgs) (restConfig *rest.Config, err error)

func PopulateInformer added in v1.10.0

func PopulateInformer[IT InformerGetter, GWType GatewayRelatedType, GWF GatewayInformerFunc[GWType]](eventChan chan SyncDataEvent, informer IT, handler GWF) cache.SharedIndexInformer

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 BackendCRV1Alpha1 added in v1.9.0

type BackendCRV1Alpha1 struct{}

func NewBackendCRV1Alpha1 added in v1.9.0

func NewBackendCRV1Alpha1() BackendCRV1Alpha1

func (BackendCRV1Alpha1) GetInformer added in v1.9.0

func (BackendCRV1Alpha1) GetKind added in v1.9.0

func (c BackendCRV1Alpha1) GetKind() string

type BackendCRV1Alpha2 added in v1.11.0

type BackendCRV1Alpha2 struct{}

func NewBackendCRV1Alpha2 added in v1.11.0

func NewBackendCRV1Alpha2() BackendCRV1Alpha2

func (BackendCRV1Alpha2) GetInformer added in v1.11.0

func (BackendCRV1Alpha2) GetKind added in v1.11.0

func (c BackendCRV1Alpha2) 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 DefaultsCRV1Alpha1 added in v1.9.0

type DefaultsCRV1Alpha1 struct{}

func NewDefaultsCRV1Alpha1 added in v1.9.0

func NewDefaultsCRV1Alpha1() DefaultsCRV1Alpha1

func (DefaultsCRV1Alpha1) GetInformer added in v1.9.0

func (DefaultsCRV1Alpha1) GetKind added in v1.9.0

func (c DefaultsCRV1Alpha1) GetKind() string

type DefaultsCRV1Alpha2 added in v1.11.0

type DefaultsCRV1Alpha2 struct{}

func NewDefaultsCRV1Alpha2 added in v1.11.0

func NewDefaultsCRV1Alpha2() DefaultsCRV1Alpha2

func (DefaultsCRV1Alpha2) GetInformer added in v1.11.0

func (DefaultsCRV1Alpha2) GetKind added in v1.11.0

func (c DefaultsCRV1Alpha2) GetKind() string

type GatewayInformerFunc added in v1.10.0

type GatewayInformerFunc[GWType GatewayRelatedType] func(gwObj GWType, eventChan chan SyncDataEvent, status store.Status)

type GatewayRelatedType added in v1.10.0

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 GlobalCRV1Alpha1 added in v1.9.0

type GlobalCRV1Alpha1 struct{}

func NewGlobalCRV1Alpha1 added in v1.9.0

func NewGlobalCRV1Alpha1() GlobalCRV1Alpha1

func (GlobalCRV1Alpha1) GetInformer added in v1.9.0

func (GlobalCRV1Alpha1) GetKind added in v1.9.0

func (c GlobalCRV1Alpha1) GetKind() string

type GlobalCRV1Alpha2 added in v1.11.0

type GlobalCRV1Alpha2 struct{}

func NewGlobalCRV1Alpha2 added in v1.11.0

func NewGlobalCRV1Alpha2() GlobalCRV1Alpha2

func (GlobalCRV1Alpha2) GetInformer added in v1.11.0

func (GlobalCRV1Alpha2) GetKind added in v1.11.0

func (c GlobalCRV1Alpha2) GetKind() string

type GroupKind added in v1.11.0

type GroupKind struct {
	Group string
	Kind  string
}

type InformerGetter added in v1.10.0

type InformerGetter interface {
	Informer() cache.SharedIndexInformer
}

type K8s

type K8s interface {
	GetRestClientset() client.Client
	GetClientset() *k8sclientset.Clientset
	MonitorChanges(eventChan chan SyncDataEvent, stop chan struct{}, osArgs utils.OSArgs, gatewayAPIInstalled bool)
	IsGatewayAPIInstalled(gatewayControllerName string) bool
}

func New

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

type SyncDataEvent

type SyncDataEvent struct {
	Data           interface{}
	EventProcessed chan struct{}
	SyncType
	Namespace string
	Name      string
	// 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"
	GATEWAYCLASS    SyncType = "GATEWAYCLASS"
	GATEWAY         SyncType = "GATEWAY"
	TCPROUTE        SyncType = "TCPROUTE"
	REFERENCEGRANT  SyncType = "REFERENCEGRANT"
)

Jump to

Keyboard shortcuts

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