Documentation ¶
Overview ¶
Package networking contains the latest (or "internal") version of the Antrea NetworkPolicy API messages. This is the API messages as represented in memory. The contract presented to clients is located in the versioned packages, which are sub-directories. The first one is "v1beta1". The messages are generated based on the stored NetworkPolicy objects, i.e. the objects defined in antrea/pkg/controller/types/networkpolicy.go.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type AddressGroup
- type AddressGroupList
- type AddressGroupPatch
- type AppliedToGroup
- type AppliedToGroupList
- type AppliedToGroupPatch
- type Direction
- type Endpoint
- type ExternalEntityReference
- type GroupMember
- type GroupMemberPod
- type GroupMemberPodSet
- func (in GroupMemberPodSet) DeepCopy() GroupMemberPodSet
- func (in GroupMemberPodSet) DeepCopyInto(out *GroupMemberPodSet)
- func (s GroupMemberPodSet) Delete(items ...*GroupMemberPod)
- func (s GroupMemberPodSet) Difference(o GroupMemberPodSet) GroupMemberPodSet
- func (s GroupMemberPodSet) Equal(o GroupMemberPodSet) bool
- func (s GroupMemberPodSet) Has(item *GroupMemberPod) bool
- func (s GroupMemberPodSet) Insert(items ...*GroupMemberPod)
- func (s GroupMemberPodSet) IsSuperset(o GroupMemberPodSet) bool
- func (s GroupMemberPodSet) Union(o GroupMemberPodSet) GroupMemberPodSet
- type IPAddress
- type IPBlock
- type IPNet
- type NamedPort
- type NetworkPolicy
- type NetworkPolicyList
- type NetworkPolicyPeer
- type NetworkPolicyRule
- type PodReference
- type Protocol
- type Service
Constants ¶
const GroupName = "networking.antrea.tanzu.vmware.com"
GroupName is the group name used in this package.
Variables ¶
var ( // SchemeBuilder points to a list of functions added to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type AddressGroup ¶
type AddressGroup struct { metav1.TypeMeta metav1.ObjectMeta // Pods is a list of Pods selected by this group. Pods []GroupMemberPod // GroupMembers is a list of GroupMember selected by this group. GroupMembers []GroupMember }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AddressGroup is the message format of antrea/pkg/controller/types.AddressGroup in an API response.
func (*AddressGroup) DeepCopy ¶
func (in *AddressGroup) DeepCopy() *AddressGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressGroup.
func (*AddressGroup) DeepCopyInto ¶
func (in *AddressGroup) DeepCopyInto(out *AddressGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressGroup) DeepCopyObject ¶
func (in *AddressGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddressGroupList ¶
type AddressGroupList struct { metav1.TypeMeta metav1.ListMeta Items []AddressGroup }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AddressGroupList is a list of AddressGroup objects.
func (*AddressGroupList) DeepCopy ¶
func (in *AddressGroupList) DeepCopy() *AddressGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressGroupList.
func (*AddressGroupList) DeepCopyInto ¶
func (in *AddressGroupList) DeepCopyInto(out *AddressGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressGroupList) DeepCopyObject ¶
func (in *AddressGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddressGroupPatch ¶
type AddressGroupPatch struct { metav1.TypeMeta metav1.ObjectMeta AddedPods []GroupMemberPod RemovedPods []GroupMemberPod AddedGroupMembers []GroupMember RemovedGroupMembers []GroupMember }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AddressGroupPatch describes the incremental update of an AddressGroup.
func (*AddressGroupPatch) DeepCopy ¶
func (in *AddressGroupPatch) DeepCopy() *AddressGroupPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressGroupPatch.
func (*AddressGroupPatch) DeepCopyInto ¶
func (in *AddressGroupPatch) DeepCopyInto(out *AddressGroupPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressGroupPatch) DeepCopyObject ¶
func (in *AddressGroupPatch) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppliedToGroup ¶
type AppliedToGroup struct { metav1.TypeMeta metav1.ObjectMeta // Pods is a list of Pods selected by this group. Pods []GroupMemberPod // GroupMembers is a list of resources selected by this group. GroupMembers []GroupMember }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AppliedToGroup is the message format of antrea/pkg/controller/types.AppliedToGroup in an API response.
func (*AppliedToGroup) DeepCopy ¶
func (in *AppliedToGroup) DeepCopy() *AppliedToGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedToGroup.
func (*AppliedToGroup) DeepCopyInto ¶
func (in *AppliedToGroup) DeepCopyInto(out *AppliedToGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppliedToGroup) DeepCopyObject ¶
func (in *AppliedToGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppliedToGroupList ¶
type AppliedToGroupList struct { metav1.TypeMeta metav1.ListMeta Items []AppliedToGroup }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AppliedToGroupList is a list of AppliedToGroup objects.
func (*AppliedToGroupList) DeepCopy ¶
func (in *AppliedToGroupList) DeepCopy() *AppliedToGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedToGroupList.
func (*AppliedToGroupList) DeepCopyInto ¶
func (in *AppliedToGroupList) DeepCopyInto(out *AppliedToGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppliedToGroupList) DeepCopyObject ¶
func (in *AppliedToGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppliedToGroupPatch ¶
type AppliedToGroupPatch struct { metav1.TypeMeta metav1.ObjectMeta AddedPods []GroupMemberPod RemovedPods []GroupMemberPod AddedGroupMembers []GroupMember RemovedGroupMembers []GroupMember }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AppliedToGroupPatch describes the incremental update of an AppliedToGroup.
func (*AppliedToGroupPatch) DeepCopy ¶
func (in *AppliedToGroupPatch) DeepCopy() *AppliedToGroupPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedToGroupPatch.
func (*AppliedToGroupPatch) DeepCopyInto ¶
func (in *AppliedToGroupPatch) DeepCopyInto(out *AppliedToGroupPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppliedToGroupPatch) DeepCopyObject ¶
func (in *AppliedToGroupPatch) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Endpoint ¶ added in v0.8.0
type Endpoint struct { // IP is the IP address of the Endpoint. IP IPAddress // Ports is the list NamedPort of the Endpoint. Ports []NamedPort }
Endpoint represents an external endpoint.
func (*Endpoint) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalEntityReference ¶ added in v0.8.0
type ExternalEntityReference struct { // The name of this ExternalEntity. Name string // The namespace of this ExternalEntity. Namespace string }
ExternalEntityReference represents a ExternalEntity Reference.
func (*ExternalEntityReference) DeepCopy ¶ added in v0.8.0
func (in *ExternalEntityReference) DeepCopy() *ExternalEntityReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalEntityReference.
func (*ExternalEntityReference) DeepCopyInto ¶ added in v0.8.0
func (in *ExternalEntityReference) DeepCopyInto(out *ExternalEntityReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GroupMember ¶ added in v0.8.0
type GroupMember struct { // Pod maintains the reference to the Pod. Pod *PodReference // ExternalEntity maintains the reference to the ExternalEntity. ExternalEntity *ExternalEntityReference // Endpoints maintains a list of EndPoints associated with this GroupMember. Endpoints []Endpoint }
GroupMember represents an resource member to be populated in Groups.
func (*GroupMember) DeepCopy ¶ added in v0.8.0
func (in *GroupMember) DeepCopy() *GroupMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMember.
func (*GroupMember) DeepCopyInto ¶ added in v0.8.0
func (in *GroupMember) DeepCopyInto(out *GroupMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GroupMemberPod ¶ added in v0.4.0
type GroupMemberPod struct { // Pod maintains the reference to the Pod. Pod *PodReference // IP maintains the IPAddress of the Pod. IP IPAddress // Ports maintain the list of named port associated with this Pod member. Ports []NamedPort }
GroupMemberPod represents a Pod related member to be populated in Groups.
func (*GroupMemberPod) DeepCopy ¶ added in v0.4.0
func (in *GroupMemberPod) DeepCopy() *GroupMemberPod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMemberPod.
func (*GroupMemberPod) DeepCopyInto ¶ added in v0.4.0
func (in *GroupMemberPod) DeepCopyInto(out *GroupMemberPod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GroupMemberPodSet ¶ added in v0.4.0
type GroupMemberPodSet map[groupMemberPodHash]*GroupMemberPod
GroupMemberPodSet is a set of GroupMemberPods.
func NewGroupMemberPodSet ¶ added in v0.4.0
func NewGroupMemberPodSet(items ...*GroupMemberPod) GroupMemberPodSet
NewGroupMemberPodSet builds a GroupMemberPodSet from a list of GroupMemberPod.
func (GroupMemberPodSet) DeepCopy ¶ added in v0.4.0
func (in GroupMemberPodSet) DeepCopy() GroupMemberPodSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMemberPodSet.
func (GroupMemberPodSet) DeepCopyInto ¶ added in v0.4.0
func (in GroupMemberPodSet) DeepCopyInto(out *GroupMemberPodSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (GroupMemberPodSet) Delete ¶ added in v0.4.0
func (s GroupMemberPodSet) Delete(items ...*GroupMemberPod)
Delete removes all items from the set.
func (GroupMemberPodSet) Difference ¶ added in v0.4.0
func (s GroupMemberPodSet) Difference(o GroupMemberPodSet) GroupMemberPodSet
Difference returns a set of Pod references that are not in o.
func (GroupMemberPodSet) Equal ¶ added in v0.4.0
func (s GroupMemberPodSet) Equal(o GroupMemberPodSet) bool
Equal returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)
func (GroupMemberPodSet) Has ¶ added in v0.4.0
func (s GroupMemberPodSet) Has(item *GroupMemberPod) bool
Has returns true if and only if item is contained in the set.
func (GroupMemberPodSet) Insert ¶ added in v0.4.0
func (s GroupMemberPodSet) Insert(items ...*GroupMemberPod)
Insert adds items to the set.
func (GroupMemberPodSet) IsSuperset ¶ added in v0.4.0
func (s GroupMemberPodSet) IsSuperset(o GroupMemberPodSet) bool
IsSuperset returns true if and only if s1 is a superset of s2.
func (GroupMemberPodSet) Union ¶ added in v0.4.0
func (s GroupMemberPodSet) Union(o GroupMemberPodSet) GroupMemberPodSet
Union returns a new set which includes items in either m or o.
type IPAddress ¶
type IPAddress []byte
IPAddress describes a single IP address. Either an IPv4 or IPv6 address must be set.
func (IPAddress) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddress.
func (IPAddress) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPBlock ¶
type IPBlock struct { // CIDR is an IPNet represents the IP Block. CIDR IPNet // Except is a slice of IPNets that should not be included within an IP Block. // Except values will be rejected if they are outside the CIDR range. // +optional Except []IPNet }
IPBlock describes a particular CIDR (Ex. "192.168.1.1/24"). The except entry describes CIDRs that should not be included within this rule.
func (*IPBlock) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPBlock.
func (*IPBlock) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPNet ¶
IPNet describes an IP network.
func (*IPNet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPNet.
func (*IPNet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamedPort ¶ added in v0.4.0
type NamedPort struct { // Port represents the Port number. Port int32 // Name represents the associated name with this Port number. Name string // Protocol for port. Must be UDP, TCP, or SCTP. Protocol Protocol }
NamedPort represents a Port with a name on Pod.
func (*NamedPort) DeepCopy ¶ added in v0.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedPort.
func (*NamedPort) DeepCopyInto ¶ added in v0.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkPolicy ¶
type NetworkPolicy struct { metav1.TypeMeta metav1.ObjectMeta // Rules is a list of rules to be applied to the selected Pods. Rules []NetworkPolicyRule // AppliedToGroups is a list of names of AppliedToGroups to which this policy applies. AppliedToGroups []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 }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object NetworkPolicy is the message format of antrea/pkg/controller/types.NetworkPolicy in an API response.
func (*NetworkPolicy) DeepCopy ¶
func (in *NetworkPolicy) DeepCopy() *NetworkPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.
func (*NetworkPolicy) DeepCopyInto ¶
func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkPolicy) DeepCopyObject ¶
func (in *NetworkPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkPolicyList ¶
type NetworkPolicyList struct { metav1.TypeMeta metav1.ListMeta Items []NetworkPolicy }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object NetworkPolicyList is a list of NetworkPolicy objects.
func (*NetworkPolicyList) DeepCopy ¶
func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.
func (*NetworkPolicyList) DeepCopyInto ¶
func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkPolicyList) DeepCopyObject ¶
func (in *NetworkPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkPolicyPeer ¶
type NetworkPolicyPeer struct { // A list of names of AddressGroups. AddressGroups []string // A list of IPBlock. IPBlocks []IPBlock }
NetworkPolicyPeer describes a peer of NetworkPolicyRules. It could be a list of names of AddressGroups and/or a list of IPBlock.
func (*NetworkPolicyPeer) DeepCopy ¶
func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyPeer.
func (*NetworkPolicyPeer) DeepCopyInto ¶
func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkPolicyRule ¶
type NetworkPolicyRule struct { // The direction of this rule. // If it's set to In, From must be set and To must not be set. // If it's set to Out, To must be set and From must not be set. Direction Direction // From represents sources which should be able to access the pods selected by the policy. From NetworkPolicyPeer // To represents destinations which should be able to be accessed by the pods selected by the policy. To NetworkPolicyPeer // Services is a list of services which should be matched. Services []Service // Priority defines the priority of the Rule as compared to other rules in the // NetworkPolicy. Priority int32 // Action specifies the action to be applied on the rule. i.e. Allow/Drop. An empty // action “nil” defaults to Allow action, which would be the case for rules created for // K8s Network Policy. Action *secv1alpha1.RuleAction }
NetworkPolicyRule describes a particular set of traffic that is allowed.
func (*NetworkPolicyRule) DeepCopy ¶
func (in *NetworkPolicyRule) DeepCopy() *NetworkPolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyRule.
func (*NetworkPolicyRule) DeepCopyInto ¶
func (in *NetworkPolicyRule) DeepCopyInto(out *NetworkPolicyRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodReference ¶
type PodReference struct { // The name of this pod. Name string // The namespace of this pod. Namespace string }
PodReference represents a Pod Reference.
func (*PodReference) DeepCopy ¶
func (in *PodReference) DeepCopy() *PodReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodReference.
func (*PodReference) DeepCopyInto ¶
func (in *PodReference) DeepCopyInto(out *PodReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Protocol ¶
type Protocol string
Protocol defines network protocols supported for things like container ports.
type Service ¶
type Service struct { // The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this // field defaults to TCP. // +optional Protocol *Protocol // The port name or number on the given protocol. If not specified, this matches all port numbers. // +optional Port *intstr.IntOrString }
Service describes a port to allow traffic on.
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.