querier

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSelfNode

func GetSelfNode(isAgent bool, node string) v1.ObjectReference

GetSelfNode gets current node.

func GetSelfPod

func GetSelfPod() v1.ObjectReference

GetSelfPod gets current pod.

func GetVersion

func GetVersion() string

GetVersion gets current version.

Types

type AgentMulticastInfoQuerier added in v1.7.0

type AgentMulticastInfoQuerier interface {
	// CollectIGMPReportNPStats gets statistics generated by NetworkPolicies that block or allow
	// IGMP reports message. The statistics returned are incremental and will be reset after each call.
	CollectIGMPReportNPStats() (anpStats, acnpStats map[apitypes.UID]map[string]*types.RuleMetric)
	// GetGroupPods gets a map that saves the local Pod members of multicast groups on the Node.
	GetGroupPods() map[string][]cpv1beta.PodReference
	// GetAllPodsStats gets multicast traffic statistics of all local Pods.
	GetAllPodsStats() map[*interfacestore.InterfaceConfig]*multicast.PodTrafficStats
	// GetPodStats gets multicast traffic statistics of a local Pod, specified by podName and podNamespace.
	GetPodStats(podName string, podNamespace string) *multicast.PodTrafficStats
}

type AgentNetworkPolicyInfoQuerier

type AgentNetworkPolicyInfoQuerier interface {
	NetworkPolicyInfoQuerier
	GetControllerConnectionStatus() bool
	GetNetworkPolicies(npFilter *NetworkPolicyQueryFilter) []cpv1beta.NetworkPolicy
	GetAddressGroups() []cpv1beta.AddressGroup
	GetAppliedToGroups() []cpv1beta.AppliedToGroup
	GetAppliedNetworkPolicies(pod, namespace string, npFilter *NetworkPolicyQueryFilter) []cpv1beta.NetworkPolicy
	GetNetworkPolicyByRuleFlowID(ruleFlowID uint32) *cpv1beta.NetworkPolicyReference
	GetRuleByFlowID(ruleFlowID uint32) *types.PolicyRule
}

type ControllerNetworkPolicyInfoQuerier

type ControllerNetworkPolicyInfoQuerier interface {
	NetworkPolicyInfoQuerier
	GetConnectedAgentNum() int
}

type EgressQuerier added in v1.10.0

type EgressQuerier interface {
	GetEgressIPByMark(mark uint32) (string, error)
	GetEgress(podNamespace, podName string) (string, error)
}

type NetworkPolicyInfoQuerier

type NetworkPolicyInfoQuerier interface {
	GetNetworkPolicyNum() int
	GetAddressGroupNum() int
	GetAppliedToGroupNum() int
}

type NetworkPolicyQueryFilter

type NetworkPolicyQueryFilter struct {
	// The Name of the controlplane network policy. If this field is set then
	// none of the other fields can be.
	Name string
	// The Name of the original network policy.
	SourceName string
	// The namespace of the original Namespace that the internal NetworkPolicy is created for.
	Namespace string
	// The type of the original NetworkPolicy that the internal NetworkPolicy is created for.(K8sNP, CNP, ANP)
	SourceType cpv1beta.NetworkPolicyType
}

NetworkPolicyQueryFilter is used to filter the result while retrieve network policy An empty attribute, which won't be used as a condition, means match all. e.g SourceType = "" means all type network policy will be retrieved Can have more attributes in future if more args are required

type ServiceExternalIPInfo added in v1.5.3

type ServiceExternalIPInfo struct {
	ServiceName    string `json:"serviceName,omitempty" antctl:"name,Name of the Service"`
	Namespace      string `json:"namespace,omitempty"`
	ExternalIP     string `json:"externalIP,omitempty"`
	ExternalIPPool string `json:"externalIPPool,omitempty"`
	AssignedNode   string `json:"assignedNode,omitempty"`
}

ServiceExternalIPInfo contains the essential information for Services with type of Loadbalancer managed by Antrea.

type ServiceExternalIPStatusQuerier added in v1.5.3

type ServiceExternalIPStatusQuerier interface {
	GetServiceExternalIPStatus() []ServiceExternalIPInfo
}

ServiceExternalIPStatusQuerier queries the Service external IP status for debugging purposes. Ideally, every Node should have consistent results eventually. This should only be used when ServiceExternalIP feature is enabled.

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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