v1alpha1

package
v0.0.0-...-f333cfc Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io

Index

Constants

View Source
const (
	ServerlessGroup   = "operator.kyma-project.io"
	ServerlessVersion = "v1alpha1"
	ServerlessKind    = "Serverless"
)
View Source
const (
	DefaultEnableInternal   = false
	DefaultRegistryAddress  = "k3d-kyma-registry:5000"
	DefaultServerAddress    = "k3d-kyma-registry:5000"
	EndpointDisabled        = ""
	DefaultEventingEndpoint = "http://eventing-publisher-proxy.kyma-system.svc.cluster.local/publish"
)
View Source
const (
	StateReady      State = "Ready"
	StateProcessing State = "Processing"
	StateWarning    State = "Warning"
	StateError      State = "Error"
	StateDeleting   State = "Deleting"

	ServedTrue  Served = "True"
	ServedFalse Served = "False"

	// installation and deletion details
	ConditionTypeInstalled = ConditionType("Installed")

	// prerequisites and soft dependencies
	ConditionTypeConfigured = ConditionType("Configured")

	// deletion
	ConditionTypeDeleted = ConditionType("Deleted")

	ConditionReasonConfiguration        = ConditionReason("Configuration")
	ConditionReasonConfigurationErr     = ConditionReason("ConfigurationErr")
	ConditionReasonConfigured           = ConditionReason("Configured")
	ConditionReasonInstallation         = ConditionReason("Installation")
	ConditionReasonInstallationErr      = ConditionReason("InstallationErr")
	ConditionReasonInstalled            = ConditionReason("Installed")
	ConditionReasonServerlessDuplicated = ConditionReason("ServerlessDuplicated")
	ConditionReasonDeletion             = ConditionReason("Deletion")
	ConditionReasonDeletionErr          = ConditionReason("DeletionErr")
	ConditionReasonDeleted              = ConditionReason("Deleted")

	Finalizer = "serverless-operator.kyma-project.io/deletion-hook"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: ServerlessGroup, Version: ServerlessVersion}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ConditionReason

type ConditionReason string

type ConditionType

type ConditionType string

type DockerRegistry

type DockerRegistry struct {
	// When set to true, the internal Docker registry is enabled
	EnableInternal *bool `json:"enableInternal,omitempty"`
	// Secret used for configuration of the Docker registry
	SecretName *string `json:"secretName,omitempty"`
}

func (*DockerRegistry) DeepCopy

func (in *DockerRegistry) DeepCopy() *DockerRegistry

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

func (*DockerRegistry) DeepCopyInto

func (in *DockerRegistry) DeepCopyInto(out *DockerRegistry)

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

type Endpoint

type Endpoint struct {
	Endpoint string `json:"endpoint"`
}

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type Served

type Served string

type Serverless

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

	Spec   ServerlessSpec   `json:"spec,omitempty"`
	Status ServerlessStatus `json:"status,omitempty"`
}

Serverless is the Schema for the serverlesses API

func (*Serverless) DeepCopy

func (in *Serverless) DeepCopy() *Serverless

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

func (*Serverless) DeepCopyInto

func (in *Serverless) DeepCopyInto(out *Serverless)

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

func (*Serverless) DeepCopyObject

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

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

func (*Serverless) IsCondition

func (s *Serverless) IsCondition(conditionType ConditionType) bool

func (*Serverless) IsConditionTrue

func (s *Serverless) IsConditionTrue(conditionType ConditionType) bool

func (*Serverless) IsInState

func (s *Serverless) IsInState(state State) bool

func (*Serverless) IsServedEmpty

func (s *Serverless) IsServedEmpty() bool

func (*Serverless) UpdateConditionFalse

func (s *Serverless) UpdateConditionFalse(c ConditionType, r ConditionReason, err error)

func (*Serverless) UpdateConditionTrue

func (s *Serverless) UpdateConditionTrue(c ConditionType, r ConditionReason, msg string)

func (*Serverless) UpdateConditionUnknown

func (s *Serverless) UpdateConditionUnknown(c ConditionType, r ConditionReason, msg string)

type ServerlessList

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

ServerlessList contains a list of Serverless

func (*ServerlessList) DeepCopy

func (in *ServerlessList) DeepCopy() *ServerlessList

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

func (*ServerlessList) DeepCopyInto

func (in *ServerlessList) DeepCopyInto(out *ServerlessList)

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

func (*ServerlessList) DeepCopyObject

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

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

type ServerlessSpec

type ServerlessSpec struct {
	// Used Tracing endpoint
	Tracing *Endpoint `json:"tracing,omitempty"`
	// Used Eventing endpoint
	Eventing       *Endpoint       `json:"eventing,omitempty"`
	DockerRegistry *DockerRegistry `json:"dockerRegistry,omitempty"`
	// Sets a custom CPU utilization threshold for scaling Function Pods
	TargetCPUUtilizationPercentage string `json:"targetCPUUtilizationPercentage,omitempty"`
	// Sets the requeue duration for Function. By default, the Function associated with the default configuration is requeued every 5 minutes
	FunctionRequeueDuration string `json:"functionRequeueDuration,omitempty"`
	// Specifies the arguments passed to the Function build executor
	FunctionBuildExecutorArgs string `json:"functionBuildExecutorArgs,omitempty"`
	// A number of simultaneous jobs that can run at the same time. The default value is `5`
	FunctionBuildMaxSimultaneousJobs string `json:"functionBuildMaxSimultaneousJobs,omitempty"`
	// Sets the timeout for the Function health check. The default value in seconds is `10`
	HealthzLivenessTimeout string `json:"healthzLivenessTimeout,omitempty"`
	// Used to configure the maximum size limit for the request body of a Function. The default value is `1` megabyte
	FunctionRequestBodyLimitMb string `json:"functionRequestBodyLimitMb,omitempty"`
	// Sets the maximum execution time limit for a Function. By default, the value is `180` seconds
	FunctionTimeoutSec string `json:"functionTimeoutSec,omitempty"`
	// Configures the default build Job preset to be used
	DefaultBuildJobPreset string `json:"defaultBuildJobPreset,omitempty"`
	// Configures the default runtime Pod preset to be used
	DefaultRuntimePodPreset string `json:"defaultRuntimePodPreset,omitempty"`
}

ServerlessSpec defines the desired state of Serverless

func (*ServerlessSpec) DeepCopy

func (in *ServerlessSpec) DeepCopy() *ServerlessSpec

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

func (*ServerlessSpec) DeepCopyInto

func (in *ServerlessSpec) DeepCopyInto(out *ServerlessSpec)

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

type ServerlessStatus

type ServerlessStatus struct {
	// Used the Eventing endpoint and the Tracing endpoint.
	EventingEndpoint string `json:"eventingEndpoint,omitempty"`
	TracingEndpoint  string `json:"tracingEndpoint,omitempty"`

	CPUUtilizationPercentage string `json:"targetCPUUtilizationPercentage,omitempty"`
	RequeueDuration          string `json:"functionRequeueDuration,omitempty"`
	BuildExecutorArgs        string `json:"functionBuildExecutorArgs,omitempty"`
	BuildMaxSimultaneousJobs string `json:"functionBuildMaxSimultaneousJobs,omitempty"`
	HealthzLivenessTimeout   string `json:"healthzLivenessTimeout,omitempty"`
	RequestBodyLimitMb       string `json:"functionRequestBodyLimitMb,omitempty"`
	TimeoutSec               string `json:"functionTimeoutSec,omitempty"`
	DefaultBuildJobPreset    string `json:"defaultBuildJobPreset,omitempty"`
	DefaultRuntimePodPreset  string `json:"defaultRuntimePodPreset,omitempty"`

	// Used registry configuration.
	// Contains registry URL or "internal"
	DockerRegistry string `json:"dockerRegistry,omitempty"`

	// State signifies current state of Serverless.
	// Value can be one of ("Ready", "Processing", "Error", "Deleting").
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=Processing;Deleting;Ready;Error;Warning
	State State `json:"state,omitempty"`

	// Served signifies that current Serverless is managed.
	// Value can be one of ("True", "False").
	// +kubebuilder:validation:Enum=True;False
	Served Served `json:"served"`

	// Conditions associated with CustomStatus.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*ServerlessStatus) DeepCopy

func (in *ServerlessStatus) DeepCopy() *ServerlessStatus

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

func (*ServerlessStatus) DeepCopyInto

func (in *ServerlessStatus) DeepCopyInto(out *ServerlessStatus)

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

type State

type State string

Jump to

Keyboard shortcuts

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