Documentation
¶
Index ¶
- func ValidateSwiftv2Pod(pod v1.Pod) bool
- type K8sSWIFTv2Middleware
- func (k *K8sSWIFTv2Middleware) AddRoutes(cidrs []string, gatewayIP string) []cns.Route
- func (k *K8sSWIFTv2Middleware) GetInfravnetAndServiceCidrs() ([]string, []string, error)
- func (k *K8sSWIFTv2Middleware) GetPodCidrs() ([]string, []string, error)
- func (k *K8sSWIFTv2Middleware) GetPodInfo(ctx context.Context, req *cns.IPConfigsRequest) (podInfo cns.PodInfo, k8sPod v1.Pod, respCode types.ResponseCode, ...)
- func (k *K8sSWIFTv2Middleware) GetPodInfoForIPConfigsRequest(ctx context.Context, req *cns.IPConfigsRequest) (podInfo cns.PodInfo, respCode types.ResponseCode, message string)
- func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, failureHandler cns.IPConfigsHandlerFunc) cns.IPConfigsHandlerFunc
- func (k *K8sSWIFTv2Middleware) Type() cns.SWIFTV2Mode
- func (k *K8sSWIFTv2Middleware) UpdateIPConfigRequest(mtpnc v1alpha1.MultitenantPodNetworkConfig, req *cns.IPConfigsRequest) (respCode types.ResponseCode, message string)
- type StandaloneSWIFTv2Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSwiftv2Pod ¶ added in v1.6.20
validates if pod is multitenant by checking the pod labels, used in SWIFT V2 AKS scenario.
Types ¶
type K8sSWIFTv2Middleware ¶ added in v1.5.19
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 (k *K8sSWIFTv2Middleware) Type() cns.SWIFTV2Mode
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
func (m *StandaloneSWIFTv2Middleware) Type() cns.SWIFTV2Mode