k8sobjects

package
v0.0.0-...-c7431a4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	VSAnnotation         = "ako.vmware.com/host-fqdn-vs-uuid-map"
	ControllerAnnotation = "ako.vmware.com/controller-cluster-uuid"
)

Variables

This section is empty.

Functions

func GetSvcStatusIPHostname

func GetSvcStatusIPHostname(svc *corev1.Service) (string, string)

func RemoveAllSelectedNamespaces

func RemoveAllSelectedNamespaces()

Types

type FilterableObject

type FilterableObject interface {
	ApplyFilter() bool
}

type IPHostname

type IPHostname struct {
	IP       string
	Hostname string
}

type IngressHostMeta

type IngressHostMeta struct {
	Cluster            string
	IngName            string
	ObjName            string
	Namespace          string
	Hostname           string
	IPAddr             string
	VirtualServiceUUID string
	ControllerUUID     string
	Labels             map[string]string
	Paths              []string
	TLS                bool
}

IngressHostMeta is the metadata for an ingress. It is the minimal information that we maintain for each ingress, accepted or rejected.

func GetIngressHostMeta

func GetIngressHostMeta(ingress *networkingv1.Ingress, cname string) []IngressHostMeta

GetIngressHostMeta returns a ingress split into its backends

func (IngressHostMeta) ApplyFilter

func (ihm IngressHostMeta) ApplyFilter() bool

func (IngressHostMeta) ApplyGDPSelector

func (ihm IngressHostMeta) ApplyGDPSelector() bool

func (IngressHostMeta) DeleteMapByKey

func (ing IngressHostMeta) DeleteMapByKey(key string)

func (IngressHostMeta) GetCluster

func (ing IngressHostMeta) GetCluster() string

func (IngressHostMeta) GetClusterKey

func (ing IngressHostMeta) GetClusterKey() string

func (IngressHostMeta) GetControllerUUID

func (ing IngressHostMeta) GetControllerUUID() string

func (IngressHostMeta) GetHostname

func (ing IngressHostMeta) GetHostname() string

func (IngressHostMeta) GetHostnameFromHostMap

func (ing IngressHostMeta) GetHostnameFromHostMap(key string) string

func (IngressHostMeta) GetIPAddr

func (ing IngressHostMeta) GetIPAddr() string

func (IngressHostMeta) GetIngressHostCksum

func (ing IngressHostMeta) GetIngressHostCksum() uint32

func (IngressHostMeta) GetIngressHostMetaKey

func (ing IngressHostMeta) GetIngressHostMetaKey() string

func (IngressHostMeta) GetName

func (ing IngressHostMeta) GetName() string

func (IngressHostMeta) GetNamespace

func (ing IngressHostMeta) GetNamespace() string

func (IngressHostMeta) GetPaths

func (ing IngressHostMeta) GetPaths() ([]string, error)

func (IngressHostMeta) GetPort

func (ing IngressHostMeta) GetPort() (int32, error)

func (IngressHostMeta) GetProtocol

func (ing IngressHostMeta) GetProtocol() (string, error)

func (IngressHostMeta) GetTLS

func (ing IngressHostMeta) GetTLS() (bool, error)

func (IngressHostMeta) GetType

func (ing IngressHostMeta) GetType() string

func (IngressHostMeta) GetVirtualServiceUUID

func (ing IngressHostMeta) GetVirtualServiceUUID() string

func (IngressHostMeta) IngressHostInList

func (ing IngressHostMeta) IngressHostInList(ihmList []IngressHostMeta) (IngressHostMeta, bool)

func (IngressHostMeta) IsPassthrough

func (ing IngressHostMeta) IsPassthrough() bool

func (IngressHostMeta) UpdateHostMap

func (ing IngressHostMeta) UpdateHostMap(key string)

type MetaObject

type MetaObject interface {
	GetType() string
	GetName() string
	GetNamespace() string
	GetHostname() string
	GetIPAddr() string
	GetCluster() string
	UpdateHostMap(string)
	GetHostnameFromHostMap(string) string
	DeleteMapByKey(string)
	GetPaths() ([]string, error)
	GetPort() (int32, error)
	GetProtocol() (string, error)
	GetTLS() (bool, error)
	IsPassthrough() bool
	GetVirtualServiceUUID() string
	GetControllerUUID() string
}

Interface for k8s/openshift objects(e.g. route, service, ingress) with minimal information

type MultiClusterIngressHostMeta

type MultiClusterIngressHostMeta struct {
	Cluster            string
	IngName            string
	ObjName            string
	Namespace          string
	Hostname           string
	IPAddr             string
	VirtualServiceUUID string
	ControllerUUID     string
	Labels             map[string]string
	Paths              []string
	TLS                bool
}

MultiClusterMultiClusterIngressHostMeta is the metadata for a multi-cluster ingress. It is the minimal information that we maintain for each multi-cluster ingress, accepted or rejected.

func GetHostMetaForMultiClusterIngress

func GetHostMetaForMultiClusterIngress(mci *akov1alpha1.MultiClusterIngress, cname string) []MultiClusterIngressHostMeta

GetHostMetaForMultiClusterIngress returns a multi-cluster ingress split into its backends

func (MultiClusterIngressHostMeta) ApplyFilter

func (mciHostMeta MultiClusterIngressHostMeta) ApplyFilter() bool

func (MultiClusterIngressHostMeta) ApplyGDPSelector

func (mciHostMeta MultiClusterIngressHostMeta) ApplyGDPSelector() bool

func (MultiClusterIngressHostMeta) DeleteMapByKey

func (mciHostMeta MultiClusterIngressHostMeta) DeleteMapByKey(key string)

func (MultiClusterIngressHostMeta) GetCluster

func (mciHostMeta MultiClusterIngressHostMeta) GetCluster() string

func (MultiClusterIngressHostMeta) GetClusterKey

func (mciHostMeta MultiClusterIngressHostMeta) GetClusterKey() string

func (MultiClusterIngressHostMeta) GetControllerUUID

func (mciHostMeta MultiClusterIngressHostMeta) GetControllerUUID() string

func (MultiClusterIngressHostMeta) GetHostname

func (mciHostMeta MultiClusterIngressHostMeta) GetHostname() string

func (MultiClusterIngressHostMeta) GetHostnameFromHostMap

func (mciHostMeta MultiClusterIngressHostMeta) GetHostnameFromHostMap(key string) string

func (MultiClusterIngressHostMeta) GetIPAddr

func (mciHostMeta MultiClusterIngressHostMeta) GetIPAddr() string

func (MultiClusterIngressHostMeta) GetIngressHostCksum

func (mciHostMeta MultiClusterIngressHostMeta) GetIngressHostCksum() uint32

func (MultiClusterIngressHostMeta) GetIngressHostMetaKey

func (mciHostMeta MultiClusterIngressHostMeta) GetIngressHostMetaKey() string

func (MultiClusterIngressHostMeta) GetName

func (mciHostMeta MultiClusterIngressHostMeta) GetName() string

func (MultiClusterIngressHostMeta) GetNamespace

func (mciHostMeta MultiClusterIngressHostMeta) GetNamespace() string

func (MultiClusterIngressHostMeta) GetPaths

func (mciHostMeta MultiClusterIngressHostMeta) GetPaths() ([]string, error)

func (MultiClusterIngressHostMeta) GetPort

func (mciHostMeta MultiClusterIngressHostMeta) GetPort() (int32, error)

func (MultiClusterIngressHostMeta) GetProtocol

func (mciHostMeta MultiClusterIngressHostMeta) GetProtocol() (string, error)

func (MultiClusterIngressHostMeta) GetTLS

func (mciHostMeta MultiClusterIngressHostMeta) GetTLS() (bool, error)

func (MultiClusterIngressHostMeta) GetType

func (mciHostMeta MultiClusterIngressHostMeta) GetType() string

func (MultiClusterIngressHostMeta) GetVirtualServiceUUID

func (mciHostMeta MultiClusterIngressHostMeta) GetVirtualServiceUUID() string

func (MultiClusterIngressHostMeta) IngressHostInList

func (MultiClusterIngressHostMeta) IsPassthrough

func (mciHostMeta MultiClusterIngressHostMeta) IsPassthrough() bool

func (MultiClusterIngressHostMeta) UpdateHostMap

func (mciHostMeta MultiClusterIngressHostMeta) UpdateHostMap(key string)

type NSMeta

type NSMeta struct {
	Cluster string
	Name    string
	Labels  map[string]string
}

NSMeta is the metadata for a ns. It is the minimal information that we maintain for each namespace, accepted or rejected.

func GetNSMeta

func GetNSMeta(ns *corev1.Namespace, cname string) NSMeta

GetNSMeta returns a trimmed down version of a route

func (NSMeta) ApplyFilter

func (ns NSMeta) ApplyFilter() bool

func (NSMeta) DeleteFromFilter

func (ns NSMeta) DeleteFromFilter() bool

func (NSMeta) GetCluster

func (nsObj NSMeta) GetCluster() string

func (NSMeta) GetName

func (nsObj NSMeta) GetName() string

func (NSMeta) GetType

func (nsObj NSMeta) GetType() string

func (NSMeta) UpdateFilter

func (ns NSMeta) UpdateFilter(old NSMeta) bool

UpdateFilter returns true if there was a change in the filter

type ObjHostMap

type ObjHostMap struct {
	HostMap map[string]IPHostname
	Lock    sync.Mutex
}

ObjHostMap stores a mapping between cluster+ns+objName to it's hostname

type RouteMeta

type RouteMeta struct {
	Cluster            string
	Name               string
	Namespace          string
	Hostname           string
	IPAddr             string
	Labels             map[string]string
	Paths              []string
	TLS                bool
	Port               int32
	Protocol           string
	Passthrough        bool
	VirtualServiceUUID string
	ControllerUUID     string
}

RouteMeta is the metadata for a route. It is the minimal information that we maintain for each route, accepted or rejected.

func GetRouteMeta

func GetRouteMeta(route *routev1.Route, cname string) RouteMeta

GetRouteMeta returns a trimmed down version of a route

func (RouteMeta) ApplyFilter

func (route RouteMeta) ApplyFilter() bool

func (RouteMeta) ApplyGDPSelector

func (route RouteMeta) ApplyGDPSelector() bool

func (RouteMeta) DeleteMapByKey

func (route RouteMeta) DeleteMapByKey(key string)

func (RouteMeta) GetCluster

func (route RouteMeta) GetCluster() string

func (RouteMeta) GetControllerUUID

func (route RouteMeta) GetControllerUUID() string

func (RouteMeta) GetHostname

func (route RouteMeta) GetHostname() string

func (RouteMeta) GetHostnameFromHostMap

func (route RouteMeta) GetHostnameFromHostMap(key string) string

func (RouteMeta) GetIPAddr

func (route RouteMeta) GetIPAddr() string

func (RouteMeta) GetName

func (route RouteMeta) GetName() string

func (RouteMeta) GetNamespace

func (route RouteMeta) GetNamespace() string

func (RouteMeta) GetPaths

func (route RouteMeta) GetPaths() ([]string, error)

func (RouteMeta) GetPort

func (route RouteMeta) GetPort() (int32, error)

func (RouteMeta) GetProtocol

func (route RouteMeta) GetProtocol() (string, error)

func (RouteMeta) GetTLS

func (route RouteMeta) GetTLS() (bool, error)

func (RouteMeta) GetType

func (route RouteMeta) GetType() string

func (RouteMeta) GetVirtualServiceUUID

func (route RouteMeta) GetVirtualServiceUUID() string

func (RouteMeta) IsPassthrough

func (route RouteMeta) IsPassthrough() bool

func (RouteMeta) UpdateHostMap

func (route RouteMeta) UpdateHostMap(key string)

type SvcMeta

type SvcMeta struct {
	Cluster            string
	Name               string
	Namespace          string
	Hostname           string
	IPAddr             string
	Labels             map[string]string
	Port               int32
	Protocol           string
	VirtualServiceUUID string
	ControllerUUID     string
}

func GetSvcMeta

func GetSvcMeta(svc *corev1.Service, cname string) (SvcMeta, bool)

GetSvcMeta returns a trimmed down version of a svc

func (SvcMeta) ApplyFilter

func (svc SvcMeta) ApplyFilter() bool

func (SvcMeta) ApplyGDPSelector

func (svc SvcMeta) ApplyGDPSelector() bool

func (SvcMeta) DeleteMapByKey

func (svc SvcMeta) DeleteMapByKey(key string)

func (SvcMeta) GetCluster

func (svc SvcMeta) GetCluster() string

func (SvcMeta) GetControllerUUID

func (svc SvcMeta) GetControllerUUID() string

func (SvcMeta) GetHostname

func (svc SvcMeta) GetHostname() string

func (SvcMeta) GetHostnameFromHostMap

func (svc SvcMeta) GetHostnameFromHostMap(key string) string

func (SvcMeta) GetIPAddr

func (svc SvcMeta) GetIPAddr() string

func (SvcMeta) GetName

func (svc SvcMeta) GetName() string

func (SvcMeta) GetNamespace

func (svc SvcMeta) GetNamespace() string

func (SvcMeta) GetPaths

func (svc SvcMeta) GetPaths() ([]string, error)

func (SvcMeta) GetPort

func (svc SvcMeta) GetPort() (int32, error)

func (SvcMeta) GetProtocol

func (svc SvcMeta) GetProtocol() (string, error)

func (SvcMeta) GetTLS

func (svc SvcMeta) GetTLS() (bool, error)

func (SvcMeta) GetType

func (svc SvcMeta) GetType() string

func (SvcMeta) GetVirtualServiceUUID

func (svc SvcMeta) GetVirtualServiceUUID() string

func (SvcMeta) IsPassthrough

func (svc SvcMeta) IsPassthrough() bool

func (SvcMeta) UpdateHostMap

func (svc SvcMeta) UpdateHostMap(key string)

Jump to

Keyboard shortcuts

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