v1

package
v0.0.0-...-6c366bb Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package v1 contains API Schema definitions for the network v1 API group +k8s:deepcopy-gen=package,register +groupName=k8s.ovn.org

Index

Constants

This section is empty.

Variables

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

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AdminPolicyBasedExternalRoute

type AdminPolicyBasedExternalRoute struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:validation:Required
	// +required
	Spec AdminPolicyBasedExternalRouteSpec `json:"spec"`
	// +optional
	Status AdminPolicyBasedRouteStatus `json:"status,omitempty"`
}

AdminPolicyBasedExternalRoute is a CRD allowing the cluster administrators to configure policies for external gateway IPs to be applied to all the pods contained in selected namespaces. Egress traffic from the pods that belong to the selected namespaces to outside the cluster is routed through these external gateway IPs. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:path=adminpolicybasedexternalroutes,scope=Cluster,shortName=apbexternalroute,singular=adminpolicybasedexternalroute +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Last Update",type="date",JSONPath=`.status.lastTransitionTime` +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.status`

func (*AdminPolicyBasedExternalRoute) DeepCopy

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

func (*AdminPolicyBasedExternalRoute) DeepCopyInto

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

func (*AdminPolicyBasedExternalRoute) DeepCopyObject

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

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

type AdminPolicyBasedExternalRouteList

type AdminPolicyBasedExternalRouteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AdminPolicyBasedExternalRoute `json:"items"`
}

AdminPolicyBasedExternalRouteList contains a list of AdminPolicyBasedExternalRoutes +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*AdminPolicyBasedExternalRouteList) DeepCopy

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

func (*AdminPolicyBasedExternalRouteList) DeepCopyInto

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

func (*AdminPolicyBasedExternalRouteList) DeepCopyObject

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

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

type AdminPolicyBasedExternalRouteSpec

type AdminPolicyBasedExternalRouteSpec struct {
	// From defines the selectors that will determine the target namespaces to this CR.
	From ExternalNetworkSource `json:"from"`
	// NextHops defines two types of hops: Static and Dynamic. Each hop defines at least one external gateway IP.
	NextHops ExternalNextHops `json:"nextHops"`
}

AdminPolicyBasedExternalRouteSpec defines the desired state of AdminPolicyBasedExternalRoute

func (*AdminPolicyBasedExternalRouteSpec) DeepCopy

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

func (*AdminPolicyBasedExternalRouteSpec) DeepCopyInto

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

type AdminPolicyBasedRouteStatus

type AdminPolicyBasedRouteStatus struct {
	// Captures the time when the last change was applied.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// An array of Human-readable messages indicating details about the status of the object.
	// +patchStrategy=merge
	// +listType=set
	// +optional
	Messages []string `json:"messages,omitempty"`
	// A concise indication of whether the AdminPolicyBasedRoute resource is applied with success
	// +optional
	Status StatusType `json:"status,omitempty"`
}

AdminPolicyBasedRouteStatus contains the observed status of the AdminPolicyBased route types.

func (*AdminPolicyBasedRouteStatus) DeepCopy

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

func (*AdminPolicyBasedRouteStatus) DeepCopyInto

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

type DynamicHop

type DynamicHop struct {
	// PodSelector defines the selector to filter the pods that are external gateways.
	// +kubebuilder:validation:Required
	// +required
	PodSelector metav1.LabelSelector `json:"podSelector"`
	// NamespaceSelector defines a selector to filter the namespaces where the pod gateways are located.
	// +kubebuilder:validation:Required
	// +required
	NamespaceSelector metav1.LabelSelector `json:"namespaceSelector"`
	// NetworkAttachmentName determines the multus network name to use when retrieving the pod IPs that will be used as the gateway IP.
	// When this field is empty, the logic assumes that the pod is configured with HostNetwork and is using the node's IP as gateway.
	// +optional
	// +kubebuilder:default=""
	// +default=""
	NetworkAttachmentName string `json:"networkAttachmentName,omitempty"`
	// BFDEnabled determines if the interface implements the Bidirectional Forward Detection protocol. Defaults to false.
	// +optional
	// +kubebuilder:default:=false
	// +default=false
	BFDEnabled bool `json:"bfdEnabled,omitempty"`
}

DynamicHop defines the configuration for a dynamic external gateway interface. These interfaces are wrapped around a pod object that resides inside the cluster. The field NetworkAttachmentName captures the name of the multus network name to use when retrieving the gateway IP to use. The PodSelector and the NamespaceSelector are mandatory fields.

func (*DynamicHop) DeepCopy

func (in *DynamicHop) DeepCopy() *DynamicHop

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

func (*DynamicHop) DeepCopyInto

func (in *DynamicHop) DeepCopyInto(out *DynamicHop)

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

type ExternalNetworkSource

type ExternalNetworkSource struct {
	// NamespaceSelector defines a selector to be used to determine which namespaces will be targeted by this CR
	NamespaceSelector metav1.LabelSelector `json:"namespaceSelector"`
}

ExternalNetworkSource contains the selectors used to determine the namespaces where the policy will be applied to

func (*ExternalNetworkSource) DeepCopy

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

func (*ExternalNetworkSource) DeepCopyInto

func (in *ExternalNetworkSource) DeepCopyInto(out *ExternalNetworkSource)

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

type ExternalNextHops

type ExternalNextHops struct {
	// StaticHops defines a slice of StaticHop. This field is optional.
	StaticHops []*StaticHop `json:"static,omitempty"`
	//DynamicHops defines a slices of DynamicHop. This field is optional.
	DynamicHops []*DynamicHop `json:"dynamic,omitempty"`
}

+kubebuilder:validation:MinProperties:=1 ExternalNextHops contains slices of StaticHops and DynamicHops structures. Minimum is one StaticHop or one DynamicHop.

func (*ExternalNextHops) DeepCopy

func (in *ExternalNextHops) DeepCopy() *ExternalNextHops

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

func (*ExternalNextHops) DeepCopyInto

func (in *ExternalNextHops) DeepCopyInto(out *ExternalNextHops)

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

type StaticHop

type StaticHop struct {
	//IP defines the static IP to be used for egress traffic. The IP can be either IPv4 or IPv6.
	// + Regex taken from: https://blog.markhatton.co.uk/2011/03/15/regular-expressions-for-ip-addresses-cidr-ranges-and-hostnames/
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*`
	// +required
	IP string `json:"ip"`
	// BFDEnabled determines if the interface implements the Bidirectional Forward Detection protocol. Defaults to false.
	// +optional
	// +kubebuilder:default:=false
	// +default=false
	BFDEnabled bool `json:"bfdEnabled,omitempty"`
}

StaticHop defines the configuration of a static IP that acts as an external Gateway Interface. IP field is mandatory.

func (*StaticHop) DeepCopy

func (in *StaticHop) DeepCopy() *StaticHop

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

func (*StaticHop) DeepCopyInto

func (in *StaticHop) DeepCopyInto(out *StaticHop)

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

type StatusType

type StatusType string

StatusType defines the types of status used in the Status field. The value determines if the deployment of the CR was successful or if it failed.

const (
	SuccessStatus StatusType = "Success"
	FailStatus    StatusType = "Fail"
)

Directories

Path Synopsis
apis
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/adminpolicybasedroute/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/adminpolicybasedroute/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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