v1

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=fission.io +groupGoName=core

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

Index

Constants

View Source
const (
	EXECUTOR_INSTANCEID_LABEL string = "executorInstanceId"
	DEFAULT_FUNCTION_TIMEOUT  int    = 60
)
View Source
const (
	BuildStatusPending   = "pending"
	BuildStatusRunning   = "running"
	BuildStatusSucceeded = "succeeded"
	BuildStatusFailed    = "failed"
	BuildStatusNone      = "none"
)
View Source
const (
	AllowedFunctionsPerContainerSingle   = "single"
	AllowedFunctionsPerContainerInfinite = "infinite"
)
View Source
const (
	RuntimePodSpecPath = "/etc/fission/runtime-podspec-patch.yaml"
	BuilderPodSpecPath = "/etc/fission/builder-podspec-patch.yaml"
)
View Source
const (
	SharedVolumeUserfunc   = "userfunc"
	SharedVolumePackages   = "packages"
	SharedVolumeSecrets    = "secrets"
	SharedVolumeConfigmaps = "configmaps"
	PodInfoVolume          = "podinfo"
	PodInfoMount           = "/etc/podinfo"
)
View Source
const (
	// FunctionReferenceFunctionName means that the function
	// reference is simply by function name.
	FunctionReferenceTypeFunctionName = "name"

	FunctionReferenceTypeFunctionWeights = "function-weights"
)
View Source
const (
	// failure type currently supported is http status code. This could be extended
	// in the future.
	FailureTypeStatusCode FailureType = "status-code"

	// Status of canary config can be one of the following
	CanaryConfigStatusPending   = "pending"
	CanaryConfigStatusSucceeded = "succeeded"
	CanaryConfigStatusFailed    = "failed"
	CanaryConfigStatusAborted   = "aborted"

	// set a max number for iterations to prevent infinite processing of canary config
	MaxIterationsForCanaryConfig = 10
)
View Source
const (
	FETCH_SOURCE = iota
	FETCH_DEPLOYMENT
	FETCH_URL
)
View Source
const (
	ENVIRONMENT_NAMESPACE     = "environmentNamespace"
	ENVIRONMENT_NAME          = "environmentName"
	ENVIRONMENT_UID           = "environmentUid"
	FUNCTION_NAMESPACE        = "functionNamespace"
	FUNCTION_NAME             = "functionName"
	FUNCTION_UID              = "functionUid"
	FUNCTION_RESOURCE_VERSION = "functionResourceVersion"
	EXECUTOR_TYPE             = "executorType"
	MANAGED                   = "managed"
)

executor kubernetes object label key

View Source
const (
	FissionBuilderSA = "fission-builder"
	FissionFetcherSA = "fission-fetcher"
)
View Source
const (
	CanaryConfigResource    = "canaryconfigs"
	EnvironmentResource     = "environments"
	FunctionResource        = "functions"
	HttpTriggerResource     = "httptriggers"
	KubernetesWatchResource = "kuberneteswatchtriggers"
	MessageQueueResource    = "messagequeuetriggers"
	PackagesResource        = "packages"
	TimeTriggerResource     = "timetriggers"
)
View Source
const (
	Pods        = "pods"
	Deployments = "deployments"
	ReplicaSets = "replicasets"
	Services    = "services"
	ConfigMaps  = "configmaps"
	Secrets     = "secrets"
)
View Source
const (
	CRD_VERSION          = "fission.io/v1"
	CRD_NAME_ENVIRONMENT = "Environment"
)
View Source
const (
	DefaultConcurrency    = 500
	DefaultRequestsPerPod = 1
)
View Source
const (
	ErrorUnsupportedType = iota
	ErrorInvalidValue
	ErrorInvalidObject
)
View Source
const (
	ANNOTATION_SVC_HOST = "svcHost"
)
View Source
const (
	ArchiveLiteralSizeLimit int64 = 256 * 1024
)
View Source
const (
	DefaultSpecializationTimeOut = 120
)
View Source
const (
	// ResourceVersionCount env variable is used for updating configmaps and secrets in pods
	ResourceVersionCount string = "RESOURCE_VERSION_COUNT"
)
View Source
const (
	StrategyTypeExecution = "execution"
)

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	MinimumKubernetesVersion = [3]int{1, 19, 0}
)

Functions

func AggregateValidationErrors

func AggregateValidationErrors(objName string, err error) error

func IsValidCronSpec

func IsValidCronSpec(spec string) error

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateKubeLabel

func ValidateKubeLabel(field string, labels map[string]string) error

func ValidateKubeName

func ValidateKubeName(field string, val string) error

func ValidateKubePort

func ValidateKubePort(field string, port int) error

func ValidateKubeReference

func ValidateKubeReference(refName string, name string, namespace string) error

Types

type AllowedFunctionsPerContainer

type AllowedFunctionsPerContainer string

AllowedFunctionsPerContainer defaults to 'single'. Related to Fission Workflows

type Archive

type Archive struct {
	// Type defines how the package is specified: literal or URL.
	// Available value:
	//  - literal
	//  - url
	// +optional
	Type ArchiveType `json:"type,omitempty"`

	// Literal contents of the package. Can be used for
	// encoding packages below TODO (256 KB?) size.
	// +optional
	Literal []byte `json:"literal,omitempty"`

	// URL references a package.
	// +optional
	URL string `json:"url,omitempty"`

	// Checksum ensures the integrity of packages
	// referenced by URL. Ignored for literals.
	// +optional
	Checksum Checksum `json:"checksum,omitempty"`
}

Archive contains or references a collection of sources or binary files.

func (*Archive) DeepCopy

func (in *Archive) DeepCopy() *Archive

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

func (*Archive) DeepCopyInto

func (in *Archive) DeepCopyInto(out *Archive)

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

func (Archive) IsEmpty

func (a Archive) IsEmpty() bool

IsEmpty checks if the archive byte and litreal are of length 0

func (Archive) SwaggerDoc added in v1.13.1

func (Archive) SwaggerDoc() map[string]string

func (Archive) Validate

func (archive Archive) Validate() error

type ArchiveType

type ArchiveType string

ArchiveType is either literal or URL, indicating whether the package is specified in the Archive struct or externally.

const (
	// ArchiveTypeLiteral means the package contents are specified in the Literal field of
	// resource itself.
	ArchiveTypeLiteral ArchiveType = "literal"

	// ArchiveTypeUrl means the package contents are at the specified URL.
	ArchiveTypeUrl ArchiveType = "url"
)

type AuthLogin added in v1.16.0

type AuthLogin struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

AuthLogin defines the body for router login

func (*AuthLogin) DeepCopy added in v1.16.0

func (in *AuthLogin) DeepCopy() *AuthLogin

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

func (*AuthLogin) DeepCopyInto added in v1.16.0

func (in *AuthLogin) DeepCopyInto(out *AuthLogin)

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

func (AuthLogin) SwaggerDoc added in v1.16.0

func (AuthLogin) SwaggerDoc() map[string]string

type BuildStatus

type BuildStatus string

BuildStatus indicates the current build status of a package.

type Builder

type Builder struct {
	// Image for containing the language compilation environment.
	Image string `json:"image,omitempty"`

	// (Optional) Default build command to run for this build environment.
	Command string `json:"command,omitempty"`

	// (Optional) Container allows the modification of the deployed builder
	// container using the Kubernetes Container spec. Fission overrides
	// the following fields:
	// - Name
	// - Image; set to the Builder.Image
	// - Command; set to the Builder.Command
	// - TerminationMessagePath
	// - ImagePullPolicy
	// - ReadinessProbe
	Container *apiv1.Container `json:"container,omitempty"`

	// PodSpec will store the spec of the pod that will be applied to the pod created for the builder
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

Builder is the setting for environment builder.

func (*Builder) DeepCopy

func (in *Builder) DeepCopy() *Builder

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

func (*Builder) DeepCopyInto

func (in *Builder) DeepCopyInto(out *Builder)

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

func (Builder) SwaggerDoc added in v1.13.1

func (Builder) SwaggerDoc() map[string]string

func (Builder) Validate

func (builder Builder) Validate() error

type CanaryConfig

type CanaryConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              CanaryConfigSpec   `json:"spec"`
	Status            CanaryConfigStatus `json:"status"`
}

CanaryConfig is for canary deployment of two functions. +genclient +kubebuilder:object:root=true

func (*CanaryConfig) DeepCopy

func (in *CanaryConfig) DeepCopy() *CanaryConfig

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

func (*CanaryConfig) DeepCopyInto

func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig)

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

func (*CanaryConfig) DeepCopyObject

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

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

func (*CanaryConfig) Default added in v1.18.0

func (r *CanaryConfig) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*CanaryConfig) SetupWebhookWithManager added in v1.18.0

func (r *CanaryConfig) SetupWebhookWithManager(mgr ctrl.Manager) error

func (CanaryConfig) SwaggerDoc added in v1.13.1

func (CanaryConfig) SwaggerDoc() map[string]string

func (*CanaryConfig) ValidateCreate added in v1.18.0

func (r *CanaryConfig) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*CanaryConfig) ValidateDelete added in v1.18.0

func (r *CanaryConfig) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*CanaryConfig) ValidateUpdate added in v1.18.0

func (r *CanaryConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type CanaryConfigList

type CanaryConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CanaryConfig `json:"items"`
}

CanaryConfigList is a list of CanaryConfigs. +kubebuilder:object:root=true

func (*CanaryConfigList) DeepCopy

func (in *CanaryConfigList) DeepCopy() *CanaryConfigList

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

func (*CanaryConfigList) DeepCopyInto

func (in *CanaryConfigList) DeepCopyInto(out *CanaryConfigList)

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

func (*CanaryConfigList) DeepCopyObject

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

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

func (CanaryConfigList) SwaggerDoc added in v1.13.1

func (CanaryConfigList) SwaggerDoc() map[string]string

type CanaryConfigSpec

type CanaryConfigSpec struct {
	// HTTP trigger that this config references
	Trigger string `json:"trigger"`

	// New version of the function
	NewFunction string `json:"newfunction"`

	// Old stable version of the function
	OldFunction string `json:"oldfunction"`

	// Weight increment step for function
	// +optional
	WeightIncrement int `json:"weightincrement"`

	// Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default: "2m")
	// +optional
	WeightIncrementDuration string `json:"duration"`

	// Threshold in percentage beyond which the new version of the function is considered unstable
	// +optional
	FailureThreshold int `json:"failurethreshold"`
	// +optional
	FailureType FailureType `json:"failureType"`
}

CanaryConfigSpec defines the canary configuration spec

func (*CanaryConfigSpec) DeepCopy

func (in *CanaryConfigSpec) DeepCopy() *CanaryConfigSpec

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

func (*CanaryConfigSpec) DeepCopyInto

func (in *CanaryConfigSpec) DeepCopyInto(out *CanaryConfigSpec)

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

func (CanaryConfigSpec) SwaggerDoc added in v1.13.1

func (CanaryConfigSpec) SwaggerDoc() map[string]string

type CanaryConfigStatus

type CanaryConfigStatus struct {
	Status string `json:"status"`
}

CanaryConfigStatus represents canary config status

func (*CanaryConfigStatus) DeepCopy

func (in *CanaryConfigStatus) DeepCopy() *CanaryConfigStatus

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

func (*CanaryConfigStatus) DeepCopyInto

func (in *CanaryConfigStatus) DeepCopyInto(out *CanaryConfigStatus)

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

func (CanaryConfigStatus) SwaggerDoc added in v1.13.1

func (CanaryConfigStatus) SwaggerDoc() map[string]string

type Checksum

type Checksum struct {
	Type ChecksumType `json:"type,omitempty"`
	Sum  string       `json:"sum,omitempty"`
}

Checksum of package contents when the contents are stored outside the Package struct. Type is the checksum algorithm; "sha256" is the only currently supported one. Sum is hex encoded.

func (*Checksum) DeepCopy

func (in *Checksum) DeepCopy() *Checksum

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

func (*Checksum) DeepCopyInto

func (in *Checksum) DeepCopyInto(out *Checksum)

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

func (Checksum) SwaggerDoc added in v1.13.1

func (Checksum) SwaggerDoc() map[string]string

func (Checksum) Validate

func (checksum Checksum) Validate() error

type ChecksumType

type ChecksumType string

ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.

const (
	ChecksumTypeSHA256 ChecksumType = "sha256"
)

type ConfigMapReference

type ConfigMapReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

ConfigMapReference is a reference to a kubernetes configmap.

func (*ConfigMapReference) DeepCopy

func (in *ConfigMapReference) DeepCopy() *ConfigMapReference

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

func (*ConfigMapReference) DeepCopyInto

func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference)

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

func (ConfigMapReference) SwaggerDoc added in v1.13.1

func (ConfigMapReference) SwaggerDoc() map[string]string

func (ConfigMapReference) Validate

func (ref ConfigMapReference) Validate() error

type Environment

type Environment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              EnvironmentSpec `json:"spec"`
}

Environment is environment for building and running user functions. +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

func (*Environment) Default added in v1.18.0

func (r *Environment) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Environment) SetupWebhookWithManager added in v1.18.0

func (r *Environment) SetupWebhookWithManager(mgr ctrl.Manager) error

func (Environment) SwaggerDoc added in v1.13.1

func (Environment) SwaggerDoc() map[string]string

func (*Environment) Validate

func (e *Environment) Validate() error

func (*Environment) ValidateCreate added in v1.18.0

func (r *Environment) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Environment) ValidateDelete added in v1.18.0

func (r *Environment) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Environment) ValidateUpdate added in v1.18.0

func (r *Environment) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type EnvironmentList

type EnvironmentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Environment `json:"items"`
}

EnvironmentList is a list of Environments. +kubebuilder:object:root=true

func (*EnvironmentList) DeepCopy

func (in *EnvironmentList) DeepCopy() *EnvironmentList

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

func (*EnvironmentList) DeepCopyInto

func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList)

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

func (*EnvironmentList) DeepCopyObject

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

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

func (EnvironmentList) SwaggerDoc added in v1.13.1

func (EnvironmentList) SwaggerDoc() map[string]string

func (*EnvironmentList) Validate

func (el *EnvironmentList) Validate() error

type EnvironmentReference

type EnvironmentReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

EnvironmentReference is a reference to an environment.

func (*EnvironmentReference) DeepCopy

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

func (*EnvironmentReference) DeepCopyInto

func (in *EnvironmentReference) DeepCopyInto(out *EnvironmentReference)

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

func (EnvironmentReference) SwaggerDoc added in v1.13.1

func (EnvironmentReference) SwaggerDoc() map[string]string

func (EnvironmentReference) Validate

func (ref EnvironmentReference) Validate() error

type EnvironmentSpec

type EnvironmentSpec struct {
	// Version is the Environment API version
	//
	// Version "1" allows user to run code snippet in a file, and
	// it's supported by most of the environments except tensorflow-serving.
	//
	// Version "2" supports downloading and compiling user function if source archive is not empty.
	//
	// Version "3" is almost the same with v2, but you're able to control the size of pre-warm pool of the environment.
	Version int `json:"version"`

	// Runtime is configuration for running function, like container image etc.
	Runtime Runtime `json:"runtime"`

	// (Optional) Builder is configuration for builder manager to launch environment builder to build source code into
	// deployable binary.
	// +optional
	Builder Builder `json:"builder"`

	// NOT USED NOW.
	// (Optional) Strongly encouraged. Used to populate links from UI, CLI, etc.
	// +optional
	DocumentationURL string `json:"-"` // `json:"documentationurl,omitempty"`

	// (Optional) defaults to 'single'. Fission workflow uses
	// 'infinite' to load multiple functions in one function pod.
	// Available value:
	// - single
	// - infinite
	// +optional
	AllowedFunctionsPerContainer AllowedFunctionsPerContainer `json:"allowedFunctionsPerContainer,omitempty"`

	// Istio default blocks all egress traffic for safety.
	// To enable accessibility of external network for builder/function pod, set to 'true'.
	// (Optional) defaults to 'false'
	// +optional
	AllowAccessToExternalNetwork bool `json:"allowAccessToExternalNetwork,omitempty"`

	// The request and limit CPU/MEM resource setting for poolmanager to set up pods in the pre-warm pool.
	// (Optional) defaults to no limitation.
	// +optional
	Resources apiv1.ResourceRequirements `json:"resources"`

	// The initial pool size for environment
	// +optional
	Poolsize int `json:"poolsize,omitempty"`

	// The grace time for pod to perform connection draining before termination. The unit is in seconds.
	// (Optional) defaults to 360 seconds
	// +optional
	TerminationGracePeriod int64 `json:"terminationGracePeriod,omitempty"`

	// KeepArchive is used by fetcher to determine if the extracted archive
	// or unarchived file should be placed, which is then used by specialize handler.
	// (This is mainly for the JVM environment because .jar is one kind of zip archive.)
	// +optional
	KeepArchive bool `json:"keeparchive"`

	// ImagePullSecret is the secret for Kubernetes to pull an image from a
	// private registry.
	// +optional
	ImagePullSecret string `json:"imagepullsecret"`
}

EnvironmentSpec contains with builder, runtime and some other related environment settings.

func (*EnvironmentSpec) DeepCopy

func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec

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

func (*EnvironmentSpec) DeepCopyInto

func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)

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

func (EnvironmentSpec) SwaggerDoc added in v1.13.1

func (EnvironmentSpec) SwaggerDoc() map[string]string

func (EnvironmentSpec) Validate

func (spec EnvironmentSpec) Validate() error

type ExecutionStrategy

type ExecutionStrategy struct {

	// ExecutorType is the executor type of function used. Defaults to "poolmgr".
	//
	// Available value:
	//  - poolmgr
	//  - newdeploy
	//  - container
	// +optional
	ExecutorType ExecutorType `json:"ExecutorType"`

	// This is only for newdeploy to set up minimum replicas of deployment.
	// +optional
	MinScale int `json:"MinScale"`

	// This is only for newdeploy to set up maximum replicas of deployment.
	// +optional
	MaxScale int `json:"MaxScale"`

	// Deprecated: use hpaMetrics instead.
	// This is only for executor type newdeploy and container to set up target CPU utilization of HPA.
	// Applicable for executor type newdeploy and container.
	// +optional
	TargetCPUPercent int `json:"TargetCPUPercent"`

	// This is the timeout setting for executor to wait for pod specialization.
	// +optional
	SpecializationTimeout int `json:"SpecializationTimeout"`

	// hpaMetrics is the list of metrics used to determine the desired replica count of the Deployment
	// created for the function.
	// Applicable for executor type newdeploy and container.
	// +optional
	Metrics []asv2.MetricSpec `json:"hpaMetrics,omitempty"`

	// hpaBehavior is the behavior of HPA when scaling in up/down direction.
	// Applicable for executor type newdeploy and container.
	// +optional
	Behavior *asv2.HorizontalPodAutoscalerBehavior `json:"hpaBehavior,omitempty"`
}

ExecutionStrategy specifies low-level parameters for function execution, such as the number of instances.

MinScale affects the cold start behavior for a function. If MinScale is 0 then the deployment is created on first invocation of function and is good for requests of asynchronous nature. If MinScale is greater than 0 then MinScale number of pods are created at the time of creation of function. This ensures faster response during first invocation at the cost of consuming resources.

MaxScale is the maximum number of pods that function will scale to based on TargetCPUPercent and resources allocated to the function pod.

func (*ExecutionStrategy) DeepCopy

func (in *ExecutionStrategy) DeepCopy() *ExecutionStrategy

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

func (*ExecutionStrategy) DeepCopyInto

func (in *ExecutionStrategy) DeepCopyInto(out *ExecutionStrategy)

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

func (ExecutionStrategy) SwaggerDoc added in v1.13.1

func (ExecutionStrategy) SwaggerDoc() map[string]string

func (ExecutionStrategy) Validate

func (es ExecutionStrategy) Validate() error

type ExecutorType

type ExecutorType string

ExecutorType is the primary executor for an environment

const (
	ExecutorTypePoolmgr   ExecutorType = "poolmgr"
	ExecutorTypeNewdeploy ExecutorType = "newdeploy"
	ExecutorTypeContainer ExecutorType = "container"
)

type FailureType

type FailureType string

FailureType refers to the type of failure

type Function

type Function struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              FunctionSpec `json:"spec"`
}

Function is function runs within environment runtime with given package and secrets/configmaps. +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:singular="function",scope="Namespaced",shortName={fn}

func (*Function) DeepCopy

func (in *Function) DeepCopy() *Function

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

func (*Function) DeepCopyInto

func (in *Function) DeepCopyInto(out *Function)

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

func (*Function) DeepCopyObject

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

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

func (*Function) Default added in v1.18.0

func (r *Function) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (Function) GetConcurrency added in v1.19.0

func (fn Function) GetConcurrency() int

func (Function) GetRequestPerPod added in v1.19.0

func (fn Function) GetRequestPerPod() int

func (Function) GetRetainPods added in v1.20.0

func (fn Function) GetRetainPods() int

func (*Function) SetupWebhookWithManager added in v1.18.0

func (r *Function) SetupWebhookWithManager(mgr ctrl.Manager) error

func (Function) SwaggerDoc added in v1.13.1

func (Function) SwaggerDoc() map[string]string

func (*Function) Validate

func (f *Function) Validate() error

func (*Function) ValidateCreate added in v1.18.0

func (r *Function) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Function) ValidateDelete added in v1.18.0

func (r *Function) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Function) ValidateUpdate added in v1.18.0

func (r *Function) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type FunctionList

type FunctionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Function `json:"items"`
}

FunctionList is a list of Functions. +kubebuilder:object:root=true

func (*FunctionList) DeepCopy

func (in *FunctionList) DeepCopy() *FunctionList

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

func (*FunctionList) DeepCopyInto

func (in *FunctionList) DeepCopyInto(out *FunctionList)

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

func (*FunctionList) DeepCopyObject

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

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

func (FunctionList) SwaggerDoc added in v1.13.1

func (FunctionList) SwaggerDoc() map[string]string

func (*FunctionList) Validate

func (fl *FunctionList) Validate() error

type FunctionPackageRef

type FunctionPackageRef struct {
	// Package reference
	// +optional
	PackageRef PackageRef `json:"packageref"`

	// FunctionName specifies a specific function within the package. This allows
	// functions to share packages, by having different functions within the same
	// package.
	//
	// Fission itself does not interpret this path. It is passed verbatim to
	// build and runtime environments.
	//
	// This is optional: if unspecified, the environment has a default name.
	FunctionName string `json:"functionName,omitempty"`
}

FunctionPackageRef includes the reference to the package also the entrypoint of package.

func (*FunctionPackageRef) DeepCopy

func (in *FunctionPackageRef) DeepCopy() *FunctionPackageRef

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

func (*FunctionPackageRef) DeepCopyInto

func (in *FunctionPackageRef) DeepCopyInto(out *FunctionPackageRef)

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

func (FunctionPackageRef) SwaggerDoc added in v1.13.1

func (FunctionPackageRef) SwaggerDoc() map[string]string

func (FunctionPackageRef) Validate

func (ref FunctionPackageRef) Validate() error

type FunctionReference

type FunctionReference struct {
	// Type indicates whether this function reference is by name or selector. For now,
	// the only supported reference type is by "name".  Future reference types:
	//   * Function by label or annotation
	//   * Branch or tag of a versioned function
	//   * A "rolling upgrade" from one version of a function to another
	// Available value:
	// - name
	// - function-weights
	Type FunctionReferenceType `json:"type"`

	// Name of the function.
	Name string `json:"name"`

	// Function Reference by weight. this map contains function name as key and its weight
	// as the value. This is for canary upgrade purpose.
	// +nullable
	// +optional
	FunctionWeights map[string]int `json:"functionweights"`
}

FunctionReference refers to a function

func (*FunctionReference) DeepCopy

func (in *FunctionReference) DeepCopy() *FunctionReference

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

func (*FunctionReference) DeepCopyInto

func (in *FunctionReference) DeepCopyInto(out *FunctionReference)

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

func (FunctionReference) SwaggerDoc added in v1.13.1

func (FunctionReference) SwaggerDoc() map[string]string

func (FunctionReference) Validate

func (ref FunctionReference) Validate() error

type FunctionReferenceType

type FunctionReferenceType string

FunctionReferenceType refers to type of Function

type FunctionSpec

type FunctionSpec struct {
	// Environment is the build and runtime environment that this function is
	// associated with. An Environment with this name should exist, otherwise the
	// function cannot be invoked.
	Environment EnvironmentReference `json:"environment"`

	// Reference to a package containing deployment and optionally the source.
	Package FunctionPackageRef `json:"package"`

	// Reference to a list of secrets.
	// +optional
	// +nullable
	Secrets []SecretReference `json:"secrets,omitempty"`

	// Reference to a list of configmaps.
	// +optional
	// +nullable
	ConfigMaps []ConfigMapReference `json:"configmaps,omitempty"`

	// cpu and memory resources as per K8S standards
	// This is only for newdeploy to set up resource limitation
	// when creating deployment for a function.
	// +optional
	Resources apiv1.ResourceRequirements `json:"resources"`

	// InvokeStrategy is a set of controls which affect how function executes
	InvokeStrategy InvokeStrategy `json:"InvokeStrategy"`

	// FunctionTimeout provides a maximum amount of duration within which a request for
	// a particular function execution should be complete.
	// This is optional. If not specified default value will be taken as 60s
	// +optional
	FunctionTimeout int `json:"functionTimeout,omitempty"`

	// IdleTimeout specifies the length of time that a function is idle before the
	// function pod(s) are eligible for deletion. If no traffic to the function
	// is detected within the idle timeout, the executor will then recycle the
	// function pod(s) to release resources.
	// +optional
	IdleTimeout *int `json:"idletimeout,omitempty"`

	// Maximum number of pods to be specialized which will serve requests
	// This is optional. If not specified default value will be taken as 500
	// +optional
	Concurrency int `json:"concurrency,omitempty"`

	// RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod
	// This is optional. If not specified default value will be taken as 1
	// +optional
	RequestsPerPod int `json:"requestsPerPod,omitempty"`

	// OnceOnly specifies if specialized pod will serve exactly one request in its lifetime and would be garbage collected after serving that one request
	// This is optional. If not specified default value will be taken as false
	// +optional
	OnceOnly bool `json:"onceOnly,omitempty"`

	// RetainPods specifies the number of specialized pods that should be retained after serving requests
	// This is optional. If not specified default value will be taken as 0
	// +optional
	RetainPods int `json:"retainPods,omitempty"`

	// Podspec specifies podspec to use for executor type container based functions
	// Different arguments mentioned for container based function are populated inside a pod.
	// +optional
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

FunctionSpec describes the contents of the function.

func (*FunctionSpec) DeepCopy

func (in *FunctionSpec) DeepCopy() *FunctionSpec

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

func (*FunctionSpec) DeepCopyInto

func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec)

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

func (FunctionSpec) SwaggerDoc added in v1.13.1

func (FunctionSpec) SwaggerDoc() map[string]string

func (FunctionSpec) Validate

func (spec FunctionSpec) Validate() error

type HTTPTrigger

type HTTPTrigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              HTTPTriggerSpec `json:"spec"`
}

HTTPTrigger is the trigger invokes user functions when receiving HTTP requests. +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status

func (*HTTPTrigger) DeepCopy

func (in *HTTPTrigger) DeepCopy() *HTTPTrigger

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

func (*HTTPTrigger) DeepCopyInto

func (in *HTTPTrigger) DeepCopyInto(out *HTTPTrigger)

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

func (*HTTPTrigger) DeepCopyObject

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

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

func (*HTTPTrigger) Default added in v1.18.0

func (r *HTTPTrigger) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*HTTPTrigger) SetupWebhookWithManager added in v1.18.0

func (r *HTTPTrigger) SetupWebhookWithManager(mgr ctrl.Manager) error

func (HTTPTrigger) SwaggerDoc added in v1.13.1

func (HTTPTrigger) SwaggerDoc() map[string]string

func (*HTTPTrigger) Validate

func (h *HTTPTrigger) Validate() error

func (*HTTPTrigger) ValidateCreate added in v1.18.0

func (t *HTTPTrigger) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*HTTPTrigger) ValidateDelete added in v1.18.0

func (r *HTTPTrigger) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*HTTPTrigger) ValidateUpdate added in v1.18.0

func (r *HTTPTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type HTTPTriggerList

type HTTPTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []HTTPTrigger `json:"items"`
}

HTTPTriggerList is a list of HTTPTriggers +kubebuilder:object:root=true

func (*HTTPTriggerList) DeepCopy

func (in *HTTPTriggerList) DeepCopy() *HTTPTriggerList

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

func (*HTTPTriggerList) DeepCopyInto

func (in *HTTPTriggerList) DeepCopyInto(out *HTTPTriggerList)

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

func (*HTTPTriggerList) DeepCopyObject

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

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

func (HTTPTriggerList) SwaggerDoc added in v1.13.1

func (HTTPTriggerList) SwaggerDoc() map[string]string

func (*HTTPTriggerList) Validate

func (hl *HTTPTriggerList) Validate() error

type HTTPTriggerSpec

type HTTPTriggerSpec struct {
	// TODO: remove this field since we have IngressConfig already
	// Deprecated: the original idea of this field is not for setting Ingress.
	// Since we have IngressConfig now, remove Host after couple releases.
	// +optional
	Host string `json:"host"`

	// RelativeURL is the exposed URL for external client to access a function with.
	// +optional
	RelativeURL string `json:"relativeurl"`

	// Prefix with which functions are exposed.
	// NOTE: Prefix takes precedence over URL/RelativeURL.
	// Note that it does not treat slashes specially ("/foobar/" will be matched by
	// the prefix "/foobar").
	// +optional
	Prefix *string `json:"prefix,omitempty"`

	// When function is exposed with Prefix based path,
	// keepPrefix decides whether to keep or trim prefix in URL while invoking function.
	// +optional
	KeepPrefix bool `json:"keepPrefix,omitempty"`

	// Use Methods instead of Method. This field is going to be deprecated in a future release
	// HTTP method to access a function.
	// +optional
	Method string `json:"method"`

	// HTTP methods to access a function
	// +optional
	Methods []string `json:"methods,omitempty"`

	// FunctionReference is a reference to the target function.
	FunctionReference FunctionReference `json:"functionref"`

	// If CreateIngress is true, router will create an ingress definition.
	// +optional
	CreateIngress bool `json:"createingress"`

	// TODO: make IngressConfig an independent Fission resource
	// IngressConfig for router to set up Ingress.
	// +optional
	IngressConfig IngressConfig `json:"ingressconfig"`
}

HTTPTriggerSpec is for router to expose user functions at the given URL path.

func (*HTTPTriggerSpec) DeepCopy

func (in *HTTPTriggerSpec) DeepCopy() *HTTPTriggerSpec

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

func (*HTTPTriggerSpec) DeepCopyInto

func (in *HTTPTriggerSpec) DeepCopyInto(out *HTTPTriggerSpec)

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

func (HTTPTriggerSpec) SwaggerDoc added in v1.13.1

func (HTTPTriggerSpec) SwaggerDoc() map[string]string

func (HTTPTriggerSpec) Validate

func (spec HTTPTriggerSpec) Validate() error

type IngressConfig

type IngressConfig struct {
	// Annotations will be added to metadata when creating Ingress.
	// +optional
	// +nullable
	Annotations map[string]string `json:"annotations"`

	// Path is for path matching. The format of path
	// depends on what ingress controller you used.
	// +optional
	Path string `json:"path"`

	// Host is for ingress controller to apply rules. If
	// host is empty or "*", the rule applies to all
	// inbound HTTP traffic.
	// +optional
	Host string `json:"host"`

	// TLS is for user to specify a Secret that contains
	// TLS key and certificate. The domain name in the
	// key and crt must match the value of Host field.
	// +optional
	TLS string `json:"tls"`
}

IngressConfig is for router to set up Ingress.

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

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

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

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

func (IngressConfig) SwaggerDoc added in v1.13.1

func (IngressConfig) SwaggerDoc() map[string]string

func (IngressConfig) Validate

func (config IngressConfig) Validate() error

type InvokeStrategy

type InvokeStrategy struct {

	// ExecutionStrategy specifies low-level parameters for function execution,
	// such as the number of instances.
	// +optional
	ExecutionStrategy ExecutionStrategy `json:"ExecutionStrategy"`

	// StrategyType is the strategy type of function.
	// Now it only supports 'execution'.
	// +optional
	StrategyType StrategyType `json:"StrategyType"`
}

InvokeStrategy is a set of controls over how the function executes. It affects the performance and resource usage of the function.

An InvokeStrategy is of one of two types: ExecutionStrategy, which controls low-level parameters such as which ExecutorType to use, when to autoscale, minimum and maximum number of running instances, etc. A higher-level AbstractInvokeStrategy will also be supported; this strategy would specify the target request rate of the function, the target latency statistics, and the target cost (in terms of compute resources).

func (*InvokeStrategy) DeepCopy

func (in *InvokeStrategy) DeepCopy() *InvokeStrategy

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

func (*InvokeStrategy) DeepCopyInto

func (in *InvokeStrategy) DeepCopyInto(out *InvokeStrategy)

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

func (InvokeStrategy) SwaggerDoc added in v1.13.1

func (InvokeStrategy) SwaggerDoc() map[string]string

func (InvokeStrategy) Validate

func (is InvokeStrategy) Validate() error

type KubernetesWatchTrigger

type KubernetesWatchTrigger struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              KubernetesWatchTriggerSpec `json:"spec"`
}

KubernetesWatchTrigger watches kubernetes resource events and invokes functions. +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status

func (*KubernetesWatchTrigger) DeepCopy

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

func (*KubernetesWatchTrigger) DeepCopyInto

func (in *KubernetesWatchTrigger) DeepCopyInto(out *KubernetesWatchTrigger)

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

func (*KubernetesWatchTrigger) DeepCopyObject

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

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

func (*KubernetesWatchTrigger) Default added in v1.18.0

func (r *KubernetesWatchTrigger) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*KubernetesWatchTrigger) SetupWebhookWithManager added in v1.18.0

func (r *KubernetesWatchTrigger) SetupWebhookWithManager(mgr ctrl.Manager) error

func (KubernetesWatchTrigger) SwaggerDoc added in v1.13.1

func (KubernetesWatchTrigger) SwaggerDoc() map[string]string

func (*KubernetesWatchTrigger) Validate

func (k *KubernetesWatchTrigger) Validate() error

func (*KubernetesWatchTrigger) ValidateCreate added in v1.18.0

func (r *KubernetesWatchTrigger) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*KubernetesWatchTrigger) ValidateDelete added in v1.18.0

func (r *KubernetesWatchTrigger) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*KubernetesWatchTrigger) ValidateUpdate added in v1.18.0

func (r *KubernetesWatchTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type KubernetesWatchTriggerList

type KubernetesWatchTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []KubernetesWatchTrigger `json:"items"`
}

KubernetesWatchTriggerList is a list of KubernetesWatchTriggers +kubebuilder:object:root=true

func (*KubernetesWatchTriggerList) DeepCopy

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

func (*KubernetesWatchTriggerList) DeepCopyInto

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

func (*KubernetesWatchTriggerList) DeepCopyObject

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

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

func (KubernetesWatchTriggerList) SwaggerDoc added in v1.13.1

func (KubernetesWatchTriggerList) SwaggerDoc() map[string]string

func (*KubernetesWatchTriggerList) Validate

func (kl *KubernetesWatchTriggerList) Validate() error

type KubernetesWatchTriggerSpec

type KubernetesWatchTriggerSpec struct {
	Namespace string `json:"namespace"`

	// Type of resource to watch (Pod, Service, etc.)
	Type string `json:"type"`

	// Resource labels
	// +optional
	LabelSelector map[string]string `json:"labelselector"`

	// The reference to a function for kubewatcher to invoke with
	// when receiving events.
	FunctionReference FunctionReference `json:"functionref"`
}

KubernetesWatchTriggerSpec defines spec of KuberenetesWatchTrigger

func (*KubernetesWatchTriggerSpec) DeepCopy

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

func (*KubernetesWatchTriggerSpec) DeepCopyInto

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

func (KubernetesWatchTriggerSpec) SwaggerDoc added in v1.13.1

func (KubernetesWatchTriggerSpec) SwaggerDoc() map[string]string

func (KubernetesWatchTriggerSpec) Validate

func (spec KubernetesWatchTriggerSpec) Validate() error

type MessageQueueTrigger

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

	Spec MessageQueueTriggerSpec `json:"spec"`
}

MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to. +genclient +kubebuilder:object:root=true

func (*MessageQueueTrigger) DeepCopy

func (in *MessageQueueTrigger) DeepCopy() *MessageQueueTrigger

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

func (*MessageQueueTrigger) DeepCopyInto

func (in *MessageQueueTrigger) DeepCopyInto(out *MessageQueueTrigger)

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

func (*MessageQueueTrigger) DeepCopyObject

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

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

func (*MessageQueueTrigger) Default added in v1.18.0

func (r *MessageQueueTrigger) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*MessageQueueTrigger) SetupWebhookWithManager added in v1.18.0

func (r *MessageQueueTrigger) SetupWebhookWithManager(mgr ctrl.Manager) error

func (MessageQueueTrigger) SwaggerDoc added in v1.13.1

func (MessageQueueTrigger) SwaggerDoc() map[string]string

func (*MessageQueueTrigger) Validate

func (m *MessageQueueTrigger) Validate() error

func (*MessageQueueTrigger) ValidateCreate added in v1.18.0

func (r *MessageQueueTrigger) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*MessageQueueTrigger) ValidateDelete added in v1.18.0

func (r *MessageQueueTrigger) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*MessageQueueTrigger) ValidateUpdate added in v1.18.0

func (r *MessageQueueTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MessageQueueTriggerList

type MessageQueueTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []MessageQueueTrigger `json:"items"`
}

MessageQueueTriggerList is a list of MessageQueueTriggers. +kubebuilder:object:root=true

func (*MessageQueueTriggerList) DeepCopy

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

func (*MessageQueueTriggerList) DeepCopyInto

func (in *MessageQueueTriggerList) DeepCopyInto(out *MessageQueueTriggerList)

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

func (*MessageQueueTriggerList) DeepCopyObject

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

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

func (MessageQueueTriggerList) SwaggerDoc added in v1.13.1

func (MessageQueueTriggerList) SwaggerDoc() map[string]string

func (*MessageQueueTriggerList) Validate

func (ml *MessageQueueTriggerList) Validate() error

type MessageQueueTriggerSpec

type MessageQueueTriggerSpec struct {
	// The reference to a function for message queue trigger to invoke with
	// when receiving messages from subscribed topic.
	// +optional
	FunctionReference FunctionReference `json:"functionref"`

	// Type of message queue
	// +optional
	MessageQueueType MessageQueueType `json:"messageQueueType"`

	// Subscribed topic
	Topic string `json:"topic"`

	// Topic for message queue trigger to sent response from function.
	// +optional
	ResponseTopic string `json:"respTopic,omitempty"`

	// Topic to collect error response sent from function
	// +optional
	ErrorTopic string `json:"errorTopic"`

	// Maximum times for message queue trigger to retry
	// +optional
	MaxRetries int `json:"maxRetries"`

	// Content type of payload
	// +optional
	ContentType string `json:"contentType"`

	// The period to check each trigger source on every ScaledObject, and scale the deployment up or down accordingly
	// +optional
	PollingInterval *int32 `json:"pollingInterval,omitempty"`

	// The period to wait after the last trigger reported active before scaling the deployment back to 0
	// +optional
	CooldownPeriod *int32 `json:"cooldownPeriod,omitempty"`

	// Minimum number of replicas KEDA will scale the deployment down to
	// +optional
	MinReplicaCount *int32 `json:"minReplicaCount,omitempty"`

	// Maximum number of replicas KEDA will scale the deployment up to
	// +optional
	MaxReplicaCount *int32 `json:"maxReplicaCount,omitempty"`

	// ScalerTrigger fields
	// +optional
	Metadata map[string]string `json:"metadata"`

	// Secret name
	// +optional
	Secret string `json:"secret,omitempty"`

	// Kind of Message Queue Trigger to be created, by default its fission
	// +optional
	MqtKind string `json:"mqtkind,omitempty"`

	// (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec
	// The merging logic is briefly described below and detailed MergePodSpec function
	// - Volumes mounts and env variables for function and fetcher container are appended
	// - All additional containers and init containers are appended
	// - Volume definitions are appended
	// - Lists such as tolerations, ImagePullSecrets, HostAliases are appended
	// - Structs are merged and variables from pod spec take precedence
	// +optional
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

MessageQueueTriggerSpec defines a binding from a topic in a message queue to a function.

func (*MessageQueueTriggerSpec) DeepCopy

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

func (*MessageQueueTriggerSpec) DeepCopyInto

func (in *MessageQueueTriggerSpec) DeepCopyInto(out *MessageQueueTriggerSpec)

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

func (MessageQueueTriggerSpec) SwaggerDoc added in v1.13.1

func (MessageQueueTriggerSpec) SwaggerDoc() map[string]string

func (MessageQueueTriggerSpec) Validate

func (spec MessageQueueTriggerSpec) Validate() error

type MessageQueueType

type MessageQueueType string

MessageQueueType refers to Type of message queue

type Package

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

	Spec PackageSpec `json:"spec"`

	// Status indicates the build status of package.
	//+optional
	Status PackageStatus `json:"status"`
}

Package Think of these as function-level images. +genclient +kubebuilder:object:root=true +kubebuilder:resource:singular="package",scope="Namespaced",shortName={pkg}

func (*Package) DeepCopy

func (in *Package) DeepCopy() *Package

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

func (*Package) DeepCopyInto

func (in *Package) DeepCopyInto(out *Package)

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

func (*Package) DeepCopyObject

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

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

func (*Package) Default added in v1.18.0

func (r *Package) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Package) SetupWebhookWithManager added in v1.18.0

func (r *Package) SetupWebhookWithManager(mgr ctrl.Manager) error

func (Package) SwaggerDoc added in v1.13.1

func (Package) SwaggerDoc() map[string]string

func (*Package) Validate

func (p *Package) Validate() error

func (*Package) ValidateCreate added in v1.18.0

func (r *Package) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Package) ValidateDelete added in v1.18.0

func (r *Package) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Package) ValidateUpdate added in v1.18.0

func (r *Package) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PackageList

type PackageList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Package `json:"items"`
}

PackageList is a list of Packages. +kubebuilder:object:root=true

func (*PackageList) DeepCopy

func (in *PackageList) DeepCopy() *PackageList

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

func (*PackageList) DeepCopyInto

func (in *PackageList) DeepCopyInto(out *PackageList)

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

func (*PackageList) DeepCopyObject

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

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

func (PackageList) SwaggerDoc added in v1.13.1

func (PackageList) SwaggerDoc() map[string]string

func (*PackageList) Validate

func (pl *PackageList) Validate() error

type PackageRef

type PackageRef struct {
	// +optional
	Namespace string `json:"namespace"`
	// +optional
	Name string `json:"name"`

	// Including resource version in the reference forces the function to be updated on
	// package update, making it possible to cache the function based on its metadata.
	ResourceVersion string `json:"resourceversion,omitempty"`
}

PackageRef is a reference to the package.

func (*PackageRef) DeepCopy

func (in *PackageRef) DeepCopy() *PackageRef

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

func (*PackageRef) DeepCopyInto

func (in *PackageRef) DeepCopyInto(out *PackageRef)

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

func (PackageRef) SwaggerDoc added in v1.13.1

func (PackageRef) SwaggerDoc() map[string]string

func (PackageRef) Validate

func (ref PackageRef) Validate() error

type PackageSpec

type PackageSpec struct {
	// Environment is a reference to the environment for building source archive.
	Environment EnvironmentReference `json:"environment"`

	// Source is the archive contains source code and dependencies file.
	// If the package status is in PENDING state, builder manager will then
	// notify builder to compile source and save the result as deployable archive.
	// +optional
	Source Archive `json:"source,omitempty"`

	// Deployment is the deployable archive that environment runtime used to run user function.
	// +optional
	Deployment Archive `json:"deployment,omitempty"`

	// BuildCommand is a custom build command that builder used to build the source archive.
	// +optional
	BuildCommand string `json:"buildcmd,omitempty"`
}

PackageSpec includes source/deploy archives and the reference of environment to build the package.

func (*PackageSpec) DeepCopy

func (in *PackageSpec) DeepCopy() *PackageSpec

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

func (*PackageSpec) DeepCopyInto

func (in *PackageSpec) DeepCopyInto(out *PackageSpec)

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

func (PackageSpec) SwaggerDoc added in v1.13.1

func (PackageSpec) SwaggerDoc() map[string]string

func (PackageSpec) Validate

func (spec PackageSpec) Validate() error

type PackageStatus

type PackageStatus struct {

	// BuildStatus is the package build status.
	// +kubebuilder:default:="pending"
	BuildStatus BuildStatus `json:"buildstatus,omitempty"`

	// BuildLog stores build log during the compilation.
	// +optional
	BuildLog string `json:"buildlog,omitempty"` // output of the build (errors etc)

	// LastUpdateTimestamp will store the timestamp the package was last updated
	// metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
	// https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
	// +optional
	// +nullable
	LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"`
}

PackageStatus contains the build status of a package also the build log for examination.

func (*PackageStatus) DeepCopy

func (in *PackageStatus) DeepCopy() *PackageStatus

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

func (*PackageStatus) DeepCopyInto

func (in *PackageStatus) DeepCopyInto(out *PackageStatus)

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

func (PackageStatus) SwaggerDoc added in v1.13.1

func (PackageStatus) SwaggerDoc() map[string]string

func (PackageStatus) Validate

func (sts PackageStatus) Validate() error

type RouterAuthToken added in v1.16.0

type RouterAuthToken struct {
	AccessToken string `json:"accesstoken"`
	TokenType   string `json:"tokentype"`
}

RouterAuthToken defines the authorization token for accessing router

func (*RouterAuthToken) DeepCopy added in v1.16.0

func (in *RouterAuthToken) DeepCopy() *RouterAuthToken

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

func (*RouterAuthToken) DeepCopyInto added in v1.16.0

func (in *RouterAuthToken) DeepCopyInto(out *RouterAuthToken)

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

func (RouterAuthToken) SwaggerDoc added in v1.16.0

func (RouterAuthToken) SwaggerDoc() map[string]string

type Runtime

type Runtime struct {
	// Image for containing the language runtime.
	Image string `json:"image"`

	// NOT USED NOW
	// LoadEndpointPort defines the port on which the
	// server listens for function load
	// requests. Optional; default 8888.
	LoadEndpointPort int32 `json:"-"` // `json:"loadendpointport"`

	// NOT USED NOW
	// LoadEndpointPath defines the relative URL on which
	// the server listens for function load
	// requests. Optional; default "/specialize".
	LoadEndpointPath string `json:"-"` // `json:"loadendpointpath"`

	// NOT USED NOW
	// FunctionEndpointPort defines the port on which the
	// server listens for function requests. Optional;
	// default 8888.
	FunctionEndpointPort int32 `json:"-"` // `json:"functionendpointport"`

	// (Optional) Container allows the modification of the deployed runtime
	// container using the Kubernetes Container spec. Fission overrides
	// the following fields:
	// - Name
	// - Image; set to the Runtime.Image
	// - TerminationMessagePath
	// - ImagePullPolicy
	//
	// You can set either PodSpec or Container, but not both.
	// kubebuilder:validation:XPreserveUnknownFields=true
	Container *apiv1.Container `json:"container,omitempty"`

	// (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec
	// The merging logic is briefly described below and detailed MergePodSpec function
	// - Volumes mounts and env variables for function and fetcher container are appended
	// - All additional containers and init containers are appended
	// - Volume definitions are appended
	// - Lists such as tolerations, ImagePullSecrets, HostAliases are appended
	// - Structs are merged and variables from pod spec take precedence
	//
	// You can set either PodSpec or Container, but not both.
	PodSpec *apiv1.PodSpec `json:"podspec,omitempty"`
}

Runtime is the setting for environment runtime.

func (*Runtime) DeepCopy

func (in *Runtime) DeepCopy() *Runtime

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

func (*Runtime) DeepCopyInto

func (in *Runtime) DeepCopyInto(out *Runtime)

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

func (Runtime) SwaggerDoc added in v1.13.1

func (Runtime) SwaggerDoc() map[string]string

func (Runtime) Validate

func (runtime Runtime) Validate() error

type SecretReference

type SecretReference struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

SecretReference is a reference to a kubernetes secret.

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

func (SecretReference) SwaggerDoc added in v1.13.1

func (SecretReference) SwaggerDoc() map[string]string

func (SecretReference) Validate

func (ref SecretReference) Validate() error

type StrategyType

type StrategyType string

StrategyType is the strategy to be used for function execution

type TimeTrigger

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

	Spec TimeTriggerSpec `json:"spec"`
}

TimeTrigger invokes functions based on given cron schedule. +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status

func (*TimeTrigger) DeepCopy

func (in *TimeTrigger) DeepCopy() *TimeTrigger

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

func (*TimeTrigger) DeepCopyInto

func (in *TimeTrigger) DeepCopyInto(out *TimeTrigger)

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

func (*TimeTrigger) DeepCopyObject

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

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

func (*TimeTrigger) Default added in v1.18.0

func (r *TimeTrigger) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*TimeTrigger) SetupWebhookWithManager added in v1.18.0

func (r *TimeTrigger) SetupWebhookWithManager(mgr ctrl.Manager) error

func (TimeTrigger) SwaggerDoc added in v1.13.1

func (TimeTrigger) SwaggerDoc() map[string]string

func (*TimeTrigger) Validate

func (t *TimeTrigger) Validate() error

func (*TimeTrigger) ValidateCreate added in v1.18.0

func (r *TimeTrigger) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*TimeTrigger) ValidateDelete added in v1.18.0

func (r *TimeTrigger) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*TimeTrigger) ValidateUpdate added in v1.18.0

func (r *TimeTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type TimeTriggerList

type TimeTriggerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []TimeTrigger `json:"items"`
}

TimeTriggerList is a list of TimeTriggers. +kubebuilder:object:root=true

func (*TimeTriggerList) DeepCopy

func (in *TimeTriggerList) DeepCopy() *TimeTriggerList

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

func (*TimeTriggerList) DeepCopyInto

func (in *TimeTriggerList) DeepCopyInto(out *TimeTriggerList)

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

func (*TimeTriggerList) DeepCopyObject

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

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

func (TimeTriggerList) SwaggerDoc added in v1.13.1

func (TimeTriggerList) SwaggerDoc() map[string]string

func (*TimeTriggerList) Validate

func (tl *TimeTriggerList) Validate() error

type TimeTriggerSpec

type TimeTriggerSpec struct {
	// Cron schedule
	Cron string `json:"cron"`

	// The reference to function
	FunctionReference `json:"functionref"`
}

TimeTriggerSpec invokes the specific function at a time or times specified by a cron string.

func (*TimeTriggerSpec) DeepCopy

func (in *TimeTriggerSpec) DeepCopy() *TimeTriggerSpec

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

func (*TimeTriggerSpec) DeepCopyInto

func (in *TimeTriggerSpec) DeepCopyInto(out *TimeTriggerSpec)

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

func (TimeTriggerSpec) SwaggerDoc added in v1.13.1

func (TimeTriggerSpec) SwaggerDoc() map[string]string

func (TimeTriggerSpec) Validate

func (spec TimeTriggerSpec) Validate() error

type ValidationError

type ValidationError struct {
	// Type of validation error.
	// It indicates what kind of error of field in error output.
	Type ValidationErrorType

	// Name of error field.
	// Example: FunctionReference.Name
	Field string

	// Error field value.
	BadValue string

	// Detail error message
	Detail string
}

ValidationError is a custom error type for resource validation. It indicate which field is invalid or illegal in the fission resource. Also, it shows what kind of error type, bad value and detail error messages.

func MakeValidationErr

func MakeValidationErr(errType ValidationErrorType, field string, val interface{}, detail ...string) ValidationError

func (*ValidationError) DeepCopy

func (in *ValidationError) DeepCopy() *ValidationError

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

func (*ValidationError) DeepCopyInto

func (in *ValidationError) DeepCopyInto(out *ValidationError)

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

func (ValidationError) Error

func (e ValidationError) Error() string

type ValidationErrorType

type ValidationErrorType int

Jump to

Keyboard shortcuts

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