v1alpha2

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const GroupName = "crd.antrea.io"

GroupName is the group name used in this package.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterWebhook

func RegisterWebhook(in runtime.Object, webhook WebhookImpl) error

RegisterWebhook registers webhook implementation of a resource.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type AppliedTo

type AppliedTo struct {
	// Select Pods matched by this selector. If set with NamespaceSelector,
	// Pods are matched from Namespaces matched by the NamespaceSelector;
	// otherwise, Pods are matched from all Namespaces.
	// +optional
	PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
	// Select all Pods from Namespaces matched by this selector. If set with
	// PodSelector, Pods are matched from Namespaces matched by the
	// NamespaceSelector.
	// +optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
	// Groups is the set of ClusterGroup names.
	// +optional
	Groups []string `json:"groups,omitempty"`
}

AppliedTo selects the entities to which a policy is applied.

func (*AppliedTo) DeepCopy

func (in *AppliedTo) DeepCopy() *AppliedTo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedTo.

func (*AppliedTo) DeepCopyInto

func (in *AppliedTo) DeepCopyInto(out *AppliedTo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterGroup

type ClusterGroup struct {
	metav1.TypeMeta `json:",inline"`
	// Standard metadata of the object.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Desired state of the group.
	Spec GroupSpec `json:"spec"`
	// Most recently observed status of the group.
	Status GroupStatus `json:"status"`
}

func (*ClusterGroup) DeepCopy

func (in *ClusterGroup) DeepCopy() *ClusterGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroup.

func (*ClusterGroup) DeepCopyInto

func (in *ClusterGroup) DeepCopyInto(out *ClusterGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterGroup) DeepCopyObject

func (in *ClusterGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterGroupList

type ClusterGroupList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []ClusterGroup `json:"items,omitempty"`
}

func (*ClusterGroupList) DeepCopy

func (in *ClusterGroupList) DeepCopy() *ClusterGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterGroupList.

func (*ClusterGroupList) DeepCopyInto

func (in *ClusterGroupList) DeepCopyInto(out *ClusterGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterGroupList) DeepCopyObject

func (in *ClusterGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterGroupReference

type ClusterGroupReference string

ClusterGroupReference represent reference to a ClusterGroup.

type Egress

type Egress struct {
	metav1.TypeMeta `json:",inline"`
	// Standard metadata of the object.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of Egress.
	Spec EgressSpec `json:"spec"`

	// EgressStatus represents the current status of an Egress.
	Status EgressStatus `json:"status"`
}

Egress defines which egress (SNAT) IP the traffic from the selected Pods to the external network should use.

func (*Egress) DeepCopy

func (in *Egress) DeepCopy() *Egress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Egress.

func (*Egress) DeepCopyInto

func (in *Egress) DeepCopyInto(out *Egress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Egress) DeepCopyObject

func (in *Egress) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EgressList

type EgressList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Egress `json:"items"`
}

func (*EgressList) DeepCopy

func (in *EgressList) DeepCopy() *EgressList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressList.

func (*EgressList) DeepCopyInto

func (in *EgressList) DeepCopyInto(out *EgressList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EgressList) DeepCopyObject

func (in *EgressList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EgressSpec

type EgressSpec struct {
	// AppliedTo selects Pods to which the Egress will be applied.
	AppliedTo AppliedTo `json:"appliedTo"`
	// EgressIP specifies the SNAT IP address for the selected workloads.
	// If ExternalIPPool is empty, it must be specified manually.
	// If ExternalIPPool is non-empty, it can be empty and will be assigned by Antrea automatically.
	// If both ExternalIPPool and EgressIP are non-empty, the IP must be in the pool.
	EgressIP string `json:"egressIP,omitempty"`
	// ExternalIPPool specifies the IP Pool that the EgressIP should be allocated from.
	// If it is empty, the specified EgressIP must be assigned to a Node manually.
	// If it is non-empty, the EgressIP will be assigned to a Node specified by the pool automatically and will failover
	// to a different Node when the Node becomes unreachable.
	ExternalIPPool string `json:"externalIPPool"`
}

EgressSpec defines the desired state for Egress.

func (*EgressSpec) DeepCopy

func (in *EgressSpec) DeepCopy() *EgressSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressSpec.

func (*EgressSpec) DeepCopyInto

func (in *EgressSpec) DeepCopyInto(out *EgressSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EgressStatus added in v1.2.0

type EgressStatus struct {
	// The name of the Node that holds the Egress IP.
	EgressNode string `json:"egressNode"`
}

EgressStatus represents the current status of an Egress.

func (*EgressStatus) DeepCopy added in v1.2.0

func (in *EgressStatus) DeepCopy() *EgressStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressStatus.

func (*EgressStatus) DeepCopyInto added in v1.2.0

func (in *EgressStatus) DeepCopyInto(out *EgressStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Endpoint

type Endpoint struct {
	// IP associated with this endpoint.
	IP string `json:"ip,omitempty"`
	// Name identifies this endpoint. Could be the network interface name in case of VMs.
	// +optional
	Name string `json:"name,omitempty"`
}

Endpoint refers to an endpoint associated with the ExternalEntity.

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalEntity

type ExternalEntity struct {
	metav1.TypeMeta `json:",inline"`
	// Standard metadata of the object.
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Desired state of the external entity.
	Spec ExternalEntitySpec `json:"spec,omitempty"`
}

func (*ExternalEntity) DeepCopy

func (in *ExternalEntity) DeepCopy() *ExternalEntity

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalEntity.

func (*ExternalEntity) DeepCopyInto

func (in *ExternalEntity) DeepCopyInto(out *ExternalEntity)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalEntity) DeepCopyObject

func (in *ExternalEntity) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalEntity) Default

func (in *ExternalEntity) Default()

Default implements webhook Defaulter.

func (*ExternalEntity) ValidateCreate

func (in *ExternalEntity) ValidateCreate() error

ValidateCreate implements webhook Validator.

func (*ExternalEntity) ValidateDelete

func (in *ExternalEntity) ValidateDelete() error

ValidateDelete implements webhook Validator.

func (*ExternalEntity) ValidateUpdate

func (in *ExternalEntity) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook Validator.

type ExternalEntityList

type ExternalEntityList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []ExternalEntity `json:"items,omitempty"`
}

func (*ExternalEntityList) DeepCopy

func (in *ExternalEntityList) DeepCopy() *ExternalEntityList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalEntityList.

func (*ExternalEntityList) DeepCopyInto

func (in *ExternalEntityList) DeepCopyInto(out *ExternalEntityList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalEntityList) DeepCopyObject

func (in *ExternalEntityList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExternalEntitySpec

type ExternalEntitySpec struct {
	// Endpoints is a list of external endpoints associated with this entity.
	Endpoints []Endpoint `json:"endpoints,omitempty"`
	// Ports maintain the list of named ports.
	Ports []NamedPort `json:"ports,omitempty"`
	// ExternalNode is the opaque identifier of the agent/controller responsible
	// for additional processing or handling of this external entity.
	ExternalNode string `json:"externalNode,omitempty"`
}

ExternalEntitySpec defines the desired state for ExternalEntity.

func (*ExternalEntitySpec) DeepCopy

func (in *ExternalEntitySpec) DeepCopy() *ExternalEntitySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalEntitySpec.

func (*ExternalEntitySpec) DeepCopyInto

func (in *ExternalEntitySpec) DeepCopyInto(out *ExternalEntitySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalIPPool added in v1.2.0

type ExternalIPPool struct {
	metav1.TypeMeta `json:",inline"`
	// Standard metadata of the object.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the ExternalIPPool.
	Spec ExternalIPPoolSpec `json:"spec"`
}

ExternalIPPool defines one or multiple IP sets that can be used in the external network. For instance, the IPs can be allocated to the Egress resources as the Egress IPs.

func (*ExternalIPPool) DeepCopy added in v1.2.0

func (in *ExternalIPPool) DeepCopy() *ExternalIPPool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPPool.

func (*ExternalIPPool) DeepCopyInto added in v1.2.0

func (in *ExternalIPPool) DeepCopyInto(out *ExternalIPPool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalIPPool) DeepCopyObject added in v1.2.0

func (in *ExternalIPPool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExternalIPPoolList added in v1.2.0

type ExternalIPPoolList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []ExternalIPPool `json:"items"`
}

func (*ExternalIPPoolList) DeepCopy added in v1.2.0

func (in *ExternalIPPoolList) DeepCopy() *ExternalIPPoolList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPPoolList.

func (*ExternalIPPoolList) DeepCopyInto added in v1.2.0

func (in *ExternalIPPoolList) DeepCopyInto(out *ExternalIPPoolList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalIPPoolList) DeepCopyObject added in v1.2.0

func (in *ExternalIPPoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ExternalIPPoolSpec added in v1.2.0

type ExternalIPPoolSpec struct {
	// The IP ranges of this IP pool, e.g. 10.10.0.0/24, 10.10.10.2-10.10.10.20, 10.10.10.30-10.10.10.30.
	IPRanges []IPRange `json:"ipRanges"`
	// The Nodes that the external IPs can be assigned to. If empty, it means all Nodes.
	NodeSelector metav1.LabelSelector `json:"nodeSelector"`
}

func (*ExternalIPPoolSpec) DeepCopy added in v1.2.0

func (in *ExternalIPPoolSpec) DeepCopy() *ExternalIPPoolSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPPoolSpec.

func (*ExternalIPPoolSpec) DeepCopyInto added in v1.2.0

func (in *ExternalIPPoolSpec) DeepCopyInto(out *ExternalIPPoolSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupCondition

type GroupCondition struct {
	Type               GroupConditionType `json:"type"`
	Status             v1.ConditionStatus `json:"status"`
	LastTransitionTime metav1.Time        `json:"lastTransitionTime,omitempty"`
}

func (*GroupCondition) DeepCopy

func (in *GroupCondition) DeepCopy() *GroupCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupCondition.

func (*GroupCondition) DeepCopyInto

func (in *GroupCondition) DeepCopyInto(out *GroupCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupConditionType

type GroupConditionType string
const GroupMembersComputed GroupConditionType = "GroupMembersComputed"

type GroupSpec

type GroupSpec struct {
	// Select Pods matching the labels set in the PodSelector in
	// AppliedTo/To/From fields. If set with NamespaceSelector, Pods are
	// matched from Namespaces matched by the NamespaceSelector.
	// Cannot be set with any other selector except NamespaceSelector.
	// +optional
	PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
	// Select all Pods from Namespaces matched by this selector, as
	// workloads in AppliedTo/To/From fields. If set with PodSelector,
	// Pods are matched from Namespaces matched by the NamespaceSelector.
	// Cannot be set with any other selector except PodSelector.
	// +optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
	// IPBlock describes the IPAddresses/IPBlocks that is matched in to/from.
	// IPBlock cannot be set as part of the AppliedTo field.
	// Cannot be set with any other selector or ServiceReference.
	// Cannot be set with IPBlocks.
	// +optional
	IPBlock *v1alpha1.IPBlock `json:"ipBlock,omitempty"`
	// IPBlocks is a list of IPAddresses/IPBlocks that is matched in to/from.
	// IPBlock cannot be set as part of the AppliedTo field.
	// Cannot be set with any other selector or ServiceReference.
	// Cannot be set with IPBlock.
	// +optional
	IPBlocks []v1alpha1.IPBlock `json:"ipBlocks,omitempty"`
	// Select backend Pods of the referred Service.
	// Cannot be set with any other selector or ipBlock.
	// +optional
	ServiceReference *ServiceReference `json:"serviceReference,omitempty"`
	// Select ExternalEntities from all Namespaces as workloads
	// in AppliedTo/To/From fields. If set with NamespaceSelector,
	// ExternalEntities are matched from Namespaces matched by the
	// NamespaceSelector.
	// Cannot be set with any other selector except NamespaceSelector.
	// +optional
	ExternalEntitySelector *metav1.LabelSelector `json:"externalEntitySelector,omitempty"`
	// Select other ClusterGroups by name. The ClusterGroups must already
	// exist and must not contain ChildGroups themselves.
	// Cannot be set with any selector/IPBlock/ServiceReference.
	// +optional
	ChildGroups []ClusterGroupReference `json:"childGroups,omitempty"`
}

func (*GroupSpec) DeepCopy

func (in *GroupSpec) DeepCopy() *GroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSpec.

func (*GroupSpec) DeepCopyInto

func (in *GroupSpec) DeepCopyInto(out *GroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupStatus

type GroupStatus struct {
	Conditions []GroupCondition `json:"conditions,omitempty"`
}

GroupStatus represents information about the status of a Group.

func (*GroupStatus) DeepCopy

func (in *GroupStatus) DeepCopy() *GroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupStatus.

func (*GroupStatus) DeepCopyInto

func (in *GroupStatus) DeepCopyInto(out *GroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPRange added in v1.2.0

type IPRange struct {
	// The CIDR of this range, e.g. 10.10.10.0/24.
	CIDR string `json:"cidr,omitempty"`
	// The start IP of the range, e.g. 10.10.20.5, inclusive.
	Start string `json:"start,omitempty"`
	// The end IP of the range, e.g. 10.10.20.20, inclusive.
	End string `json:"end,omitempty"`
}

IPRange is a set of contiguous IP addresses, represented by a CIDR or a pair of start and end IPs.

func (*IPRange) DeepCopy added in v1.2.0

func (in *IPRange) DeepCopy() *IPRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRange.

func (*IPRange) DeepCopyInto added in v1.2.0

func (in *IPRange) DeepCopyInto(out *IPRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamedPort

type NamedPort struct {
	// The protocol (TCP, UDP, or SCTP) which traffic must match.
	// If not specified, this field defaults to TCP.
	// +optional
	Protocol v1.Protocol `json:"protocol,omitempty"`
	// The port on the given protocol.
	// +optional
	Port int32 `json:"port,omitempty"`
	// Name associated with the Port.
	// +optional
	Name string `json:"name,omitempty"`
}

NamedPort describes the port and protocol to match in a rule.

func (*NamedPort) DeepCopy

func (in *NamedPort) DeepCopy() *NamedPort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedPort.

func (*NamedPort) DeepCopyInto

func (in *NamedPort) DeepCopyInto(out *NamedPort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceReference

type ServiceReference struct {
	// Name of the Service
	Name string `json:"name,omitempty"`
	// Namespace of the Service
	Namespace string `json:"namespace,omitempty"`
}

ServiceReference represent reference to a v1.Service.

func (*ServiceReference) DeepCopy

func (in *ServiceReference) DeepCopy() *ServiceReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.

func (*ServiceReference) DeepCopyInto

func (in *ServiceReference) DeepCopyInto(out *ServiceReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookImpl

type WebhookImpl interface {
	Default(in *ExternalEntity)
	ValidateCreate(in *ExternalEntity) error
	ValidateUpdate(in *ExternalEntity, old runtime.Object) error
	ValidateDelete(in *ExternalEntity) error
}

WebhookImpl implements webhook validator of a resource.

Jump to

Keyboard shortcuts

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