From 3e6b394727fd4fdefbb1ff2ac7d4fc5a9321aa96 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 23 Dec 2025 08:22:40 +0100 Subject: [PATCH 1/4] docs(srv): jobs commands and args MTA-6609 --- pages/serverless-jobs/concepts.mdx | 19 +++++++++++++++++++ pages/serverless-jobs/how-to/create-job.mdx | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pages/serverless-jobs/concepts.mdx b/pages/serverless-jobs/concepts.mdx index 269b33a44a..814d4ca9ea 100644 --- a/pages/serverless-jobs/concepts.mdx +++ b/pages/serverless-jobs/concepts.mdx @@ -8,6 +8,25 @@ dates: --- import ServerlessConcepts from '@macros/serverless/serverless-concepts.mdx' +## Commands and arguments + +Serverless Jobs allows you to customize the `command` and `args` instructions of your container image directly from the [Scaleway console](https://console.scaleway.com) and from the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-jobs/). + +- The `command` instruction defines the command, process, or script executed when your job starts. +- The `args` instruction defines the arguments passed to the `command` instruction. Arguments can be passed as environment variables, as shown in the example below. + +**Example** + +```yaml +env: +- name: MESSAGE + value: "hello world" +command: ["/bin/echo"] +args: ["$(MESSAGE)"] +``` + +Refer to the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) for more information on commands and arguments behavior. + ## Container Registry Container Registry is the place where your images are stored before being deployed. We recommend using Scaleway Container Registry for optimal integration. See the [migration guide](/serverless-jobs/api-cli/migrate-external-image-to-scaleway-registry/) for full details. diff --git a/pages/serverless-jobs/how-to/create-job.mdx b/pages/serverless-jobs/how-to/create-job.mdx index 9c0bfb0f14..720086fcbd 100644 --- a/pages/serverless-jobs/how-to/create-job.mdx +++ b/pages/serverless-jobs/how-to/create-job.mdx @@ -58,7 +58,7 @@ Scaleway's Serverless Jobs allows you to create jobs from several container [reg - Customize the ephemeral storage for your job according to your requirements. The data stored in your job is not retained once it is finished. - 1. Add a **startup command** to your job. It will be executed every time your job is run. + 1. Add [commands and arguments](/serverless-jobs/concepts/#commands-and-arguments) to your job. they will be executed every time your job is run. 2. Set a **maximum duration** to your job to stop it automatically if it does not complete within this limit. From 0283954bb328ea1494d067feba9b6b53f5de1bed Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 23 Dec 2025 15:10:23 +0100 Subject: [PATCH 2/4] docs(srv): update --- ...igrate-startup-command-to-command-args.mdx | 34 +++++++++++++++++++ pages/serverless-jobs/menu.ts | 4 +++ 2 files changed, 38 insertions(+) create mode 100644 pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx diff --git a/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx b/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx new file mode 100644 index 0000000000..fa88864afb --- /dev/null +++ b/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx @@ -0,0 +1,34 @@ +--- +title: How to migrate from startup command to commands and arguments +description: How to migrate from the legacy startup command system to the modern commands and arguments for Scaleway Serverless Jobs. +tags: containers +dates: + validation: 2025-12-23 + posted: 2025-12-23 +--- + +import Requirements from '@macros/iam/requirements.mdx' + +The Serverless Jobs `v1alpha2` API introduces a new startup execution mechanism based on [commands and arguments](/serverless-containers/concepts/#commands-and-arguments), replacing the legacy startup command. + +The Scaleway console allows you to quickly and easily migrate your existing jobs to the new system. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- An existing job that uses a startup command + +1. Click **Jobs** in the **Serverless** section of the side menu. The jobs page displays. + +2. Click the name of the job you want to manage, then click the **Settings** tab. + +3. Scroll down to the **Configure advanced options**, then click the **Execution** tab. + +4. Click the **Upgrade** button. A pop-up displays. + +5. Split your existing startup command into a command (which corresponds to the `ENTRYPOINT` Docker instruction), and arguments (which correspond to the `CMD` Docker instruction). + +6. Click **Upgrade to the new format** to finish. + +Your Serverless Job now uses the command and arguments mechanism. \ No newline at end of file diff --git a/pages/serverless-jobs/menu.ts b/pages/serverless-jobs/menu.ts index d373030045..974ec07a22 100644 --- a/pages/serverless-jobs/menu.ts +++ b/pages/serverless-jobs/menu.ts @@ -58,6 +58,10 @@ export const serverlessJobsMenu = { label: 'Configure alerts for a job', slug: 'configure-alerts-jobs', }, + { + label: 'Migrate from startup command to command and arguments', + slug: 'migrate-startup-command-to-command-args', + }, { label: 'Delete a job', slug: 'delete-job', From f3879a9dbc9615f78cca2195f7345673ead8edd1 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Wed, 24 Dec 2025 16:39:06 +0100 Subject: [PATCH 3/4] docs(srv): update --- ...igrate-startup-command-to-command-args.mdx | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx b/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx index fa88864afb..00a80ecc06 100644 --- a/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx +++ b/pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx @@ -1,5 +1,5 @@ --- -title: How to migrate from startup command to commands and arguments +title: How to migrate from startup command to command and arguments description: How to migrate from the legacy startup command system to the modern commands and arguments for Scaleway Serverless Jobs. tags: containers dates: @@ -19,6 +19,8 @@ The Scaleway console allows you to quickly and easily migrate your existing jobs - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - An existing job that uses a startup command +## How to migrate from startup command to commands and arguments + 1. Click **Jobs** in the **Serverless** section of the side menu. The jobs page displays. 2. Click the name of the job you want to manage, then click the **Settings** tab. @@ -31,4 +33,38 @@ The Scaleway console allows you to quickly and easily migrate your existing jobs 6. Click **Upgrade to the new format** to finish. -Your Serverless Job now uses the command and arguments mechanism. \ No newline at end of file +Your Serverless Job now uses the command and arguments mechanism. + +## Migration examples + +### Simple command + +**Legacy startup command** + +```bash +sleep 60s +``` + +**Corresponding command and arguments** + +```yaml +command: [sleep] +args: [60s] +``` + +### Complex command + +**Legacy startup command** + +```bash +/app/migrate up --database "$DB_URL" --password "$DB_PASSWORD" --port 3002 +``` + +**Corresponding command and arguments** + +```yaml + command: [/app/migrate] + args: [up, --database, "$(DB_URL)", --password, "$(DB_PASSWORD)", --port, 3002] +``` + +Refer to the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) for more information on command and arguments behavior and syntax. \ No newline at end of file From 977ff7d55473b07c4f6ff4fe8fa5b8ebcfe89412 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Mon, 5 Jan 2026 15:55:39 +0100 Subject: [PATCH 4/4] docs(srv): add link to api migration doc --- .../reference-content/v1alpha1-to-v1alpha2.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/serverless-jobs/reference-content/v1alpha1-to-v1alpha2.mdx b/pages/serverless-jobs/reference-content/v1alpha1-to-v1alpha2.mdx index 1c240a691c..c121c472fe 100644 --- a/pages/serverless-jobs/reference-content/v1alpha1-to-v1alpha2.mdx +++ b/pages/serverless-jobs/reference-content/v1alpha1-to-v1alpha2.mdx @@ -19,15 +19,17 @@ We recommend using `v1alpha2` for all new integrations via the API, SDK, Terrafo ### Job definition command -In `v1alpha2`, the `command` field for Job definitions is **deprecated**. +In `v1alpha2`, the `startup_command` field for Job definitions is **deprecated**. It is replaced by two new fields, designed to give you more control and align with the [Serverless Containers](/serverless-containers/concepts/#serverless-containers) experience: -* **`startup_command`**: A list of commands to start the application. +* **`command`**: A list of commands to start the application. * **`args`**: A list of arguments passed to the startup command. This separation allows for a cleaner definition of entry points and arguments, mirroring standard container practices. +Refer to the [dedicated documentation](/serverless-jobs/how-to/migrate-startup-command-to-command-args/) for more information on how to migrate from the legacy **startup command** to **command and arguments**. + ### Job run troubleshooting To assist with debugging, `v1alpha2` adds a **Job Run Reason** field.