-
Notifications
You must be signed in to change notification settings - Fork 25
Adjust docs for buildless #1765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 51 commits
04f5cce
5b32cec
eaea520
97dbcf3
3029eee
37bb744
4aa1999
3fcc97a
9df3f90
1a3effe
31edaae
9cd08a6
175bd9c
fa0273c
75834ca
3bbe4c7
51681d3
6a8a6d2
3bdd1d5
b04847a
c96401c
afd05db
60238ff
406d62b
bd0927f
b2172f2
c30c4e6
753b54e
90b6949
a52df3e
cc22263
41a4249
870507e
31baa8a
52030de
d427a68
ccc0e89
84c3631
c6753d3
e6d20e0
0f5e70a
3fffff0
21979f7
83a0856
983bf03
cf4249b
f932804
fc07a9f
8a97b5e
23ea93e
f383350
5e7348a
cd87f7b
92fbbb8
939e30d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a white background to the diagram.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, added |
MichalKalke marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,23 +14,17 @@ The Serverless module has its own operator (Serverless Operator). It watches the | |
|
|
||
| The Serverless CR is an API to configure the Serverless module. You can use it to perform the following actions: | ||
|
|
||
| - Enable or disable the internal Docker registry. | ||
| - Configure the external Docker registry. | ||
| - Override endpoint for traces collected by the Serverless Functions. | ||
| - Override endpoint for Eventing. | ||
| - Override the target CPU utilization percentage. | ||
| - Override the Function requeue duration. | ||
| - Override the Function build executor arguments. | ||
| - Override the Function build max simultaneous jobs. | ||
| - Override the healthz liveness timeout. | ||
| - Override the Function request body limit. | ||
| - Override the Function timeout. | ||
| - Override the default build Job preset. | ||
| - Override the default runtime Pod preset. | ||
| - Override the default log level. | ||
| - Override the default log format. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please change the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adjusted |
||
| - Enable network policies. | ||
| - Enable buildless mode of Serverless. | ||
| - Disable buildless mode of Serverless. | ||
|
|
||
| The default configuration of the Serverless Module is following: | ||
|
|
||
|
|
@@ -44,91 +38,6 @@ The default configuration of the Serverless Module is following: | |
| enableInternal: true | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `spec.dockerRegistry` field is deprecated and will be removed in a future version of Serverless where Functions won't require building images. | ||
|
|
||
| ## Procedure | ||
|
|
||
| 1. Go to Kyma dashboard. The URL is in the Overview section of your subaccount. | ||
| 2. Choose **Modify Modules**, and in the **View** tab, choose `serverless`. | ||
| 4. Go to **Edit**, and provide your configuration changes. You can use the **Form** or **YAML** tab. | ||
|
|
||
| ### Configuring Docker Registry | ||
|
|
||
| By default, Serverless uses PersistentVolume (PV) as the internal registry to store Docker images for Functions. The default storage size of a single volume is 20 GB. This internal registry is suitable for local development. | ||
|
|
||
| > [!WARNING] | ||
| > If you use Serverless for production purposes, it is recommended that you use an external registry, such as Docker Hub, Artifact Registry, or Azure Container Registry (ACR). | ||
|
|
||
| Follow these steps to use the external Docker registry in Serverless: | ||
|
|
||
| 1. Create a Secret in the `kyma-system` namespace with the required data (`username`, `password`, `serverAddress`, and `registryAddress`): | ||
|
|
||
| ```bash | ||
| kubectl create secret generic my-registry-config \ | ||
| --namespace kyma-system \ | ||
| --from-literal=username={USERNAME} \ | ||
| --from-literal=password={PASSWORD} \ | ||
| --from-literal=serverAddress={SERVER_URL} \ | ||
| --from-literal=registryAddress={REGISTRY_URL} | ||
| ``` | ||
|
|
||
| > [!TIP] | ||
| > In case of DockerHub, usually the Docker registry address is the same as the account name. | ||
|
|
||
| Examples: | ||
|
|
||
| <!-- tabs:start --> | ||
|
|
||
| #### **Docker Hub** | ||
|
|
||
| ```bash | ||
| kubectl create secret generic my-registry-config \ | ||
| --namespace kyma-system \ | ||
| --from-literal=username={USERNAME} \ | ||
| --from-literal=password={PASSWORD} \ | ||
| --from-literal=serverAddress=https://index.docker.io/v1/ \ | ||
| --from-literal=registryAddress={USERNAME} | ||
| ``` | ||
|
|
||
| #### **Artifact Registry** | ||
|
|
||
| ```bash | ||
| kubectl create secret generic my-registry-config \ | ||
| --namespace kyma-system \ | ||
| --from-literal=username=_json_key \ | ||
| --from-literal=password={GCR_KEY_JSON} \ | ||
| --from-literal=serverAddress=gcr.io \ | ||
| --from-literal=registryAddress=gcr.io/{YOUR_GCR_PROJECT} | ||
| ``` | ||
|
|
||
| For more information on how to set up authentication for Docker with Artifact Registry, see the [Artifact Registry documentation](https://cloud.google.com/artifact-registry/docs/docker/authentication#json-key). | ||
|
|
||
| #### **ACR** | ||
|
|
||
| ```bash | ||
| kubectl create secret generic my-registry-config \ | ||
| --namespace kyma-system \ | ||
| --from-literal=username=00000000-0000-0000-0000-000000000000 \ | ||
| --from-literal=password={ACR_TOKEN} \ | ||
| --from-literal=serverAddress={AZ_REGISTRY_NAME}.azurecr.io \ | ||
| --from-literal=registryAddress={AZ_REGISTRY_NAME}.azurecr.io | ||
| ``` | ||
|
|
||
| For more information on how to authenticate with ACR, see the [ACR documentation](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli#az-acr-login-with---expose-token). | ||
|
|
||
| <!-- tabs:end --> | ||
|
|
||
| 2. Reference the Secret in the Serverless CR: | ||
|
|
||
| ```yaml | ||
| spec: | ||
| dockerRegistry: | ||
| secretName: my-registry-config | ||
| ``` | ||
|
|
||
| The URL of the currently used Docker registry is visible in the Serverless CR status. | ||
|
|
||
| ### Configuring Trace Endpoint | ||
|
|
||
| By default, the Serverless operator checks if there is a trace endpoint available. If available, the detected trace endpoint is used as the trace collector URL in Functions. | ||
|
|
@@ -154,18 +63,6 @@ By default `http://eventing-publisher-proxy.kyma-system.svc.cluster.local/publis | |
| endpoint: http://eventing-publisher-proxy.kyma-system.svc.cluster.local/publish | ||
| ``` | ||
|
|
||
| ### Configuring Target CPU Utilization Percentage | ||
|
|
||
| You can set a custom target threshold for CPU utilization. The default value is set to `50%`. | ||
|
|
||
| ```yaml | ||
| spec: | ||
| targetCPUUtilizationPercentage: 50 | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `spec.targetCPUUtilizationPercentage` field is deprecated and will be removed in a future version of Serverless, where automatic HPA creation will be disabled. | ||
|
|
||
| ### Configuring the Function Requeue Duration | ||
|
|
||
| By default, the Function associated with the default configuration will be requeued every 5 minutes. | ||
|
|
@@ -175,38 +72,6 @@ By default, the Function associated with the default configuration will be reque | |
| functionRequeueDuration: 5m | ||
| ``` | ||
|
|
||
| ### Configuring the Function Build Executor Arguments | ||
|
|
||
| Use this label to choose the [arguments](https://github.com/GoogleContainerTools/kaniko?tab=readme-ov-file#additional-flags) passed to the Function build executor, for example: | ||
|
|
||
| - `--insecure` - executor operates in an insecure mode | ||
| - `--skip-tls-verify` - executor skips the TLS certificate verification | ||
| - `--skip-unused-stages` - executor skips any stages that aren't used for the current execution | ||
| - `--log-format=text` - executor uses logs in a given format | ||
| - `--cache=true` - enables caching for the executor | ||
| - `--compressed-caching=false` - prevents tar compression for cached layers. This increases the runtime of the build, but decrease the memory usage especially for large builds. | ||
| - `--use-new-run` - improves performance by avoiding the full filesystem snapshots. | ||
|
|
||
| ```yaml | ||
| spec: | ||
| functionBuildExecutorArgs: "--insecure,--skip-tls-verify,--skip-unused-stages,--log-format=text,--cache=true,--use-new-run,--compressed-caching=false" | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `spec.functionBuildExecutorArgs` field is deprecated and will be removed in a future version of Serverless where Functions won't require building images. | ||
|
|
||
| ### Configuring the Function Build Max Simultaneous Jobs | ||
|
|
||
| You can set a custom maximum number of simultaneous jobs which can run at the same time. The default value is set to `5`. | ||
|
|
||
| ```yaml | ||
| spec: | ||
| functionBuildMaxSimultaneousJobs: 5 | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `spec.functionBuildMaxSimultaneousJobs` field is deprecated and will be removed in a future version of Serverless where Functions won't require building images. | ||
|
|
||
| ### Configuring the healthz Liveness Timeout | ||
|
|
||
| By default, Function is considered unhealthy if the liveness health check endpoint does not respond within 10 seconds. | ||
|
|
@@ -216,18 +81,6 @@ By default, Function is considered unhealthy if the liveness health check endpoi | |
| healthzLivenessTimeout: "10s" | ||
| ``` | ||
|
|
||
| ### Configuring the Default Build Job Preset | ||
|
|
||
| You can configure the default build Job preset to be used. | ||
|
|
||
| ```yaml | ||
| spec: | ||
| defaultBuildJobPreset: "normal" | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `spec.defaultBuildJobPreset` field is deprecated and will be removed in a future version of Serverless where Functions won't require building images. | ||
|
|
||
| ### Configuring the Default Runtime Pod Preset | ||
|
|
||
| You can configure the default runtime Pod preset to be used. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.