v1

package
v0.0.0-...-cf4e3af Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the krakend v1 API group +kubebuilder:object:generate=true +groupName=krakend.nais.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "krakend.nais.io", Version: "v1"}

	// 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 ApiEndpoints

type ApiEndpoints struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ApiEndpointsSpec   `json:"spec,omitempty"`
	Status ApiEndpointsStatus `json:"status,omitempty"`
}

ApiEndpoints is the Schema for the apiendpoints API

func (*ApiEndpoints) DeepCopy

func (in *ApiEndpoints) DeepCopy() *ApiEndpoints

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

func (*ApiEndpoints) DeepCopyInto

func (in *ApiEndpoints) DeepCopyInto(out *ApiEndpoints)

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

func (*ApiEndpoints) DeepCopyObject

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

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

type ApiEndpointsList

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

ApiEndpointsList contains a list of ApiEndpoints

func (*ApiEndpointsList) DeepCopy

func (in *ApiEndpointsList) DeepCopy() *ApiEndpointsList

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

func (*ApiEndpointsList) DeepCopyInto

func (in *ApiEndpointsList) DeepCopyInto(out *ApiEndpointsList)

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

func (*ApiEndpointsList) DeepCopyObject

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

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

type ApiEndpointsSpec

type ApiEndpointsSpec struct {
	// Krakend is the name of the Krakend instance in the cluster
	Krakend string `json:"krakend,omitempty" fake:"skip"`
	// AppName is the name of the API, e.g. name of the application or service
	AppName string `json:"appName,omitempty" fake:"{appname}"`
	// Auth is the common JWT authentication provider used for the endpoints specified in Endpoints
	Auth Auth `json:"auth,omitempty"`
	// RateLimit is the common rate limit configuration used for the endpoints specified in Endpoints and OpenEndpoints
	RateLimit *RateLimit `json:"rateLimit,omitempty"`
	// Endpoints is a list of endpoints that require authentication
	Endpoints []Endpoint `json:"endpoints,omitempty" fakesize:"1"`
	// OpenEndpoints is a list of endpoints that do not require authentication
	OpenEndpoints []Endpoint `json:"openEndpoints,omitempty" fakesize:"1"`
}

ApiEndpointsSpec defines the desired state of ApiEndpoints

func (*ApiEndpointsSpec) DeepCopy

func (in *ApiEndpointsSpec) DeepCopy() *ApiEndpointsSpec

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

func (*ApiEndpointsSpec) DeepCopyInto

func (in *ApiEndpointsSpec) DeepCopyInto(out *ApiEndpointsSpec)

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

type ApiEndpointsStatus

type ApiEndpointsStatus struct {
	SynchronizationTimestamp metav1.Time `json:"synchronizationTimestamp,omitempty"`
	SynchronizationHash      string      `json:"synchronizationHash,omitempty"`
}

ApiEndpointsStatus defines the observed state of ApiEndpoints

func (*ApiEndpointsStatus) DeepCopy

func (in *ApiEndpointsStatus) DeepCopy() *ApiEndpointsStatus

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

func (*ApiEndpointsStatus) DeepCopyInto

func (in *ApiEndpointsStatus) DeepCopyInto(out *ApiEndpointsStatus)

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

type Auth

type Auth struct {
	// Name is the name of the auth provider defined in the Krakend resource, e.g. maskinporten
	Name string `json:"name" fake:"maskinporten"`
	// Cache is whether to cache the JWKs from the auth provider
	Cache bool `json:"cache,omitempty" fake:"true"`
	// Debug is whether to enable debug logging for the auth provider
	Debug bool `json:"debug,omitempty" fake:"false"`
	// Audience is the list of audiences to validate the JWT against
	Audience []string `json:"audience,omitempty" fake:"{uuid}" fakesize:"1"`
	// Scope is the list of scopes to validate the JWT against
	Scope []string `json:"scopes,omitempty" fake:"{word}" fakesize:"1"`
}

Auth defines the JWT authentication config

func (*Auth) DeepCopy

func (in *Auth) DeepCopy() *Auth

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

func (*Auth) DeepCopyInto

func (in *Auth) DeepCopyInto(out *Auth)

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

type AuthProvider

type AuthProvider struct {
	// Name is the name of the auth provider, e.g. maskinporten
	Name string `json:"name"`
	// Alg is the algorithm used for signing the JWT token, e.g. RS256
	Alg string `json:"alg"`
	// JwkUrl is the URL to the JWKs for the auth provider
	JwkUrl string `json:"jwkUrl"`
	// Issuer is the issuer of the JWT token
	Issuer string `json:"issuer"`
}

AuthProvider defines the configuration for an JWT auth provider

func (*AuthProvider) DeepCopy

func (in *AuthProvider) DeepCopy() *AuthProvider

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

func (*AuthProvider) DeepCopyInto

func (in *AuthProvider) DeepCopyInto(out *AuthProvider)

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

type Endpoint

type Endpoint struct {
	// Path is exact path of an endpoint in a KrakenD instance and must be unique, see https://www.krakend.io/docs/endpoints/#endpoint
	Path string `json:"path,omitempty" fake:"{inputname}"`
	// Method is the HTTP method of the endpoint, see https://www.krakend.io/docs/endpoints/#method
	Method string `json:"method,omitempty" fake:"GET"`
	// BackendHost is the base URL of the backend service and must start with the protocol, i.e. http:// or https://
	BackendHost string `json:"backendHost,omitempty" fake:"http://appname.namespace.svc.cluster.local"`
	// BackendPath is the path of the backend service and follows the conventions of url_pattern in https://www.krakend.io/docs/backends/#backendupstream-configuration
	BackendPath string `json:"backendPath,omitempty" fake:"{inputname}"`
	// ForwardHeaders is a list of header names to be forwarded to the backend service, see https://www.krakend.io/docs/endpoints/#input_headers
	ForwardHeaders []string `json:"forwardHeaders,omitempty" fake:"{word}" fakesize:"1"`
	// QueryParams is an exact list of query parameter names that are allowed to reach the backend. By default, KrakenD won’t pass any query string to the backend, see https://www.krakend.io/docs/endpoints/#input_query_strings
	QueryParams []string `json:"queryParams,omitempty" fake:"{word}" fakesize:"1"`
	// Timeout is the timeout for the whole duration of the request/response pipe, see https://www.krakend.io/docs/endpoints/#timeout
	// Valid duration units are: ns (nanosec.), us or µs (microsec.), ms (millisec.), s (sec.), m (minutes), h (hours).
	TimeOut string `json:"timeout,omitempty" fake:"10s"`
}

Endpoint defines the endpoint configuration

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 Host

type Host struct {
	// Host is the host name to add to the ingress
	Host string `json:"host,omitempty"`
	// Paths is a list of paths to add to the ingress
	Paths []Path `json:"paths,omitempty"`
}

Host defines the host configuration for an ingress

func (*Host) DeepCopy

func (in *Host) DeepCopy() *Host

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

func (*Host) DeepCopyInto

func (in *Host) DeepCopyInto(out *Host)

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

type Image

type Image struct {
	// Registry is the registry to use for the image
	Registry string `json:"registry,omitempty"`
	// Repository is the repository to use for the image
	Repository string `json:"repository,omitempty"`
	// Tag is the tag to use for the image
	Tag string `json:"tag,omitempty"`
	// PullPolicy is the pull policy to use for the image
	PullPolicy string `json:"pullPolicy,omitempty"`
}

Image defines the image configuration for the Krakend deployment

func (*Image) DeepCopy

func (in *Image) DeepCopy() *Image

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

func (*Image) DeepCopyInto

func (in *Image) DeepCopyInto(out *Image)

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

type Ingress

type Ingress struct {
	// Enabled is whether to enable ingress for the Krakend instance
	Enabled bool `json:"enabled,omitempty"`
	// Class is the ingress class to use for the Krakend instance
	ClassName string `json:"className,omitempty"`
	// Annotations is a list of annotations to add to the ingress
	Annotations map[string]string `json:"annotations,omitempty"`
	// Hosts is a list of hosts to add to the ingress
	Hosts []Host `json:"hosts,omitempty"`
}

Ingress defines the ingress configuration

func (*Ingress) DeepCopy

func (in *Ingress) DeepCopy() *Ingress

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

func (*Ingress) DeepCopyInto

func (in *Ingress) DeepCopyInto(out *Ingress)

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

type Krakend

type Krakend struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KrakendSpec   `json:"spec,omitempty"`
	Status KrakendStatus `json:"status,omitempty"`
}

Krakend is the Schema for the krakends API

func (*Krakend) DeepCopy

func (in *Krakend) DeepCopy() *Krakend

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

func (*Krakend) DeepCopyInto

func (in *Krakend) DeepCopyInto(out *Krakend)

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

func (*Krakend) DeepCopyObject

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

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

func (*Krakend) NamespacedName

func (k *Krakend) NamespacedName() types.NamespacedName

type KrakendDeployment

type KrakendDeployment struct {
	// DeploymentType is the type of deployment to use, either deployment or rollout
	DeploymentType string `json:"deploymentType,omitempty"`
	// ReplicaCount is the number of replicas to use for the deployment
	ReplicaCount int `json:"replicaCount,omitempty"`
	// Resources is the resource requirements for the deployment, as in corev1.ResourceRequirements
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Image is the image configuration to use for the deployment
	Image Image `json:"image,omitempty"`
	// ExtraEnvVars is a list of extra environment variables to add to the deployment
	ExtraEnvVars []corev1.EnvVar `json:"extraEnvVars,omitempty"`
}

KrakendDeployment defines the configuration for the KrakenD deployment

func (*KrakendDeployment) DeepCopy

func (in *KrakendDeployment) DeepCopy() *KrakendDeployment

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

func (*KrakendDeployment) DeepCopyInto

func (in *KrakendDeployment) DeepCopyInto(out *KrakendDeployment)

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

type KrakendList

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

KrakendList contains a list of Krakend

func (*KrakendList) DeepCopy

func (in *KrakendList) DeepCopy() *KrakendList

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

func (*KrakendList) DeepCopyInto

func (in *KrakendList) DeepCopyInto(out *KrakendList)

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

func (*KrakendList) DeepCopyObject

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

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

type KrakendSpec

type KrakendSpec struct {
	// Ingress lets you configure the ingress class, annotations and hosts or tls for an ingress
	Ingress Ingress `json:"ingress,omitempty"`
	// IngressHost is a shortcut for creating a single host ingress with sane defaults, if Ingress is specified this is ignored
	IngressHost string `json:"ingressHost,omitempty"`
	// AuthProviders is a list of supported auth providers to be used in ApiEndpoints
	AuthProviders []AuthProvider `json:"authProviders,omitempty" fakesize:"1"`
	// Deployment defines configuration for the KrakenD deployment
	Deployment KrakendDeployment `json:"deployment,omitempty"`
}

KrakendSpec defines the desired state of Krakend

func (*KrakendSpec) DeepCopy

func (in *KrakendSpec) DeepCopy() *KrakendSpec

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

func (*KrakendSpec) DeepCopyInto

func (in *KrakendSpec) DeepCopyInto(out *KrakendSpec)

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

type KrakendStatus

type KrakendStatus struct {
	SynchronizationTimestamp metav1.Time `json:"synchronizationTimestamp,omitempty"`
	SynchronizationHash      string      `json:"synchronizationHash,omitempty"`
}

KrakendStatus defines the observed state of Krakend

func (*KrakendStatus) DeepCopy

func (in *KrakendStatus) DeepCopy() *KrakendStatus

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

func (*KrakendStatus) DeepCopyInto

func (in *KrakendStatus) DeepCopyInto(out *KrakendStatus)

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

type Path

type Path struct {
	// Path is the path to add to the ingress
	Path string `json:"path,omitempty"`
	// PathType is the path type to add to the ingress
	PathType string `json:"pathType,omitempty"`
}

Path defines the path configuration for an ingress

func (*Path) DeepCopy

func (in *Path) DeepCopy() *Path

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

func (*Path) DeepCopyInto

func (in *Path) DeepCopyInto(out *Path)

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

type RateLimit

type RateLimit struct {
	// MaxRate is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	MaxRate int `json:"maxRate,omitempty" fake:"5"`
	// ClientMaxRate is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	ClientMaxRate int `json:"clientMaxRate,omitempty" fake:"{number:10,100}"`
	// Every is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	Every string `json:"every,omitempty" fake:"10s"`
	// Key is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	Key string `json:"key,omitempty" fake:"X-TOKEN"`
	// Strategy is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	Strategy string `json:"strategy,omitempty" fake:"ip"`
	// Capacity is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	Capacity int `json:"capacity,omitempty" fake:"1000"`
	// ClientCapacity is documented here: https://www.krakend.io/docs/endpoints/rate-limit/#configuration
	ClientCapacity int `json:"clientCapacity,omitempty" fake:"{number:10,100}"`
}

RateLimit defines the rate limit configuration

func (*RateLimit) DeepCopy

func (in *RateLimit) DeepCopy() *RateLimit

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

func (*RateLimit) DeepCopyInto

func (in *RateLimit) DeepCopyInto(out *RateLimit)

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

Jump to

Keyboard shortcuts

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