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.
Types ¶
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 NetworkPolicyQueryFilter ¶ added in v0.11.0
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 // Name of the pod that the network policy is applied on. Pod 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
Click to show internal directories.
Click to hide internal directories.