Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bindings v1alpha1 API group +kubebuilder:object:generate=true +groupName=bindings.k8s.ngrok.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "bindings.k8s.ngrok.com", Version: "v1alpha1"} // 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 BindingEndpoint ¶
type BindingEndpoint struct { // Ref is the ngrok API reference to the Endpoint object (id, uri) v6.Ref `json:",inline"` // +kubebuilder:validation:Required // +kube:validation:Enum=provisioning;bound;denied;error;unknown // +kubebuilder:default="unknown" Status BindingEndpointStatus `json:"status"` // ErrorCode is the ngrok API error code if the status is error // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern=`^ERR_NGROK_\d+$` // TODO(hkatz) Define error codes and implement in the API ErrorCode string `json:"errorCode,omitempty"` // ErrorMessage is a free-form error message if the status is error // +kubebuilder:validation:Optional // +kubebuilder:validation:MaxLength=4096 ErrorMessage string `json:"errorMessage,omitempty"` }
BindingEndpoint is a reference to an Endpoint object in the ngrok API that is attached to the kubernetes operator binding
func (*BindingEndpoint) DeepCopy ¶
func (in *BindingEndpoint) DeepCopy() *BindingEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingEndpoint.
func (*BindingEndpoint) DeepCopyInto ¶
func (in *BindingEndpoint) DeepCopyInto(out *BindingEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BindingEndpointStatus ¶
type BindingEndpointStatus string
BindingEndpointStatus is an enum that represents the status of a BindingEndpoint TODO(https://github.com/ngrok-private/ngrok/issues/32666) +kubebuilder:validation:Enum=unknown;provisioning;denied;bound;error
const ( StatusUnknown BindingEndpointStatus = "unknown" StatusProvisioning BindingEndpointStatus = "provisioning" StatusDenied BindingEndpointStatus = "denied" StatusBound BindingEndpointStatus = "bound" StatusError BindingEndpointStatus = "error" )
type BoundEndpoint ¶
type BoundEndpoint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BoundEndpointSpec `json:"spec,omitempty"` Status BoundEndpointStatus `json:"status,omitempty"` }
BoundEndpoint is the Schema for the boundendpoints API +kubebuilder:printcolumn:name="URI",type="string",JSONPath=".spec.endpointURI" +kubebuilder:printcolumn:name="Port",type="string",JSONPath=".spec.port" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.endpoints[0].status" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"
func (*BoundEndpoint) DeepCopy ¶
func (in *BoundEndpoint) DeepCopy() *BoundEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoundEndpoint.
func (*BoundEndpoint) DeepCopyInto ¶
func (in *BoundEndpoint) DeepCopyInto(out *BoundEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BoundEndpoint) DeepCopyObject ¶
func (in *BoundEndpoint) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BoundEndpointList ¶
type BoundEndpointList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BoundEndpoint `json:"items"` }
BoundEndpointList contains a list of BoundEndpoint
func (*BoundEndpointList) DeepCopy ¶
func (in *BoundEndpointList) DeepCopy() *BoundEndpointList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoundEndpointList.
func (*BoundEndpointList) DeepCopyInto ¶
func (in *BoundEndpointList) DeepCopyInto(out *BoundEndpointList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BoundEndpointList) DeepCopyObject ¶
func (in *BoundEndpointList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BoundEndpointSpec ¶
type BoundEndpointSpec struct { // Allowed is a flag that determines if the BoundEndpoint is allowed to be projected into the cluster // This is controlled by the KubernetesOperator CRD .spec.allowedURLs field // +kubebuilder:validation:Required Allowed bool `json:"allowed"` // EndpointURI is the unique identifier // representing the BoundEndpoint + its Endpoints // Format: <scheme>://<service>.<namespace>:<port> // // +kubebuilder:validation:Required // See: https://regex101.com/r/9QkXWl/1 // +kubebuilder:validation:Pattern=`^((?P<scheme>(tcp|http|https|tls)?)://)?(?P<service>[a-z][a-zA-Z0-9-]{0,62})\.(?P<namespace>[a-z][a-zA-Z0-9-]{0,62})(:(?P<port>\d+))?$` EndpointURI string `json:"endpointURI"` // Scheme is a user-defined field for endpoints that describe how the data packets // are framed by the pod forwarders mTLS connection to the ngrok edge // +kubebuilder:validation:Required // +kubebuilder:default=`https` // +kubebuilder:validation:Enum=tcp;http;https;tls Scheme string `json:"scheme"` // Port is the Service port this Endpoint uses internally to communicate with its Upstream Service // +kubebuilder:validation:Required Port uint16 `json:"port"` // EndpointTarget is the target Service that this Endpoint projects // +kubebuilder:validation:Required Target EndpointTarget `json:"target"` }
BoundEndpointSpec defines the desired state of BoundEndpoint
func (*BoundEndpointSpec) DeepCopy ¶
func (in *BoundEndpointSpec) DeepCopy() *BoundEndpointSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoundEndpointSpec.
func (*BoundEndpointSpec) DeepCopyInto ¶
func (in *BoundEndpointSpec) DeepCopyInto(out *BoundEndpointSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BoundEndpointStatus ¶
type BoundEndpointStatus struct { // Endpoints is the list of BindingEndpoints that are created for this BoundEndpoint // // Note: The collection of Endpoints per Binding are Many-to-One // The uniqueness of each Endpoint is not ID, but rather the 4-tuple <scheme,service-name,namespace,port> // All Endpoints bound to a BoundEndpoint will share the same 4-tuple, statuses, errors, etc... // this is because BoundEndpoint represents 1 Service, yet many Endpoints // // +kubebuilder:validation:Required Endpoints []BindingEndpoint `json:"endpoints"` // HashName is the hashed output of the TargetService and TargetNamespace for unique identification // +kubebuilder:validation:Required HashedName string `json:"hashedName"` }
BoundEndpointStatus defines the observed state of BoundEndpoint
func (*BoundEndpointStatus) DeepCopy ¶
func (in *BoundEndpointStatus) DeepCopy() *BoundEndpointStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoundEndpointStatus.
func (*BoundEndpointStatus) DeepCopyInto ¶
func (in *BoundEndpointStatus) DeepCopyInto(out *BoundEndpointStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointTarget ¶
type EndpointTarget struct { // Service is the name of the Service that this Endpoint projects // +kubebuilder:validation:Required Service string `json:"service"` // Namespace is the destination Namespace for the Service this Endpoint projects // +kubebuilder:validation:Required Namespace string `json:"namespace"` // Protocol is the Service protocol this Endpoint uses // +kubebuilder:validation:Required // +kubebuilder:default=`TCP` // +kubebuilder:validation:Enum=TCP Protocol string `json:"protocol"` // Port is the Service targetPort this Endpoint's Target Service uses for requests // +kubebuilder:validation:Required Port int32 `json:"port"` // Metadata is a subset of metav1.ObjectMeta that is added to the Service // +kube:validation:Optional Metadata TargetMetadata `json:"metadata,omitempty"` }
EndpointTarget hold the data for the projected Service that binds the endpoint to the k8s cluster resource
func (*EndpointTarget) DeepCopy ¶
func (in *EndpointTarget) DeepCopy() *EndpointTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointTarget.
func (*EndpointTarget) DeepCopyInto ¶
func (in *EndpointTarget) DeepCopyInto(out *EndpointTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetMetadata ¶
type TargetMetadata struct { // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels // +kubebuilder:validation:Optional Labels map[string]string `json:"labels,omitempty"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations // +kubebuilder:validation:Optional Annotations map[string]string `json:"annotations,omitempty"` }
TargetMetadata is a subset of metav1.ObjectMeta that is used to define the target object in the k8s cluster +kubebuilder:object:generate=true
func (*TargetMetadata) DeepCopy ¶
func (in *TargetMetadata) DeepCopy() *TargetMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetMetadata.
func (*TargetMetadata) DeepCopyInto ¶
func (in *TargetMetadata) DeepCopyInto(out *TargetMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.