Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group +kubebuilder:object:generate=true +groupName=networking.openfunction.io
Index ¶
- Constants
- Variables
- type Condition
- type Gateway
- func (in *Gateway) DeepCopy() *Gateway
- func (in *Gateway) DeepCopyInto(out *Gateway)
- func (in *Gateway) DeepCopyObject() runtime.Object
- func (r *Gateway) Default()
- func (r *Gateway) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Gateway) Validate() error
- func (r *Gateway) ValidateCreate() error
- func (r *Gateway) ValidateDelete() error
- func (r *Gateway) ValidateUpdate(old runtime.Object) error
- type GatewayDef
- type GatewayList
- type GatewayRef
- type GatewaySpec
- type GatewayStatus
- type K8sGatewaySpec
- type ListenerStatus
Constants ¶
const ( DefaultHttpListenersCount = 1 DefaultHttpListenerName = "ofn-http-internal" GatewayConfigAnnotation = "networking.openfunction.io/last-applied-configuration" GatewayListenersAnnotation = "networking.openfunction.io/injected-listeners" DefaultGatewayServiceName = "gateway" DefaultK8sGatewayServiceName = "envoy" )
const ( GatewayReasonNotFound k8sgatewayapiv1alpha2.GatewayConditionReason = "NotFound" GatewayReasonCreationFailure k8sgatewayapiv1alpha2.GatewayConditionReason = "CreationFailure" GatewayReasonResourcesAvailable k8sgatewayapiv1alpha2.GatewayConditionReason = "ResourcesAvailable" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "networking.openfunction.io", Version: "v1alpha1"} // SchemeGroupVersion is group version used to register these objects // added for generated clientset SchemeGroupVersion = GroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { Type string `json:"type" protobuf:"bytes,1,opt,name=type"` Status metav1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` Message string `json:"message" protobuf:"bytes,6,opt,name=message"` }
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Gateway ¶
type Gateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GatewaySpec `json:"spec,omitempty"` Status GatewayStatus `json:"status,omitempty"` }
Gateway is the Schema for the gateways API
func (*Gateway) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway.
func (*Gateway) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Gateway) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Gateway) Default ¶
func (r *Gateway) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Gateway) SetupWebhookWithManager ¶
func (*Gateway) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Gateway) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type GatewayDef ¶
type GatewayDef struct { // Name is the name of the referent. // It refers to the name of a k8s Gateway resource. // // +optional // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 Name string `json:"name,omitempty"` // Namespace is the namespace of the referent. // // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 Namespace string `json:"namespace"` // GatewayClassName used for this Gateway. // This is the name of a GatewayClass resource. GatewayClassName k8sgatewayapiv1alpha2.ObjectName `json:"gatewayClassName"` }
func (*GatewayDef) DeepCopy ¶
func (in *GatewayDef) DeepCopy() *GatewayDef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayDef.
func (*GatewayDef) DeepCopyInto ¶
func (in *GatewayDef) DeepCopyInto(out *GatewayDef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayList ¶
type GatewayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Gateway `json:"items"` }
GatewayList contains a list of Gateway
func (*GatewayList) DeepCopy ¶
func (in *GatewayList) DeepCopy() *GatewayList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayList.
func (*GatewayList) DeepCopyInto ¶
func (in *GatewayList) DeepCopyInto(out *GatewayList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayList) DeepCopyObject ¶
func (in *GatewayList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GatewayRef ¶
type GatewayRef struct { // Name is the name of the referent. // It refers to the name of a k8s Gateway resource. // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 Name string `json:"name"` // Namespace is the namespace of the referent. // It refers to a k8s namespace. // // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 Namespace string `json:"namespace"` }
func (*GatewayRef) DeepCopy ¶
func (in *GatewayRef) DeepCopy() *GatewayRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayRef.
func (*GatewayRef) DeepCopyInto ¶
func (in *GatewayRef) DeepCopyInto(out *GatewayRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewaySpec ¶
type GatewaySpec struct { // Used to generate the hostname field of gatewaySpec.listeners.openfunction.hostname Domain string `json:"domain"` // Used to generate the hostname field of gatewaySpec.listeners.openfunction.hostname // // +optional // +kubebuilder:default="cluster.local" ClusterDomain string `json:"clusterDomain,omitempty"` // Used to generate the hostname of attaching HTTPRoute // // +optional // +kubebuilder:default="{{.Name}}.{{.Namespace}}.{{.Domain}}" HostTemplate string `json:"hostTemplate,omitempty"` // Used to generate the path of attaching HTTPRoute // // +optional // +kubebuilder:default="{{.Namespace}}/{{.Name}}" PathTemplate string `json:"pathTemplate,omitempty"` // Label key to add to the HTTPRoute generated by function // The value will be the `gateway.openfunction.openfunction.io` CR's namespaced name // // +optional // +kubebuilder:default="app.kubernetes.io/managed-by" HttpRouteLabelKey string `json:"httpRouteLabelKey,omitempty"` // Reference to an existing K8s gateway // // +optional GatewayRef *GatewayRef `json:"gatewayRef,omitempty"` // Definition to a new K8s gateway // // +optional GatewayDef *GatewayDef `json:"gatewayDef,omitempty"` // GatewaySpec defines the desired state of k8s Gateway. GatewaySpec K8sGatewaySpec `json:"gatewaySpec"` }
GatewaySpec defines the desired state of Gateway
func (*GatewaySpec) DeepCopy ¶
func (in *GatewaySpec) DeepCopy() *GatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewaySpec.
func (*GatewaySpec) DeepCopyInto ¶
func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayStatus ¶
type GatewayStatus struct { Addresses []k8sgatewayapiv1alpha2.GatewayAddress `json:"addresses,omitempty"` // Conditions describe the current conditions of the Gateway. // // Known condition types are: // // * "Scheduled" // * "Ready" // // +optional // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=8 // +kubebuilder:default={{type: "Scheduled", status: "Unknown", reason:"NotReconciled", message:"Waiting for controller"}} Conditions []Condition `json:"conditions,omitempty"` // Listeners provide status for each unique listener port defined in the Spec. // // +optional // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=64 Listeners []ListenerStatus `json:"listeners,omitempty"` }
GatewayStatus defines the observed state of Gateway
func (*GatewayStatus) DeepCopy ¶
func (in *GatewayStatus) DeepCopy() *GatewayStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayStatus.
func (*GatewayStatus) DeepCopyInto ¶
func (in *GatewayStatus) DeepCopyInto(out *GatewayStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type K8sGatewaySpec ¶
type K8sGatewaySpec struct { // Listeners associated with this Gateway. Listeners define // logical endpoints that are bound on this Gateway's addresses. // At least one Listener MUST be specified. // // Each listener in a Gateway must have a unique combination of Hostname, // Port, and Protocol. // // +listType=map // +listMapKey=name // +kubebuilder:validation:MinItems=1 Listeners []k8sgatewayapiv1alpha2.Listener `json:"listeners"` }
func (*K8sGatewaySpec) DeepCopy ¶
func (in *K8sGatewaySpec) DeepCopy() *K8sGatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sGatewaySpec.
func (*K8sGatewaySpec) DeepCopyInto ¶
func (in *K8sGatewaySpec) DeepCopyInto(out *K8sGatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ListenerStatus ¶
type ListenerStatus struct { // Name is the name of the Listener that this status corresponds to. Name k8sgatewayapiv1alpha2.SectionName `json:"name"` // SupportedKinds is the list indicating the Kinds supported by this // listener. This MUST represent the kinds an implementation supports for // that Listener configuration. // // If kinds are specified in Spec that are not supported, they MUST NOT // appear in this list and an implementation MUST set the "ResolvedRefs" // condition to "False" with the "InvalidRouteKinds" reason. If both valid // and invalid Route kinds are specified, the implementation MUST // reference the valid Route kinds that have been specified. // // +kubebuilder:validation:MaxItems=8 SupportedKinds []k8sgatewayapiv1alpha2.RouteGroupKind `json:"supportedKinds"` // AttachedRoutes represents the total number of Routes that have been // successfully attached to this Listener. AttachedRoutes int32 `json:"attachedRoutes"` // Conditions describe the current condition of this listener. // // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=8 Conditions []Condition `json:"conditions"` }
func (*ListenerStatus) DeepCopy ¶
func (in *ListenerStatus) DeepCopy() *ListenerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerStatus.
func (*ListenerStatus) DeepCopyInto ¶
func (in *ListenerStatus) DeepCopyInto(out *ListenerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.