Skip to content

Commit 149c63e

Browse files
committed
Move docs to separate branch api-serverless-docs
Split out 6 .md files into a separate review path: - docs/user/00-80-migrate-to-new-runtime-api.md - docs/user/00-90-runtime-deprecation-schedule.md - docs/user/technical-reference/05-20-env-variables.md - docs/user/technical-reference/07-70-function-specification.md - components/runtimes/{nodejs26,python314}/README_template.md The eject endpoint will still pick up the updated README templates once the docs branch is merged.
1 parent 44e7e4e commit 149c63e

7 files changed

Lines changed: 103 additions & 78 deletions

File tree

components/runtimes/nodejs26/README_template.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,45 @@
11
# Ejected Functions Workspace
22

3-
This folder contains the files you need to test, run, deploy, and productize your business application:
3+
This folder contains the most important block to test, run, deploy, and productize your business application and consists of the following elements:
44

5-
* `handler.js` — source code of your business application
6-
* `server.mjs` — server that loads and runs `handler.js`
7-
* `package.json` — dependencies for `handler.js` and `server.mjs`
8-
* `lib/` — internal server modules (tracing, metrics, request timeout, and graceful shutdown)
9-
* `sdk/` — user-facing SDK module (`require('sdk')`) exposing CloudEvent helpers, tracer, and function metadata getters
10-
* `resources/` — basic Kubernetes resources for deploying the application on a cluster
11-
* `Dockerfile` — application image definition
12-
* `Makefile` — automation scripts
5+
* `handler.js` - source code of the buisness application
6+
* `server.mjs` - server source code required to run `handler.js`
7+
* `package.json` - dependencies file required for the `handler.js` and the `server.mjs` files to run
8+
* `lib/` - directory containing server SDK (like cloudevents or tracing functionality)
9+
* `resources/` - directory with basic Kubernetes resources required to deploy the application on a cluster
10+
* `Dockerfile` - application image definition
11+
* `Makefile` - basic portion of automations and scripts
1312

1413
## Scripts and Automations
1514

16-
Use the `Makefile` targets to run the application locally or build and deploy it on a k3d cluster. To see all available targets, run:
15+
The `Makefile` file is designed to speed up processes such as running an application locally or building or deploying it on a k3d cluster.
1716

18-
```bash
19-
make help
20-
```
17+
Read more about possibilities and functionalites by running the `make help` target.
2118

2219
### Run Application Locally
2320

24-
> [!NOTE]
25-
> When you run the application outside the cluster, it cannot reach in-cluster services or read container environment variables. Use this target to test without such dependencies, or mock them and export the environment variables manually.
21+
> [!NOTE]
22+
> Because the application is run outside the cluster, it cannot simply reach in-cluster services and use container envs. It is strongly recommended to use the following target to test the application without such dependencies or mock them and export container envs manually.
2623
2724
```bash
2825
export FUNC_NAME=<name>
2926
export FUNC_RUNTIME=<runtime>
30-
export SERVICE_NAMESPACE=<namespace>
27+
export SERVICE_NAMESPACE=<SERVICE_NAMESPACE>
3128

3229
make run
3330
```
3431

3532
### Deploy Application on k3d
3633

37-
To build, import, and deploy the application on a k3d cluster:
34+
The workspace is designed to easily start working on the productization of a business application extracted from Function. It allows testing it on a k3d cluster by building, importing, and deploying it:
3835

3936
```bash
4037
make k3d-deploy
4138
```
4239

4340
### Build and Push Application
4441

45-
To build and push your image to the location specified by `IMG`:
42+
Build and push your image to the location specified by `IMG`:
4643

4744
```bash
4845
make docker-build docker-push IMG=<image>

components/runtimes/python314/README_template.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,45 @@
11
# Ejected Functions Workspace
22

3-
This folder contains the files you need to test, run, deploy, and productize your business application:
4-
5-
* `handler.py` source code of your business application
6-
* `server.py` server that loads and runs `handler.py`
7-
* `requirements.txt` dependencies for `handler.py` and `server.py`
8-
* `lib/` server SDK modules (CloudEvents, tracing, and similar)
9-
* `resources/` basic Kubernetes resources for deploying the application on a cluster
10-
* `Dockerfile` application image definition
11-
* `Makefile` — automation scripts
12-
3+
This folder contains the most important block to test, run, deploy, and productize your business application and consists of the following elements:
4+
5+
* `handler.py` - source code of the buisness application
6+
* `server.py` - server source code required to run `handler.py`
7+
* `requirements.txt` - dependencies file required for the `handler.py` and the `server.py` files to run
8+
* `lib/` - directory containing server SDK (like cloudevents or tracing functionality)
9+
* `resources/` - directory with basic Kubernetes resources required to deploy the application on a cluster
10+
* `Dockerfile` - application image definition
11+
* `Makefile` - basic portion of automations and scripts
12+
1313
## Scripts and Automations
1414

15-
Use the `Makefile` targets to run the application locally or build and deploy it on a k3d cluster. To see all available targets, run:
15+
The `Makefile` file is designed to speed up processes such as running an application locally or building or deploying it on a k3d cluster.
1616

17-
```bash
18-
make help
19-
```
17+
Read more about possibilities and functionalites by running the `make help` target.
2018

2119
### Run Application Locally
2220

23-
> [!NOTE]
24-
> When you run the application outside the cluster, it cannot reach in-cluster services or read container environment variables. Use this target to test without such dependencies, or mock them and export the environment variables manually.
21+
> [!NOTE]
22+
> Because the application is run outside the cluster, it cannot simply reach in-cluster services and use container envs. It is strongly recommended to use the following target to test the application without such dependencies or mock them and export container envs manually.
2523
2624
```bash
2725
export FUNC_NAME=<name>
2826
export FUNC_RUNTIME=<runtime>
29-
export SERVICE_NAMESPACE=<namespace>
27+
export SERVICE_NAMESPACE=<SERVICE_NAMESPACE>
3028

3129
make run
3230
```
3331

3432
### Deploy Application on k3d
3533

36-
To build, import, and deploy the application on a k3d cluster:
34+
The workspace is designed to easily start working on the productization of a business application extracted from Function. It allows testing it on a k3d cluster by building, importing, and deploying it:
3735

3836
```bash
3937
make k3d-deploy
4038
```
4139

4240
### Build and Push Application
4341

44-
To build and push your image to the location specified by `IMG`:
42+
Build and push your image to the location specified by `IMG`:
4543

4644
```bash
4745
make docker-build docker-push IMG=<image>

docs/user/00-80-migrate-to-new-runtime-api.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,16 @@ module.exports = {
8383

8484
```javascript
8585
// After — sdk functions
86-
const { getTracer, getFunctionName, getNamespace, getRuntime, getTimeout, getBodySizeLimit } = require('sdk');
87-
88-
module.exports = {
89-
main: async function (req, res) {
90-
const tracer = getTracer();
91-
console.log(getFunctionName());
92-
console.log(getNamespace());
93-
console.log(getRuntime());
94-
console.log(getTimeout());
95-
console.log(getBodySizeLimit());
96-
res.send('ok');
97-
}
86+
import { getTracer, getFunctionName, getNamespace, getRuntime, getTimeout, getBodySizeLimit } from 'sdk';
87+
88+
export function main(req, res) {
89+
const tracer = getTracer();
90+
console.log(getFunctionName());
91+
console.log(getNamespace());
92+
console.log(getRuntime());
93+
console.log(getTimeout());
94+
console.log(getBodySizeLimit());
95+
res.send('ok');
9896
}
9997
```
10098

@@ -159,24 +157,22 @@ module.exports = {
159157

160158
```javascript
161159
// After — getCloudEvent() returns a standard CloudEvent object
162-
const { getCloudEvent } = require('sdk');
163-
164-
module.exports = {
165-
main: function (req, res) {
166-
const ce = getCloudEvent(req);
167-
if (ce) {
168-
console.log(ce.type);
169-
console.log(ce.source);
170-
console.log(ce.specversion);
171-
console.log(ce.id);
172-
console.log(ce.time);
173-
console.log(ce.datacontenttype);
174-
console.log(ce.data);
175-
res.send(ce.type);
176-
return;
177-
}
178-
res.send("not a cloud event");
160+
import { getCloudEvent } from 'sdk';
161+
162+
export function main(req, res) {
163+
const ce = getCloudEvent(req);
164+
if (ce) {
165+
console.log(ce.type);
166+
console.log(ce.source);
167+
console.log(ce.specversion);
168+
console.log(ce.id);
169+
console.log(ce.time);
170+
console.log(ce.datacontenttype);
171+
console.log(ce.data);
172+
res.send(ce.type);
173+
return;
179174
}
175+
res.send("not a cloud event");
180176
}
181177
```
182178

@@ -243,17 +239,15 @@ module.exports = {
243239

244240
```javascript
245241
// After
246-
const { emitCloudEvent } = require('sdk');
242+
import { emitCloudEvent } from 'sdk';
247243

248-
module.exports = {
249-
main: async function (req, res) {
250-
await emitCloudEvent(
251-
'com.example.order.created',
252-
'/orders',
253-
{ orderId: '123' }
254-
);
255-
res.send("event emitted");
256-
}
244+
export async function main(req, res) {
245+
await emitCloudEvent(
246+
'com.example.order.created',
247+
'/orders',
248+
{ orderId: '123' }
249+
);
250+
res.send("event emitted");
257251
}
258252
```
259253

@@ -337,6 +331,7 @@ The following environment variables were renamed in the new runtimes. The `FUNC_
337331
| ------------------------------ | ------------------------ | ------------------- | ------------------------------------ |
338332
| `FUNC_HANDLER` | `HANDLER_FUNC_NAME` | nodejs26, python314 | |
339333
| `MOD_NAME` | `HANDLER_MOD_NAME` | nodejs26, python314 | |
334+
| `KUBELESS_INSTALL_VOLUME` | `HANDLER_PATH` | nodejs26, python314 | |
340335
| `REQ_MB_LIMIT` | `FUNC_BODY_MB_LIMIT` | nodejs26 | |
341336
| `FUNC_MEMFILE_MAX` | `FUNC_BODY_MB_LIMIT` | python314 | Unit changed from bytes to megabytes |
342337
| `KYMA_INTERNAL_LOGGER_ENABLED` | `SERVER_INTERNAL_LOGGER` | nodejs26, python314 | |

docs/user/00-90-runtime-deprecation-schedule.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ This document outlines the planned deprecation and end-of-life (EOL) dates for s
99
| Node.js 20 | February 2026 | April 2026 |
1010
| Node.js 22 | July 2026 | November 2026 |
1111
| Node.js 24 | TBD | TBD |
12-
| Node.js 26 | TBD | TBD |
1312
| Python 3.12 | September 2026 | March 2027 |
1413
| Python 3.14 | TBD | TBD |
1514

docs/user/technical-reference/05-20-env-variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Every runtime provides its own unique environment configuration which can be rea
1414
| **HANDLER_FUNC_NAME** | `main` | The name of the exported Function inside the `HANDLER_MOD_NAME` file. |
1515
| **MOD_NAME** | `handler` | Deprecated. Use `HANDLER_MOD_NAME` instead. Supported only in nodejs20, nodejs22, nodejs24, and python312. |
1616
| **HANDLER_MOD_NAME** | `handler` | The name of the main exported file. It must have an extension of `.py` for the Python runtimes and `.js` for the Node.js ones. The extension must be added on the server side. |
17+
| **KUBELESS_INSTALL_VOLUME** | `/kubeless` | Deprecated. Use `HANDLER_PATH` instead. Supported only in nodejs20, nodejs22, nodejs24, and python312. |
1718
| **HANDLER_PATH** | `/` | Full path to volume mount with user's source code. |
1819
| **FUNC_RUNTIME** | None | The name of the actual runtime. Possible values: `nodejs20` - deprecated, `nodejs22`, `nodejs24`, `nodejs26`, `python312`, and `python314`. |
1920
| **TRACE_COLLECTOR_ENDPOINT** | None | Full address of OpenTelemetry Trace Collector is exported if the trace collector's endpoint is present. | |

docs/user/technical-reference/07-70-function-specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ You can use a custom runtime image to override the existing one. Your image must
371371

372372
- Expose the workload endpoint on the right port
373373
- Provide liveness and readiness check endpoints at `/healthz`
374-
- Fetch sources from the path under the `HANDLER_PATH` environment
374+
- Fetch sources from the path under the `KUBELESS_INSTALL_VOLUME` environment
375375
- Security support. Kyma runtimes are secure by default. You only need to protect your images.
376376

377377
Every Function's Pods container has the same system environments, which helps you configure the Functions server. For more information, read the [Environment variables](05-20-env-variables.md) page.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Function Runtime Deprecation Schedule
2+
3+
This document outlines the planned deprecation and end-of-life (EOL) dates for supported Function runtimes in Kyma Serverless.
4+
5+
## Supported Runtimes and Deprecation Timeline
6+
7+
| Runtime | Planned Deprecation | Estimated EOL |
8+
| --- | --- | --- |
9+
| Node.js 20 | February 2026 | April 2026 |
10+
| Node.js 22 | July 2026 | November 2026 |
11+
| Node.js 24 | TBD | TBD |
12+
| Python 3.12 | September 2026 | March 2027 |
13+
| Python 3.14 | TBD | TBD |
14+
15+
## Deprecation History
16+
17+
### Node.js 20
18+
- **Status**: Deprecated
19+
- **Deprecation Version**: v1.10.0
20+
- **Details**: Node.js 20 runtime was deprecated starting with version 1.10.0. For more information, see [this issue](https://github.com/kyma-project/serverless/issues/2231).
21+
22+
> [!NOTE]
23+
> The deprecation and EOL dates listed in this document are **predictions based on current release cadence and Node.js/Python LTS schedules**. These dates are subject to change and may be adjusted based on the following:
24+
> - Changes in the Kyma Serverless release schedule
25+
> - Updates to upstream Node.js and Python LTS timelines
26+
> - Community feedback and requirements
27+
> - Security considerations
28+
>
29+
> Always check the [release notes](https://github.com/kyma-project/serverless/releases) for announcements regarding runtime deprecations and EOL timelines.
30+
31+
## Recommendations
32+
33+
- Plan upgrades to newer runtimes well in advance of deprecation dates
34+
- Monitor release notes for any changes to this schedule
35+
- For Functions using deprecated runtimes, migrate before the EOL date to avoid service disruption

0 commit comments

Comments
 (0)