controller

package
v0.0.0-...-89e5b94 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 67 Imported by: 3

Documentation

Index

Constants

View Source
const (
	NoopToken = "noop"
)

Variables

This section is empty.

Functions

func RegisterDomain

func RegisterDomain(namespace, path, csrData string, prikey *rsa.PrivateKey, afterRegisterHook AfterRegisterDomainHook) error

func UpdateDomainRouteRevisionToken

func UpdateDomainRouteRevisionToken(kusciaClient clientset.Interface, namespace, drName string, revisionToken *RevisionToken) error

Types

type AfterRegisterDomainHook

type AfterRegisterDomainHook func(response *handshake.RegisterResponse)

type DestinationStatus

type DestinationStatus int
const (
	TokenReady DestinationStatus = iota
	DomainIDInputInvalid
	TokenRevisionInputInvalid
	TokenNotReady
	TokenNotFound
	NoAuthentication
	InternalError
	NetworkUnreachable
)

type DomainPorts

type DomainPorts struct {
	// contains filtered or unexported fields
}

func (DomainPorts) Len

func (dps DomainPorts) Len() int

func (DomainPorts) Less

func (dps DomainPorts) Less(i, j int) bool

func (DomainPorts) Swap

func (dps DomainPorts) Swap(i, j int)

type DomainRouteConfig

type DomainRouteConfig struct {
	Namespace       string
	MasterNamespace string
	IsMaster        bool
	CAKey           *rsa.PrivateKey
	CACert          *x509.Certificate
	Prikey          *rsa.PrivateKey
	PrikeyData      []byte
	HandshakePort   uint32
}

type DomainRouteController

type DomainRouteController struct {
	CaCertData []byte
	CaCert     *x509.Certificate
	CaKey      *rsa.PrivateKey
	// contains filtered or unexported fields
}

func NewDomainRouteController

func NewDomainRouteController(
	drConfig *DomainRouteConfig,
	kubeClient kubernetes.Interface,
	kusciaClient clientset.Interface,
	DomainRouteInformer kusciaextv1alpha1.DomainRouteInformer) *DomainRouteController

NewDomainRouteController create a new endpoints controller.

func (*DomainRouteController) DestReplyHandshake

func (*DomainRouteController) Run

func (c *DomainRouteController) Run(ctx context.Context, threadiness int, stopCh <-chan struct{})

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type EndpointsController

type EndpointsController struct {
	// contains filtered or unexported fields
}

func NewEndpointsController

func NewEndpointsController(isMaster bool, kubeClient kubernetes.Interface,
	serviceInformer corev1informers.ServiceInformer,
	endpointsInformer corev1informers.EndpointsInformer, whitelistFile string,
	clientCert *xds.TLSCert) (*EndpointsController, error)

func (*EndpointsController) AddEnvoyCluster

func (ec *EndpointsController) AddEnvoyCluster(namespace string, name string, protocol string, hosts map[string][]uint32,
	accessDomains string, clientCert *xds.TLSCert) error

func (*EndpointsController) AddEnvoyClusterByEndpoints

func (ec *EndpointsController) AddEnvoyClusterByEndpoints(service *v1.Service, endpoints *v1.Endpoints, protocol string, namespace string,
	name string, accessDomains string) error

func (*EndpointsController) AddEnvoyClusterByExternalName

func (ec *EndpointsController) AddEnvoyClusterByExternalName(service *v1.Service, protocol string, namespace string,
	name string, accessDomains string) error

func (*EndpointsController) Run

func (ec *EndpointsController) Run(workers int, stopCh <-chan struct{})

type GatewayController

type GatewayController struct {
	// contains filtered or unexported fields
}

GatewayController sync gateway status periodically to master.

func NewGatewayController

func NewGatewayController(namespace string, prikey *rsa.PrivateKey, kusciaClient kusciaclientset.Interface, informer kusciaextv1alpha1.GatewayInformer) (*GatewayController, error)

NewGatewayController returns a new GatewayController.

func (*GatewayController) GatewayName

func (c *GatewayController) GatewayName() string

func (*GatewayController) Run

func (c *GatewayController) Run(threadiness int, stopCh <-chan struct{})

Run begins watching and syncing.

func (*GatewayController) UpdateStatus

func (c *GatewayController) UpdateStatus(status []*kusciaapisv1alpha1.GatewayEndpointStatus)

type RegisterJwtClaims

type RegisterJwtClaims struct {
	ReqHash [16]byte `json:"req"`
	jwt.RegisteredClaims
}

type RevisionToken

type RevisionToken struct {
	RawToken       []byte
	PublicKey      *rsa.PublicKey
	ExpirationTime int64
	Revision       int32
}

func HandshakeToMaster

func HandshakeToMaster(domainID string, pathPrefix string, prikey *rsa.PrivateKey) (*RevisionToken, error)

type Token

type Token struct {
	Token   string
	Version int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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