Skip to content

Serverless ​

The serverlesses.operator.kyma-project.io CustomResourceDefinition (CRD) is a detailed description of the Serverless configuration that you want to install on your cluster. To get the up-to-date CRD and show the output in the YAML format, run this command:

bash
kubectl get crd serverlesses.operator.kyma-project.io -o yaml

Sample Custom Resource ​

The following Serverless custom resource (CR) shows configuration of Serverless with custom endpoints for eventing and tracing and custom additional configuration.

yaml
apiVersion: operator.kyma-project.io/v1alpha1
kind: Serverless
metadata:
  finalizers:
  - serverless-operator.kyma-project.io/deletion-hook
  name: default
  namespace: kyma-system
spec:
  eventing:
     endpoint: http://eventing-publisher-proxy.kyma-system.svc.cluster.local/publish
  tracing:
     endpoint: http://telemetry-otlp-traces.kyma-system.svc.cluster.local:4318/v1/traces
  functionRequeueDuration: 5m
  healthzLivenessTimeout: "10s"
  defaultRuntimePodPreset: "M"
  logLevel: "info"
  logFormat: "json"
status:
  conditions:
  - lastTransitionTime: "2023-04-28T10:09:37Z"
    message: Configured with default Publisher Proxy URL and default Trace Collector
      URL.
    reason: Configured
    status: "True"
    type: Configured
  - lastTransitionTime: "2023-04-28T10:15:15Z"
    message: Serverless installed
    reason: Installed
    status: "True"
    type: Installed
  eventPublisherProxyURL: http://eventing-publisher-proxy.kyma-system.svc.cluster.local/publish
  state: Ready
  traceCollectorURL: http://telemetry-otlp-traces.kyma-system.svc.cluster.local:4318/v1/traces

Custom Resource Parameters ​

For details, see the Serverless specification file.

Serverless.operator.kyma-project.io/v1alpha1 ​

Spec:

ParameterTypeDescription
eventingobject
eventing.​endpoint (required)stringUsed Eventing endpoint
tracingobject
tracing.​endpoint (required)stringUsed Tracing endpoint
functionRequeueDurationstringSets the requeue duration for Function. By default, the Function associated with the default configuration is requeued every 5 minutes
healthzLivenessTimeoutstringSets the timeout for the Function health check. The default value in seconds is 10
defaultRuntimePodPresetstringConfigures the default runtime Pod preset to be used
logLevelstringSets desired log level to be used. The default value is "info"
logFormatstringSets desired log format to be used. The default value is "json"

Status:

ParameterTypeDescription
conditions[]objectConditions associated with CustomStatus.
conditions.​lastTransitionTime (required)stringSpecifies the last time the condition transitioned from one status to another. This should be when the underlying condition changes. If that is not known, then using the time when the API field changed is acceptable.
conditions.​message (required)stringProvides a human-readable message indicating details about the transition. This may be an empty string.
conditions.​observedGenerationintegerRepresents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
conditions.​reason (required)stringContains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field and whether the values are considered a guaranteed API. The value should be a camelCase string. This field may not be empty.
conditions.​status (required)stringSpecifies the status of the condition. The value is either True, False, or Unknown.
conditions.​type (required)stringSpecifies the condition type in camelCase or in foo.example.com/CamelCase. Many .conditions.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt).
eventingEndpointstringUsed Eventing endpoint.
served (required)stringServed signifies that current Serverless is managed. Value can be one of True, or False.
statestringSignifies the current state of Serverless. Value can be one of Ready, Processing, Error, or Deleting.
tracingEndpointstringUsed Tracing endpoint.
functionRequeueDurationstringUsed the Function requeue duration.
healthzLivenessTimeoutstringUsed the healthz liveness timeout.
defaultRuntimePodPresetstringUsed the default runtime Pod preset.
logLevelstringUsed the log level.
logFormatstringUsed the log format.

Status Reasons ​

Processing of a Serverless CR can succeed, continue, or fail for one of these reasons:

Serverless CR Conditions ​

This section describes the possible states of the Serverless CR. Three condition types, Installed, Configured, DeploymentFailure and Deleted, are used.

NoCR StateCondition typeCondition statusCondition reasonRemark
1ProcessingConfiguredtrueConfiguredServerless configuration verified
2ProcessingConfiguredunknownConfigurationCheckServerless configuration verification ongoing
3ErrorConfiguredfalseConfigurationCheckErrServerless configuration verification error
4ErrorConfiguredfalseServerlessDuplicatedOnly one Serverless CR is allowed
5ReadyInstalledtrueInstalledServerless workloads deployed
6ProcessingInstalledunknownInstallationDeploying serverless workloads
7ErrorInstalledfalseInstallationErrServerless resources installation error
8ErrorDeploymentFailuretrueDeploymentReplicaFailureServerless manager has the ReplicaFailure condition
9DeletingDeletedunknownDeletionDeletion in progress
10DeletingDeletedtrueDeletedServerless module deleted
11ErrorDeletedfalseDeletionErrDeletion failed