Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the gateway v1alpha1 API group +kubebuilder:object:generate=true +groupName=gateway.kusk.io
Index ¶
- Constants
- Variables
- type API
- type APIList
- type APIMutator
- type APISpec
- type APIStatus
- type APIValidator
- type AccessLoggingConfig
- type Action
- type EnvoyFleet
- type EnvoyFleetID
- type EnvoyFleetList
- type EnvoyFleetMutator
- type EnvoyFleetSpec
- type EnvoyFleetStatus
- type EnvoyFleetValidator
- type Methods
- type Path
- type Route
- type ServiceConfig
- type StaticRoute
- type StaticRouteList
- type StaticRouteMutator
- type StaticRouteSpec
- type StaticRouteStatus
- type StaticRouteValidator
- type TLS
- type TLSSecrets
Constants ¶
const ( APIMutatingWebhookPath string = "/mutate-gateway-kusk-io-v1alpha1-api" APIValidatingWebhookPath string = "/validate-gateway-kusk-io-v1alpha1-api" )
const ( EnvoyFleetMutatingWebhookPath = "/mutate-gateway-kusk-io-v1alpha1-envoyfleet" EnvoyFleetValidatingWebhookPath = "/validate-gateway-kusk-io-v1alpha1-envoyfleet" )
const ( StaticRouteMutatingWebhookPath string = "/mutate-gateway-kusk-io-v1alpha1-staticroute" StaticRouteValidatingWebhookPath string = "/validate-gateway-kusk-io-v1alpha1-staticroute" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "gateway.kusk.io", 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 API ¶
type API struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec APISpec `json:"spec"` Status APIStatus `json:"status,omitempty"` }
API is the Schema for the apis API
func (*API) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new API.
func (*API) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*API) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type APIList ¶
type APIList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []API `json:"items"` }
APIList contains a list of API
func (*APIList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIList.
func (*APIList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*APIList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type APIMutator ¶
APIMutator handles API objects defaulting and any additional mutation. +kubebuilder:object:generate:=false
func (*APIMutator) InjectDecoder ¶
func (a *APIMutator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type APISpec ¶
type APISpec struct { // +optional // Fleet represents EnvoyFleet ID, which is deployed EnvoyFleet CustomResource name and namespace // Optional, if missing will be automatically added by the Kusk Gateway with the discovery of the single fleet in the cluster (MutatingWebhookConfiguration for the API resource must be enabled). Fleet *EnvoyFleetID `json:"fleet,omitempty"` // Spec represents OpenAPI spec as an embedded string. Spec string `json:"spec"` }
APISpec defines the desired state of API
func (*APISpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISpec.
func (*APISpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type APIStatus ¶
type APIStatus struct { }
APIStatus defines the observed state of API
func (*APIStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIStatus.
func (*APIStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type APIValidator ¶
APIValidator handles API objects validation +kubebuilder:object:generate:=false
func (*APIValidator) InjectDecoder ¶
func (a *APIValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
func (*APIValidator) PathAlreadyDeployed ¶ added in v1.2.5
func (a *APIValidator) PathAlreadyDeployed(ctx context.Context, newApi API) error
type AccessLoggingConfig ¶
type AccessLoggingConfig struct { // Stdout logging format - text for unstructured and json for the structured type of logging // +kubebuilder:validation:Enum=json;text Format string `json:"format"` // Logging format template for the unstructured text type. // See https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage for the usage. // Uses Kusk Gateway defaults if not specified. // +optional TextTemplate string `json:"text_template,omitempty"` // Logging format template for the structured json type. // See https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage for the usage. // Uses Kusk Gateway defaults if not specified. // +optional JsonTemplate map[string]string `json:"json_template,omitempty"` }
AccessLoggingConfig defines the access logs Envoy logging settings
func (*AccessLoggingConfig) DeepCopy ¶
func (in *AccessLoggingConfig) DeepCopy() *AccessLoggingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLoggingConfig.
func (*AccessLoggingConfig) DeepCopyInto ¶
func (in *AccessLoggingConfig) DeepCopyInto(out *AccessLoggingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Action ¶
type Action struct { // +optional Route *Route `json:"route,omitempty"` // +optional Redirect *options.RedirectOptions `json:"redirect,omitempty"` }
Action is either a route to the upstream or a redirect, they're mutually exclusive.
func (*Action) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvoyFleet ¶
type EnvoyFleet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EnvoyFleetSpec `json:"spec"` Status EnvoyFleetStatus `json:"status,omitempty"` }
EnvoyFleet is the Schema for the envoyfleet API
func (*EnvoyFleet) DeepCopy ¶
func (in *EnvoyFleet) DeepCopy() *EnvoyFleet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFleet.
func (*EnvoyFleet) DeepCopyInto ¶
func (in *EnvoyFleet) DeepCopyInto(out *EnvoyFleet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvoyFleet) DeepCopyObject ¶
func (in *EnvoyFleet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EnvoyFleetID ¶
type EnvoyFleetID struct { //+kubebuilder:validation:Pattern:="^[a-z0-9-]{1,62}$" // deployed Envoy Fleet CR name Name string `json:"name"` //+kubebuilder:validation:Pattern:="^[a-z0-9-]{1,62}$" // deployed Envoy Fleet CR namespace Namespace string `json:"namespace"` }
EnvoyFleetID is used to bind other CR configurations to the deployed Envoy Fleet Consists of EnvoyFleet CR name and namespace
func (*EnvoyFleetID) DeepCopy ¶
func (in *EnvoyFleetID) DeepCopy() *EnvoyFleetID
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFleetID.
func (*EnvoyFleetID) DeepCopyInto ¶
func (in *EnvoyFleetID) DeepCopyInto(out *EnvoyFleetID)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EnvoyFleetID) String ¶
func (e EnvoyFleetID) String() string
type EnvoyFleetList ¶
type EnvoyFleetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EnvoyFleet `json:"items"` }
EnvoyFleetList contains a list of EnvoyFleet
func (*EnvoyFleetList) DeepCopy ¶
func (in *EnvoyFleetList) DeepCopy() *EnvoyFleetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFleetList.
func (*EnvoyFleetList) DeepCopyInto ¶
func (in *EnvoyFleetList) DeepCopyInto(out *EnvoyFleetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvoyFleetList) DeepCopyObject ¶
func (in *EnvoyFleetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EnvoyFleetMutator ¶
type EnvoyFleetMutator struct {
// contains filtered or unexported fields
}
EnvoyFleetMutator handles EnvoyFleet objects defaulting and any additional mutation +kubebuilder:object:generate:=false
func (*EnvoyFleetMutator) InjectDecoder ¶
func (e *EnvoyFleetMutator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type EnvoyFleetSpec ¶
type EnvoyFleetSpec struct { // Default marks fleet as the default one in the cluster Default bool `json:"default,omitempty"` // Service describes Envoy K8s service settings Service *ServiceConfig `json:"service"` // Envoy image tag // +kubebuilder:default:="docker.io/envoyproxy/envoy:v1.23.1" Image string `json:"image,omitempty"` // Node Selector is used to schedule the Envoy pod(s) to the specificly labeled nodes, optional // This is the map of "key: value" labels (e.g. "disktype": "ssd") // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Affinity is used to schedule Envoy pod(s) to specific nodes, optional // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // Tolerations allow pod to be scheduled to the nodes that has specific toleration labels, optional // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. // Value must be non-negative integer. The value zero indicates stop immediately via // the kill signal (no opportunity to shut down). // If this value is nil, the default grace period will be used instead. // The grace period is the duration in seconds after the processes running in the pod are sent // a termination signal and the time when the processes are forcibly halted with a kill signal. // Set this value longer than the expected cleanup time for your process. // Defaults to 30 seconds. // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // Additional Envoy Deployment annotations, optional // +optional Annotations map[string]string `json:"annotations,omitempty"` // Resources allow to set CPU and Memory resource requests and limits, optional // +optional Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // Size field specifies the number of Envoy Pods being deployed. Optional, default value is 1. // +kubebuilder:validation:Minimum=1 // +kubebuilder:default:=1 Size *int32 `json:"size,omitempty"` // Access logging settings for the Envoy AccessLog *AccessLoggingConfig `json:"accesslog,omitempty"` // TLS configuration //+optional TLS TLS `json:"tls,omitempty"` }
EnvoyFleetSpec defines the desired state of EnvoyFleet
func (*EnvoyFleetSpec) DeepCopy ¶
func (in *EnvoyFleetSpec) DeepCopy() *EnvoyFleetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFleetSpec.
func (*EnvoyFleetSpec) DeepCopyInto ¶
func (in *EnvoyFleetSpec) DeepCopyInto(out *EnvoyFleetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvoyFleetStatus ¶
type EnvoyFleetStatus struct { // State indicates Envoy Fleet state State string `json:"state,omitempty"` }
EnvoyFleetStatus defines the observed state of EnvoyFleet
func (*EnvoyFleetStatus) DeepCopy ¶
func (in *EnvoyFleetStatus) DeepCopy() *EnvoyFleetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFleetStatus.
func (*EnvoyFleetStatus) DeepCopyInto ¶
func (in *EnvoyFleetStatus) DeepCopyInto(out *EnvoyFleetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvoyFleetValidator ¶
EnvoyFleetValidator handles EnvoyFleet objects validation +kubebuilder:object:generate:=false
func (*EnvoyFleetValidator) InjectDecoder ¶
func (e *EnvoyFleetValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type Methods ¶
type Methods map[options.HTTPMethod]*Action
Methods maps Method (GET, POST) to Action
func (Methods) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Methods.
func (Methods) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Path ¶
type Path string
Path is a URL path without a query Must start with /, could be exact (/index.html), prefix (/front/, / in the end defines prefix), regex (/images/(\d+))
type Route ¶
type Route struct { Upstream *options.UpstreamOptions `json:"upstream"` // +optional CORS *options.CORSOptions `json:"cors,omitempty"` // +optional QoS *options.QoSOptions `json:"qos,omitempty"` // +optional // Enable establishing Websocket connections, by default disabled Websocket *bool `json:"websocket,omitempty"` }
Route defines a routing rule that proxies to upstream
func (*Route) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (*Route) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceConfig ¶
type ServiceConfig struct { // Kubernetes service type: NodePort, ClusterIP or LoadBalancer // +kubebuilder:validation:Enum=NodePort;ClusterIP;LoadBalancer Type corev1.ServiceType `json:"type"` // Kubernetes Service ports Ports []corev1.ServicePort `json:"ports"` // Service's annotations // +optional Annotations map[string]string `json:"annotations,omitempty"` // Static ip address for the LoadBalancer type if available // +optional LoadBalancerIP string `json:"loadBalancerIP,omitempty"` // externalTrafficPolicy denotes if this Service desires to route external // traffic to node-local or cluster-wide endpoints. "Local" preserves the // client source IP and avoids a second hop for LoadBalancer and Nodeport // type services, but risks potentially imbalanced traffic spreading. // "Cluster" obscures the client source IP and may cause a second hop to // another node, but should have good overall load-spreading. // For the preservation of the real client ip in access logs chose "Local" // +optional // +kubebuilder:validation:Enum=Cluster;Local ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` }
func (*ServiceConfig) DeepCopy ¶
func (in *ServiceConfig) DeepCopy() *ServiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig.
func (*ServiceConfig) DeepCopyInto ¶
func (in *ServiceConfig) DeepCopyInto(out *ServiceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StaticRoute ¶
type StaticRoute struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StaticRouteSpec `json:"spec,omitempty"` Status StaticRouteStatus `json:"status,omitempty"` }
StaticRoute is the Schema for the staticroutes API
func (*StaticRoute) DeepCopy ¶
func (in *StaticRoute) DeepCopy() *StaticRoute
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRoute.
func (*StaticRoute) DeepCopyInto ¶
func (in *StaticRoute) DeepCopyInto(out *StaticRoute)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StaticRoute) DeepCopyObject ¶
func (in *StaticRoute) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StaticRouteList ¶
type StaticRouteList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []StaticRoute `json:"items"` }
StaticRouteList contains a list of StaticRoute
func (*StaticRouteList) DeepCopy ¶
func (in *StaticRouteList) DeepCopy() *StaticRouteList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRouteList.
func (*StaticRouteList) DeepCopyInto ¶
func (in *StaticRouteList) DeepCopyInto(out *StaticRouteList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StaticRouteList) DeepCopyObject ¶
func (in *StaticRouteList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StaticRouteMutator ¶
StaticRouteMutator handles StaticRoute objects defaulting and any additional mutation. +kubebuilder:object:generate:=false
func (*StaticRouteMutator) InjectDecoder ¶
func (s *StaticRouteMutator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type StaticRouteSpec ¶
type StaticRouteSpec struct { // +optional // Fleet represents EnvoyFleet ID, which is deployed EnvoyFleet CustomResource name and namespace // Optional, if missing will be automatically added by the Kusk Gateway with the discovery of the single fleet in the cluster (MutatingWebhookConfiguration for the API resource must be enabled). Fleet *EnvoyFleetID `json:"fleet,omitempty"` // Hosts is a collection of vhosts the rules apply to. // Defaults to "*" - vhost that matches all domain names. // +optional Hosts []options.Host `json:"hosts,omitempty"` // +optional Auth *options.AuthOptions `json:"auth,omitempty"` // Upstream is a set of options of a target service to receive traffic. // +required Upstream *options.UpstreamOptions `json:"upstream"` }
+kubebuilder:object:generate=true StaticRouteSpec defines the desired state of StaticRoute
func (*StaticRouteSpec) DeepCopy ¶
func (in *StaticRouteSpec) DeepCopy() *StaticRouteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRouteSpec.
func (*StaticRouteSpec) DeepCopyInto ¶
func (in *StaticRouteSpec) DeepCopyInto(out *StaticRouteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StaticRouteSpec) GetOptionsFromSpec ¶
func (spec *StaticRouteSpec) GetOptionsFromSpec() (*options.StaticOptions, error)
GetOptionsFromSpec is a converter to generate Options object from StaticRoutes spec
type StaticRouteStatus ¶
type StaticRouteStatus struct { }
StaticRouteStatus defines the observed state of StaticRoute
func (*StaticRouteStatus) DeepCopy ¶
func (in *StaticRouteStatus) DeepCopy() *StaticRouteStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRouteStatus.
func (*StaticRouteStatus) DeepCopyInto ¶
func (in *StaticRouteStatus) DeepCopyInto(out *StaticRouteStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StaticRouteValidator ¶
type StaticRouteValidator struct {
// contains filtered or unexported fields
}
StaticRouteValidator handles StaticRoute objects validation +kubebuilder:object:generate:=false
func (*StaticRouteValidator) InjectDecoder ¶
func (s *StaticRouteValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type TLS ¶
type TLS struct { // +optional // If specified, the TLS listener will only support the specified cipher list when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). // If not specified, a default list will be used. Defaults are different for server (downstream) and client (upstream) TLS configurations. // For more information see: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto CipherSuites []string `json:"cipherSuites,omitempty"` // +optional // Minimum TLS protocol version. By default, it’s TLSv1_2 for clients and TLSv1_0 for servers. TlsMinimumProtocolVersion string `json:"tlsMinimumProtocolVersion,omitempty"` // +optional // Maximum TLS protocol version. By default, it’s TLSv1_2 for clients and TLSv1_3 for servers. TlsMaximumProtocolVersion string `json:"tlsMaximumProtocolVersion,omitempty"` // SecretName and Namespace combinations for locating TLS secrets containing TLS certificates // You can specify more than one // For more information on how certificate selection works see: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/security/ssl#certificate-selection TlsSecrets []TLSSecrets `json:"tlsSecrets"` // + optional // List of host names to enforce HTTPS redirect for. // That is if a HTTP request is received on a host in this list // a 301 redirect will be sent telling the client to use HTTPS HTTPSRedirectHosts []string `json:"https_redirect_hosts,omitempty"` }
func (*TLS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS.
func (*TLS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSecrets ¶
type TLSSecrets struct { // Name of the Kubernetes secret containing the TLS certificate SecretRef string `json:"secretRef"` // Namespace where the Kubernetes certificate resides Namespace string `json:"namespace"` }
func (*TLSSecrets) DeepCopy ¶
func (in *TLSSecrets) DeepCopy() *TLSSecrets
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecrets.
func (*TLSSecrets) DeepCopyInto ¶
func (in *TLSSecrets) DeepCopyInto(out *TLSSecrets)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.