Documentation ¶
Index ¶
- Constants
- Variables
- func ParseReplicasPresets(presetsMap string) (map[string]ReplicasPreset, error)
- func ParseResourcePresets(presetsMap string) (map[string]ResourcesPreset, error)
- func ParseRuntimePresets(presetsMap string) (map[string]string, error)
- func Resource(resource string) schema.GroupResource
- func ValidateDependencies(runtime Runtime, dependencies string) error
- type BuildJobDefaulting
- type BuildJobResourcesDefaulting
- type Condition
- type ConditionReason
- type ConditionType
- type DefaultingConfig
- type Function
- type FunctionDefaulting
- type FunctionList
- type FunctionReplicasDefaulting
- type FunctionResourcesDefaulting
- type FunctionSpec
- type FunctionStatus
- type GitRepository
- type GitRepositoryList
- type GitRepositorySpec
- type MinBuildJobResourcesValues
- type MinBuildJobValues
- type MinFunctionReplicasValues
- type MinFunctionResourcesValues
- type MinFunctionValues
- type ReplicasPreset
- type Repository
- type RepositoryAuth
- type RepositoryAuthType
- type ResourcesPreset
- type Runtime
- type RuntimeExtended
- type SourceType
- type ValidationConfig
Constants ¶
const ( ReplicasPresetLabel = "serverless.kyma-project.io/replicas-preset" FunctionResourcesPresetLabel = "serverless.kyma-project.io/function-resources-preset" BuildResourcesPresetLabel = "serverless.kyma-project.io/build-resources-preset" )
const ( FunctionNameLabel = "serverless.kyma-project.io/function-name" FunctionManagedByLabel = "serverless.kyma-project.io/managed-by" FunctionControllerValue = "function-controller" FunctionUUIDLabel = "serverless.kyma-project.io/uuid" FunctionResourceLabel = "serverless.kyma-project.io/resource" FunctionResourceLabelDeploymentValue = "deployment" FunctionResourceLabelUserValue = "user" )
const DefaultingConfigKey = "defaulting-config"
const ValidationConfigKey = "validation-config"
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "serverless.kyma-project.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 ¶
func ParseReplicasPresets ¶
func ParseReplicasPresets(presetsMap string) (map[string]ReplicasPreset, error)
func ParseResourcePresets ¶
func ParseResourcePresets(presetsMap string) (map[string]ResourcesPreset, error)
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
func ValidateDependencies ¶
Types ¶
type BuildJobDefaulting ¶
type BuildJobDefaulting struct {
Resources BuildJobResourcesDefaulting
}
func (*BuildJobDefaulting) DeepCopy ¶
func (in *BuildJobDefaulting) DeepCopy() *BuildJobDefaulting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildJobDefaulting.
func (*BuildJobDefaulting) DeepCopyInto ¶
func (in *BuildJobDefaulting) DeepCopyInto(out *BuildJobDefaulting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildJobResourcesDefaulting ¶
type BuildJobResourcesDefaulting struct { DefaultPreset string `envconfig:"default=normal"` Presets map[string]ResourcesPreset `envconfig:"-"` PresetsMap string `envconfig:"default={}"` }
func (*BuildJobResourcesDefaulting) DeepCopy ¶
func (in *BuildJobResourcesDefaulting) DeepCopy() *BuildJobResourcesDefaulting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildJobResourcesDefaulting.
func (*BuildJobResourcesDefaulting) DeepCopyInto ¶
func (in *BuildJobResourcesDefaulting) DeepCopyInto(out *BuildJobResourcesDefaulting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct { Type ConditionType `json:"type,omitempty"` Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` Reason ConditionReason `json:"reason,omitempty"` Message string `json:"message,omitempty"` }
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionReason ¶
type ConditionReason string
const ( ConditionReasonConfigMapCreated ConditionReason = "ConfigMapCreated" ConditionReasonConfigMapUpdated ConditionReason = "ConfigMapUpdated" ConditionReasonSourceUpdated ConditionReason = "SourceUpdated" ConditionReasonSourceUpdateFailed ConditionReason = "SourceUpdateFailed" ConditionReasonGitAuthorizationFailed ConditionReason = "GitAuthorizationFailed" ConditionReasonJobFailed ConditionReason = "JobFailed" ConditionReasonJobCreated ConditionReason = "JobCreated" ConditionReasonJobUpdated ConditionReason = "JobUpdated" ConditionReasonJobRunning ConditionReason = "JobRunning" ConditionReasonJobsDeleted ConditionReason = "JobsDeleted" ConditionReasonJobFinished ConditionReason = "JobFinished" ConditionReasonDeploymentCreated ConditionReason = "DeploymentCreated" ConditionReasonDeploymentUpdated ConditionReason = "DeploymentUpdated" ConditionReasonDeploymentFailed ConditionReason = "DeploymentFailed" ConditionReasonDeploymentWaiting ConditionReason = "DeploymentWaiting" ConditionReasonDeploymentReady ConditionReason = "DeploymentReady" ConditionReasonServiceCreated ConditionReason = "ServiceCreated" ConditionReasonServiceUpdated ConditionReason = "ServiceUpdated" ConditionReasonHorizontalPodAutoscalerCreated ConditionReason = "HorizontalPodAutoscalerCreated" ConditionReasonHorizontalPodAutoscalerUpdated ConditionReason = "HorizontalPodAutoscalerUpdated" ConditionReasonMinReplicasNotAvailable ConditionReason = "MinReplicasNotAvailable" )
type ConditionType ¶
type ConditionType string
ConditionType defines condition of function.
const ( ConditionRunning ConditionType = "Running" ConditionConfigurationReady ConditionType = "ConfigurationReady" ConditionBuildReady ConditionType = "BuildReady" )
type DefaultingConfig ¶
type DefaultingConfig struct { Function FunctionDefaulting BuildJob BuildJobDefaulting Runtime Runtime `envconfig:"default=nodejs14"` }
func (*DefaultingConfig) DeepCopy ¶
func (in *DefaultingConfig) DeepCopy() *DefaultingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultingConfig.
func (*DefaultingConfig) DeepCopyInto ¶
func (in *DefaultingConfig) DeepCopyInto(out *DefaultingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Function ¶
type Function struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FunctionSpec `json:"spec,omitempty"` Status FunctionStatus `json:"status,omitempty"` }
func (*Function) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Function.
func (*Function) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Function) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Function) SetDefaults ¶
type FunctionDefaulting ¶
type FunctionDefaulting struct { Replicas FunctionReplicasDefaulting Resources FunctionResourcesDefaulting }
func (*FunctionDefaulting) DeepCopy ¶
func (in *FunctionDefaulting) DeepCopy() *FunctionDefaulting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionDefaulting.
func (*FunctionDefaulting) DeepCopyInto ¶
func (in *FunctionDefaulting) DeepCopyInto(out *FunctionDefaulting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FunctionList ¶
type FunctionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Function `json:"items"` }
FunctionList contains a list of Function
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.
type FunctionReplicasDefaulting ¶
type FunctionReplicasDefaulting struct { DefaultPreset string `envconfig:"default=S"` Presets map[string]ReplicasPreset `envconfig:"-"` PresetsMap string `envconfig:"default={}"` }
func (*FunctionReplicasDefaulting) DeepCopy ¶
func (in *FunctionReplicasDefaulting) DeepCopy() *FunctionReplicasDefaulting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionReplicasDefaulting.
func (*FunctionReplicasDefaulting) DeepCopyInto ¶
func (in *FunctionReplicasDefaulting) DeepCopyInto(out *FunctionReplicasDefaulting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FunctionResourcesDefaulting ¶
type FunctionResourcesDefaulting struct { DefaultPreset string `envconfig:"default=M"` Presets map[string]ResourcesPreset `envconfig:"-"` PresetsMap string `envconfig:"default={}"` RuntimePresets map[string]string `envconfig:"-"` RuntimePresetsMap string `envconfig:"default={}"` }
func (*FunctionResourcesDefaulting) DeepCopy ¶
func (in *FunctionResourcesDefaulting) DeepCopy() *FunctionResourcesDefaulting
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionResourcesDefaulting.
func (*FunctionResourcesDefaulting) DeepCopyInto ¶
func (in *FunctionResourcesDefaulting) DeepCopyInto(out *FunctionResourcesDefaulting)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FunctionSpec ¶
type FunctionSpec struct { // Source defines the source code of a function Source string `json:"source"` // Deps defines the dependencies for a function Deps string `json:"deps,omitempty"` // +optional Runtime Runtime `json:"runtime,omitempty"` // Env defines an array of key value pairs need to be used as env variable for a function Env []corev1.EnvVar `json:"env,omitempty"` // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // +optional BuildResources corev1.ResourceRequirements `json:"buildResources,omitempty"` // +kubebuilder:validation:Minimum:=1 MinReplicas *int32 `json:"minReplicas,omitempty"` // +kubebuilder:validation:Minimum:=1 MaxReplicas *int32 `json:"maxReplicas,omitempty"` // +optional Labels map[string]string `json:"labels,omitempty"` // +optional Type SourceType `json:"type,omitempty"` Repository `json:",inline,omitempty"` }
FunctionSpec defines the desired state of 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.
type FunctionStatus ¶
type FunctionStatus struct { Conditions []Condition `json:"conditions,omitempty"` Repository `json:",inline,omitempty"` Commit string `json:"commit,omitempty"` Source string `json:"source,omitempty"` Runtime RuntimeExtended `json:"runtime,omitempty"` }
FunctionStatus defines the observed state of Function
func (*FunctionStatus) DeepCopy ¶
func (in *FunctionStatus) DeepCopy() *FunctionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionStatus.
func (*FunctionStatus) DeepCopyInto ¶
func (in *FunctionStatus) DeepCopyInto(out *FunctionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitRepository ¶
type GitRepository struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GitRepositorySpec `json:"spec,omitempty"` }
GitRepository is the Schema for the gitrepositories API +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.url` +kubebuilder:printcolumn:name="Auth",type=string,JSONPath=`.spec.auth.type`
func (*GitRepository) DeepCopy ¶
func (in *GitRepository) DeepCopy() *GitRepository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepository.
func (*GitRepository) DeepCopyInto ¶
func (in *GitRepository) DeepCopyInto(out *GitRepository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitRepository) DeepCopyObject ¶
func (in *GitRepository) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GitRepository) SetDefaults ¶
func (in *GitRepository) SetDefaults(context.Context)
func (*GitRepository) Validate ¶
func (in *GitRepository) Validate(_ context.Context) *apis.FieldError
type GitRepositoryList ¶
type GitRepositoryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GitRepository `json:"items"` }
GitRepositoryList contains a list of GitRepository
func (*GitRepositoryList) DeepCopy ¶
func (in *GitRepositoryList) DeepCopy() *GitRepositoryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryList.
func (*GitRepositoryList) DeepCopyInto ¶
func (in *GitRepositoryList) DeepCopyInto(out *GitRepositoryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitRepositoryList) DeepCopyObject ¶
func (in *GitRepositoryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GitRepositorySpec ¶
type GitRepositorySpec struct { // URL is the address of GIT repository URL string `json:"url"` // Auth is the optional definition of authentication that should be used for repository operations // +optional Auth *RepositoryAuth `json:"auth,omitempty"` }
GitRepositorySpec defines the desired state of GitRepository
func (*GitRepositorySpec) DeepCopy ¶
func (in *GitRepositorySpec) DeepCopy() *GitRepositorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositorySpec.
func (*GitRepositorySpec) DeepCopyInto ¶
func (in *GitRepositorySpec) DeepCopyInto(out *GitRepositorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinBuildJobResourcesValues ¶
type MinBuildJobResourcesValues struct { MinRequestCpu string `envconfig:"default=200m"` MinRequestMemory string `envconfig:"default=200Mi"` }
func (*MinBuildJobResourcesValues) DeepCopy ¶
func (in *MinBuildJobResourcesValues) DeepCopy() *MinBuildJobResourcesValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinBuildJobResourcesValues.
func (*MinBuildJobResourcesValues) DeepCopyInto ¶
func (in *MinBuildJobResourcesValues) DeepCopyInto(out *MinBuildJobResourcesValues)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinBuildJobValues ¶
type MinBuildJobValues struct {
Resources MinBuildJobResourcesValues
}
func (*MinBuildJobValues) DeepCopy ¶
func (in *MinBuildJobValues) DeepCopy() *MinBuildJobValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinBuildJobValues.
func (*MinBuildJobValues) DeepCopyInto ¶
func (in *MinBuildJobValues) DeepCopyInto(out *MinBuildJobValues)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinFunctionReplicasValues ¶
type MinFunctionReplicasValues struct {
MinValue int32 `envconfig:"default=1"`
}
func (*MinFunctionReplicasValues) DeepCopy ¶
func (in *MinFunctionReplicasValues) DeepCopy() *MinFunctionReplicasValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinFunctionReplicasValues.
func (*MinFunctionReplicasValues) DeepCopyInto ¶
func (in *MinFunctionReplicasValues) DeepCopyInto(out *MinFunctionReplicasValues)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinFunctionResourcesValues ¶
type MinFunctionResourcesValues struct { MinRequestCpu string `envconfig:"default=10m"` MinRequestMemory string `envconfig:"default=16Mi"` }
func (*MinFunctionResourcesValues) DeepCopy ¶
func (in *MinFunctionResourcesValues) DeepCopy() *MinFunctionResourcesValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinFunctionResourcesValues.
func (*MinFunctionResourcesValues) DeepCopyInto ¶
func (in *MinFunctionResourcesValues) DeepCopyInto(out *MinFunctionResourcesValues)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinFunctionValues ¶
type MinFunctionValues struct { Replicas MinFunctionReplicasValues Resources MinFunctionResourcesValues }
func (*MinFunctionValues) DeepCopy ¶
func (in *MinFunctionValues) DeepCopy() *MinFunctionValues
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinFunctionValues.
func (*MinFunctionValues) DeepCopyInto ¶
func (in *MinFunctionValues) DeepCopyInto(out *MinFunctionValues)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicasPreset ¶
func (*ReplicasPreset) DeepCopy ¶
func (in *ReplicasPreset) DeepCopy() *ReplicasPreset
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicasPreset.
func (*ReplicasPreset) DeepCopyInto ¶
func (in *ReplicasPreset) DeepCopyInto(out *ReplicasPreset)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Repository ¶
type Repository struct { BaseDir string `json:"baseDir,omitempty"` Reference string `json:"reference,omitempty"` }
func (*Repository) DeepCopy ¶
func (in *Repository) DeepCopy() *Repository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.
func (*Repository) DeepCopyInto ¶
func (in *Repository) DeepCopyInto(out *Repository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepositoryAuth ¶
type RepositoryAuth struct { // Type is the type of authentication Type RepositoryAuthType `json:"type"` // SecretName is the name of Kubernetes Secret containing credentials used for authentication SecretName string `json:"secretName"` }
RepositoryAuth defines authentication method used for repository operations
func (*RepositoryAuth) DeepCopy ¶
func (in *RepositoryAuth) DeepCopy() *RepositoryAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryAuth.
func (*RepositoryAuth) DeepCopyInto ¶
func (in *RepositoryAuth) DeepCopyInto(out *RepositoryAuth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepositoryAuthType ¶
type RepositoryAuthType string
RepositoryAuthType is the enum of available authentication types +kubebuilder:validation:Enum=basic;key
const ( RepositoryAuthBasic RepositoryAuthType = "basic" RepositoryAuthSSHKey = "key" )
type ResourcesPreset ¶
type ResourcesPreset struct { RequestCpu string `json:"requestCpu,omitempty"` RequestMemory string `json:"requestMemory,omitempty"` LimitCpu string `json:"limitCpu,omitempty"` LimitMemory string `json:"limitMemory,omitempty"` }
func (*ResourcesPreset) DeepCopy ¶
func (in *ResourcesPreset) DeepCopy() *ResourcesPreset
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesPreset.
func (*ResourcesPreset) DeepCopyInto ¶
func (in *ResourcesPreset) DeepCopyInto(out *ResourcesPreset)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Runtime ¶
type Runtime string
Runtime enumerates runtimes that are currently supported by Function Controller It is a subset of RuntimeExtended +kubebuilder:validation:Enum=nodejs12;nodejs14;python38;python39
type RuntimeExtended ¶
type RuntimeExtended string
RuntimeExtended enumerates runtimes that are either currently supported or no longer supported but there still might be "read-only" Functions using them +kubebuilder:validation:Enum=nodejs12;nodejs14;python38;nodejs10;python39
const ( RuntimeExtendedNodejs10 RuntimeExtended = "nodejs10" RuntimeExtendedNodejs12 RuntimeExtended = "nodejs12" RuntimeExtendedNodejs14 RuntimeExtended = "nodejs14" RuntimeExtendedPython38 RuntimeExtended = "python38" RuntimeExtendedPython39 RuntimeExtended = "python39" )
type ValidationConfig ¶
type ValidationConfig struct { ReservedEnvs []string `envconfig:"default={}"` Function MinFunctionValues BuildJob MinBuildJobValues }
func (*ValidationConfig) DeepCopy ¶
func (in *ValidationConfig) DeepCopy() *ValidationConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationConfig.
func (*ValidationConfig) DeepCopyInto ¶
func (in *ValidationConfig) DeepCopyInto(out *ValidationConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.