middlewares

package
v1.6.24 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSwiftv2Pod added in v1.6.20

func ValidateSwiftv2Pod(pod v1.Pod) bool

validates if pod is multitenant by checking the pod labels, used in SWIFT V2 AKS scenario.

Types

type K8sSWIFTv2Middleware added in v1.5.19

type K8sSWIFTv2Middleware struct {
	Cli client.Client
}

func (*K8sSWIFTv2Middleware) AddRoutes added in v1.6.20

func (k *K8sSWIFTv2Middleware) AddRoutes(cidrs []string, gatewayIP string) []cns.Route

func (*K8sSWIFTv2Middleware) GetInfravnetAndServiceCidrs added in v1.6.20

func (k *K8sSWIFTv2Middleware) GetInfravnetAndServiceCidrs() ([]string, []string, error)

Both Linux and Windows CNS gets infravnet and service CIDRs from configuration env GetInfravnetAndServiceCidrs() returns v4CIDRs(infravnet and service cidrs) as first []string and v6CIDRs(infravnet and service) as second []string

func (*K8sSWIFTv2Middleware) GetPodCidrs added in v1.6.20

func (k *K8sSWIFTv2Middleware) GetPodCidrs() ([]string, []string, error)

Linux CNS gets pod CIDRs from configuration env Containerd reassigns the IP to the adapter and kernel configures the pod cidr route by default on Windows VM Hence the windows swiftv2 scenario does not require pod cidr GetPodCidrs() will return v4PodCidrs as first []string and v6PodCidrs as second []string

func (*K8sSWIFTv2Middleware) GetPodInfo added in v1.6.20

func (k *K8sSWIFTv2Middleware) GetPodInfo(ctx context.Context, req *cns.IPConfigsRequest) (podInfo cns.PodInfo, k8sPod v1.Pod, respCode types.ResponseCode, message string)

gets Pod Data

func (*K8sSWIFTv2Middleware) GetPodInfoForIPConfigsRequest added in v1.6.20

func (k *K8sSWIFTv2Middleware) GetPodInfoForIPConfigsRequest(ctx context.Context, req *cns.IPConfigsRequest) (podInfo cns.PodInfo, respCode types.ResponseCode, message string)

func (*K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper added in v1.5.19

func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, failureHandler cns.IPConfigsHandlerFunc) cns.IPConfigsHandlerFunc

IPConfigsRequestHandlerWrapper is the middleware function for handling SWIFT v2 IP configs requests for AKS-SWIFT. This function wrapped the default SWIFT request and release IP configs handlers.

func (*K8sSWIFTv2Middleware) Type added in v1.5.31

func (*K8sSWIFTv2Middleware) UpdateIPConfigRequest added in v1.6.20

func (k *K8sSWIFTv2Middleware) UpdateIPConfigRequest(mtpnc v1alpha1.MultitenantPodNetworkConfig, req *cns.IPConfigsRequest) (
	respCode types.ResponseCode,
	message string,
)

Updates Ip Config Request

type StandaloneSWIFTv2Middleware added in v1.5.31

type StandaloneSWIFTv2Middleware struct{}

func (*StandaloneSWIFTv2Middleware) IPConfigsRequestHandlerWrapper added in v1.5.31

func (m *StandaloneSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(ipRequestHandler, _ cns.IPConfigsHandlerFunc) cns.IPConfigsHandlerFunc

IPConfigsRequestHandlerWrapper is the middleware function for handling SWIFT v2 IP config requests for SF standalone scenario. This function wraps the default SWIFT request and release IP configs handlers.

func (*StandaloneSWIFTv2Middleware) Type added in v1.5.31

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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