Documentation ¶
Overview ¶
Package networkpolicy 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 IPAddress
- type IPBlock
- type IPNet
- 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 // IPAddresses is a list of IP addresses selected by this group. IPAddresses []IPAddress }
+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 AddedIPAddresses []IPAddress RemovedIPAddresses []IPAddress }
+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 []PodReference }
+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 []PodReference RemovedPods []PodReference }
+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 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 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 }
+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 }
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 on the given protocol. If not specified, this matches all port numbers. // +optional Port *int32 }
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.