Documentation ¶
Overview ¶
Package types contains common types in the antrea-controller.
Index ¶
Constants ¶
View Source
const ( TierEmergency networking.TierPriority = iota + 1 TierSecurityOps TierNetworkOps TierPlatform TierApplication )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressGroup ¶
type AddressGroup struct { SpanMeta // UID is generated from the hash value of GroupSelector.NormalizedName. UID types.UID // Name of this group, currently it's same as UID. Name string // Selector describes how the group selects pods to get their addresses. Selector GroupSelector // Pods is a set of Pods selected by this group. // It will be converted to a slice of GroupMemberPod for transferring according // to client's selection. Pods networking.GroupMemberPodSet }
AddressGroup describes a set of addresses used as source or destination of Network Policy rules.
type AppliedToGroup ¶
type AppliedToGroup struct { SpanMeta // UID is generated from the hash value of GroupSelector.NormalizedName. UID types.UID // Name of this group, currently it's same as UID. Name string // Selector describes how the group selects pods. Selector GroupSelector // PodsByNode is a mapping from nodeName to a set of Pods on the Node. // It will be converted to a slice of GroupMemberPod for transferring according // to client's selection. PodsByNode map[string]networking.GroupMemberPodSet }
AppliedToGroup describes a set of Pods to apply Network Policies to.
type GroupSelector ¶
type GroupSelector struct { // The normalized name is calculated from Namespace, PodSelector, and NamespaceSelector. // If multiple policies have same selectors, they should share this group by comparing NormalizedName. // It's also used to generate Name and UUID of group. NormalizedName string // If Namespace is set, NamespaceSelector can not be set. It means only Pods in this Namespace will be matched. Namespace string // This is a label selector which selects Pods. If Namespace is also set, it selects the Pods in the Namespace. // If NamespaceSelector is also set, it selects the Pods in the Namespaces selected by NamespaceSelector. // If Namespace and NamespaceSelector both are unset, it selects the Pods in all the Namespaces. PodSelector labels.Selector // This is a label selector which selects Namespaces. It this field is set, Namespace can not be set. NamespaceSelector labels.Selector }
GroupSelector describes how to select Pods.
type NetworkPolicy ¶
type NetworkPolicy struct { SpanMeta // UID of the original K8s Network Policy. UID types.UID // Name of the original K8s Network Policy. Name string // Namespace of the original K8s Network Policy. // An empty value indicates that the Network Policy is Cluster scoped. Namespace string // Priority represents the relative priority of this Network Policy as compared to // other Network Policies. Priority will be unset (nil) for K8s Network Policy. Priority *float64 // Rules is a list of rules to be applied to the selected Pods. Rules []networking.NetworkPolicyRule // AppliedToGroups is a list of names of AppliedToGroups to which this policy applies. AppliedToGroups []string // TierPriority represents the priority of the Tier associated with this Network // Policy. TierPriority *networking.TierPriority }
NetworkPolicy describes what network traffic is allowed for a set of Pods.
Click to show internal directories.
Click to hide internal directories.