types

package
v0.13.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationReader added in v0.13.0

type AnnotationReader interface {
	ReadAnnotations(backend *hatypes.Backend, services []*api.Service, pathLinks []hatypes.PathLink)
}

AnnotationReader ...

type Cache

type Cache interface {
	ExternalNameLookup(externalName string) ([]net.IP, error)
	GetIngress(ingressName string) (*networking.Ingress, error)
	GetIngressList() ([]*networking.Ingress, error)
	GetIngressClass(className string) (*networking.IngressClass, error)
	GetGateway(gatewayName string) (*gateway.Gateway, error)
	GetGatewayList() ([]*gateway.Gateway, error)
	GetHTTPRouteList(namespace string, match map[string]string) ([]*gateway.HTTPRoute, error)
	GetService(defaultNamespace, serviceName string) (*api.Service, error)
	GetEndpoints(service *api.Service) (*api.Endpoints, error)
	GetConfigMap(configMapName string) (*api.ConfigMap, error)
	GetTerminatingPods(service *api.Service, track TrackingTarget) ([]*api.Pod, error)
	GetPod(podName string) (*api.Pod, error)
	GetPodNamespace() string
	GetTLSSecretPath(defaultNamespace, secretName string, track TrackingTarget) (CrtFile, error)
	GetCASecretPath(defaultNamespace, secretName string, track TrackingTarget) (ca, crl File, err error)
	GetDHSecretPath(defaultNamespace, secretName string) (File, error)
	GetPasswdSecretContent(defaultNamespace, secretName string, track TrackingTarget) ([]byte, error)
	SwapChangedObjects() *ChangedObjects
}

Cache ...

type ChangedObjects added in v0.11.1

type ChangedObjects struct {
	//
	GlobalConfigMapDataCur, GlobalConfigMapDataNew map[string]string
	//
	TCPConfigMapDataCur, TCPConfigMapDataNew map[string]string
	//
	IngressesDel, IngressesUpd, IngressesAdd []*networking.Ingress
	//
	IngressClassesDel, IngressClassesUpd, IngressClassesAdd []*networking.IngressClass
	//
	GatewaysDel, GatewaysUpd, GatewaysAdd []*gateway.Gateway
	//
	GatewayClassesDel, GatewayClassesUpd, GatewayClassesAdd []*gateway.GatewayClass
	//
	HTTPRoutesDel, HTTPRoutesUpd, HTTPRoutesAdd []*gateway.HTTPRoute
	//
	TLSRoutesDel, TLSRoutesUpd, TLSRoutesAdd []*gateway.TLSRoute
	//
	TCPRoutesDel, TCPRoutesUpd, TCPRoutesAdd []*gateway.TCPRoute
	//
	UDPRoutesDel, UDPRoutesUpd, UDPRoutesAdd []*gateway.UDPRoute
	//
	BackendPoliciesDel, BackendPoliciesUpd, BackendPoliciesAdd []*gateway.BackendPolicy
	//
	EndpointsNew []*api.Endpoints
	//
	ServicesDel, ServicesUpd, ServicesAdd []*api.Service
	//
	SecretsDel, SecretsUpd, SecretsAdd []*api.Secret
	//
	ConfigMapsDel, ConfigMapsUpd, ConfigMapsAdd []*api.ConfigMap
	//
	PodsNew []*api.Pod
	//
	NeedFullSync bool
	//
	Objects []string
}

ChangedObjects ...

type ConverterOptions added in v0.13.0

type ConverterOptions struct {
	Logger           types.Logger
	Cache            Cache
	Tracker          Tracker
	DynamicConfig    *DynamicConfig
	MasterSocket     string
	DefaultConfig    func() map[string]string
	DefaultBackend   string
	DefaultCrtSecret string
	FakeCrtFile      CrtFile
	FakeCAFile       CrtFile
	AnnotationPrefix []string
	DisableKeywords  []string
	AcmeTrackTLSAnn  bool
	HasGateway       bool
}

ConverterOptions ...

type CrtFile added in v0.10.1

type CrtFile struct {
	Filename   string
	SHA1Hash   string
	CommonName string
	NotAfter   time.Time
}

CrtFile ...

type DynamicConfig added in v0.13.0

type DynamicConfig struct {
	CrossNamespaceSecretCertificate bool
	CrossNamespaceSecretCA          bool
	CrossNamespaceSecretPasswd      bool
	CrossNamespaceServices          bool
	// config from the command-line for backward compatibility
	StaticCrossNamespaceSecrets bool
}

DynamicConfig ...

type File

type File struct {
	Filename string
	SHA1Hash string
}

File ...

type ResourceType added in v0.11.1

type ResourceType int

ResourceType ...

const (
	// IngressType ...
	IngressType ResourceType = iota

	// IngressClassType ...
	IngressClassType

	// ConfigMapType ...
	ConfigMapType

	// ServiceType ...
	ServiceType

	// SecretType ...
	SecretType

	// PodType ...
	PodType
)

type Tracker added in v0.11.1

type Tracker interface {
	Track(isMissing bool, track TrackingTarget, rtype ResourceType, name string)
	TrackHostname(rtype ResourceType, name, hostname string)
	TrackBackend(rtype ResourceType, name string, backendID hatypes.BackendID)
	TrackMissingOnHostname(rtype ResourceType, name, hostname string)
	TrackStorage(rtype ResourceType, name, storage string)
	TrackGateway(rtype ResourceType, name string)
	GetDirtyLinks(oldIngressList, addIngressList, oldIngressClassList, addIngressClassList, oldConfigMapList, addConfigMapList, oldServiceList, addServiceList, oldSecretList, addSecretList, addPodList []string) (dirtyIngs, dirtyHosts []string, dirtyBacks []hatypes.BackendID, dirtyUsers, dirtyStorages []string)
	GetGatewayChanged(oldSecretList, addSecretList, oldServiceList, addServiceList []string) bool
	DeleteHostnames(hostnames []string)
	DeleteBackends(backends []hatypes.BackendID)
	DeleteUserlists(userlists []string)
	DeleteStorages(storages []string)
	DeleteGateway()
}

Tracker ...

type TrackingTarget added in v0.11.1

type TrackingTarget struct {
	Hostname string
	Backend  hatypes.BackendID
	Userlist string
	Gateway  bool
}

TrackingTarget ...

Jump to

Keyboard shortcuts

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