Skip to content

Commit 8d25c43

Browse files
SamyOubouazizRoRoJnerda-codes
authored
docs(srv): merge create/manage/delete containers namespace MTA-5252 (#3982)
* docs(srv): merge create/manage/delete containers namespace MTA-5252 * docs(srv): update functions do * docs(srv): update * docs(srv): update * Update serverless/containers/concepts.mdx Co-authored-by: Rowena Jones <[email protected]> * Apply suggestions from code review Co-authored-by: nerda-codes <[email protected]> * Update serverless/containers/quickstart.mdx Co-authored-by: nerda-codes <[email protected]> * Update serverless/functions/concepts.mdx Co-authored-by: nerda-codes <[email protected]> --------- Co-authored-by: Rowena Jones <[email protected]> Co-authored-by: nerda-codes <[email protected]>
1 parent f968132 commit 8d25c43

24 files changed

+200
-250
lines changed

menu/navigation.json

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3634,12 +3634,8 @@
36343634
{
36353635
"items": [
36363636
{
3637-
"label": "Create a Functions namespace",
3638-
"slug": "create-a-functions-namespace"
3639-
},
3640-
{
3641-
"label": "Manage a Functions namespace",
3642-
"slug": "manage-a-functions-namespace"
3637+
"label": "Create, manage, and delete a namespace",
3638+
"slug": "create-manage-delete-functions-namespace"
36433639
},
36443640
{
36453641
"label": "Create a function",
@@ -3680,10 +3676,6 @@
36803676
{
36813677
"label": "Delete a function",
36823678
"slug": "delete-a-function"
3683-
},
3684-
{
3685-
"label": "Delete a Functions namespace",
3686-
"slug": "delete-a-functions-namespace"
36873679
}
36883680
],
36893681
"label": "How to",
@@ -3824,12 +3816,8 @@
38243816
{
38253817
"items": [
38263818
{
3827-
"label": "Create a Containers namespace",
3828-
"slug": "create-a-containers-namespace"
3829-
},
3830-
{
3831-
"label": "Manage a Containers namespace",
3832-
"slug": "manage-a-containers-namespace"
3819+
"label": "Create, manage, and delete a namespace",
3820+
"slug": "create-manage-delete-containers-namespace"
38333821
},
38343822
{
38353823
"label": "Deploy a container",
@@ -3866,10 +3854,6 @@
38663854
{
38673855
"label": "Delete a container",
38683856
"slug": "delete-a-container"
3869-
},
3870-
{
3871-
"label": "Delete a Containers namespace",
3872-
"slug": "delete-a-containers-namespace"
38733857
}
38743858
],
38753859
"label": "How to",

serverless/containers/concepts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ A [vCPU](#vcpu) (Virtual Central Processing Unit) is equivalent to 1000 mvCPU.
6565

6666
## Namespace
6767

68-
A namespace is a project that allows you to [group your containers](/serverless/containers/how-to/create-a-containers-namespace/). Containers in the same Namespace can share environment variables and access tokens, defined at the namespace level.
68+
A namespace is a project that allows you to [group your containers](/serverless/containers/how-to/create-manage-delete-containers-namespace/). Containers in the same namespace can share environment variables and access tokens, defined at the namespace level.
6969

7070
## NATS trigger
7171

serverless/containers/how-to/add-trigger-to-a-container.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A trigger can be an HTTP request, a message from a queue or stream, a CRON sched
2424

2525
- A Scaleway account logged into the [console](https://console.scaleway.com)
2626
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
27-
- Created a [containers namespace](/serverless/containers/how-to/create-a-containers-namespace/)
27+
- Created a [containers namespace](/serverless/containers/how-to/create-manage-delete-containers-namespace/)
2828
- Deployed a container from [Scaleway Container Registry](/serverless/containers/how-to/deploy-container/) or an [external registry](/serverless/containers/how-to/deploy-container/)
2929
- [Activated SQS](/serverless/messaging/how-to/get-started/#how-to-activate-sqs-or-sns)
3030
- [Created credentials](/serverless/messaging/how-to/create-credentials/) for SQS

serverless/containers/how-to/create-a-containers-namespace.mdx

Lines changed: 0 additions & 34 deletions
This file was deleted.

serverless/containers/how-to/create-auth-token-from-console.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This page shows you how to create and manage an authentication token from the Sc
2020

2121
- A Scaleway account logged into the [console](https://console.scaleway.com)
2222
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23-
- [Created a containers namespace](/serverless/containers/how-to/create-a-containers-namespace/)
23+
- [Created a containers namespace](/serverless/containers/how-to/create-manage-delete-containers-namespace/)
2424
- [Deployed a container](/serverless/containers/how-to/deploy-container/)
2525

2626
## Creating authentication tokens from the Scaleway console
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
meta:
3+
title: How to create, manage and delete a Containers namespace
4+
description: Create, manage, and delete namespaces in Scaleway Serverless Containers.
5+
content:
6+
h1: How to create, manage, and delete a Containers namespace
7+
paragraph: Create, manage, and delete namespaces in Scaleway Serverless Containers.
8+
tags: container namespace manage create delete environment variable secret
9+
dates:
10+
validation: 2024-11-14
11+
posted: 2021-05-26
12+
categories:
13+
- serverless
14+
- containers
15+
---
16+
17+
This page shows you how to create and manage a Serverless Containers namespace. [Namespaces](/serverless/containers/concepts/#namespace) allow you to group your containers and share environment variables between them.
18+
19+
<Macro id="requirements" />
20+
21+
- A Scaleway account logged into the [console](https://console.scaleway.com)
22+
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23+
24+
## Creating a Serverless Containers namespace
25+
26+
1. Click **Containers** in the **Serverless** section of the side menu. The list of your containers namespaces displays.
27+
2. Click **Create namespace**. If you have no existing Serverless Containers resources in your current Project, click **Deploy container**.
28+
3. Complete the following steps in the wizard:
29+
- Enter a **name**, and optionally a **description** for your namespace. The name must only contain alphanumeric characters and dashes.
30+
- Choose a **region**, which is the geographical location in which your namespace will be deployed.
31+
- Enter any **environment variables** required for your namespace. Environment variables configured in a namespace will be available in all containers/apps within the same namespace. For each environment variable, click **+Add new variable** and enter the key / value pair.
32+
- Set secret environment variables (optional). **Secrets** are environment variables that are injected into your container and stored securely, but not displayed in the console after initial validation. Add a **key** and a **value**.
33+
- Verify the **estimated cost**.
34+
4. Click **Create namespace only** to finish, or click **Create namespace and add container** if you want to [deploy a container](/serverless/containers/how-to/deploy-container/) next.
35+
36+
## Managing a Serverless Containers namespace
37+
38+
### Generating and managing access tokens
39+
40+
The Scaleway console allows you to generate authentication tokens to grant users and applications access to the containers present in your namespace.
41+
42+
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
43+
44+
2. Click the containers namespace you want to manage.
45+
46+
3. Click the **Namespace settings** tab. Information about the region, registry endpoint and description of your namespace display.
47+
48+
4. Click **+ Generate token** to create an access token for this namespace.
49+
50+
<Message type="important">
51+
The token key will only be available for copy once. Make sure to store it securely before leaving the page.
52+
</Message>
53+
54+
Private containers present in your namespace now require the authentication token to be executed, as shown below:
55+
```curl
56+
curl -H "X-Auth-Token: <YOUR_NAMESPACE_TOKEN>" <YOUR_CONTAINER_ENDPOINT>
57+
```
58+
59+
### Adding and managing environment variables and secrets
60+
61+
The Scaleway console allows you to define environment variables and secrets at the namespace-level to pass to the containers present in the namespace.
62+
63+
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
64+
65+
2. Click the containers namespace you want to manage.
66+
67+
3. Click the **Namespace settings** tab. Information about the region, registry endpoint and description of your namespace display.
68+
69+
4. Add environment variables by clicking the <Icon name="edit" /> icon, **+ Add variable**, entering the key/value pair, and clicking <Icon name="validate"/>.
70+
71+
5. Add secrets by clicking the <Icon name="edit" /> icon, **+ Add secret**, entering the key/value pair, and clicking <Icon name="validate"/>.
72+
73+
The environment variables and secrets defined will now be passed to your containers. Every container in a **ready** state is redeployed to take the change into account.
74+
75+
## Deleting a Serverless Containers namespace
76+
77+
<Message type="important">
78+
- This action will permanently delete your namespace and all your containers will be lost.
79+
- This action is irreversible.
80+
- The Container Registry namespace associated with your Serverless Containers namespace will be deleted.
81+
</Message>
82+
83+
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
84+
85+
2. Click the <Icon name="more" /> icon next to the namespace you want to delete, and select **Delete** from the drop-down menu.
86+
87+
3. Type **DELETE** in the pop-up that asks you to confirm the action, then click **Delete namespace**.
88+
89+
<Message type="tip">
90+
You can also delete a namespace from the **Namespace settings** tab.
91+
</Message>

serverless/containers/how-to/delete-a-containers-namespace.mdx

Lines changed: 0 additions & 39 deletions
This file was deleted.

serverless/containers/how-to/deploy-container.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can deploy a container from the [Scaleway Container Registry](/containers/co
2222

2323
- A Scaleway account logged into the [console](https://console.scaleway.com)
2424
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
25-
- [Created a containers namespace](/serverless/containers/how-to/create-a-containers-namespace/)
25+
- [Created a containers namespace](/serverless/containers/how-to/create-manage-delete-containers-namespace/)
2626
- [Created a Container Registry namespace](/containers/container-registry/how-to/create-namespace/) and [pushed a container image](/containers/container-registry/how-to/push-images/) to it
2727

2828
## Deploy from the Scaleway Container Registry

serverless/containers/how-to/manage-a-containers-namespace.mdx

Lines changed: 0 additions & 31 deletions
This file was deleted.

serverless/containers/how-to/secure-a-container.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This page explains how to secure your container.
2020

2121
- A Scaleway account logged into the [console](https://console.scaleway.com)
2222
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23-
- [Created a containers namespace](/serverless/containers/how-to/create-a-containers-namespace/)
23+
- [Created a containers namespace](/serverless/containers/how-to/create-manage-delete-containers-namespace/)
2424
- [Deployed a container](/serverless/containers/how-to/deploy-container/)
2525
- Created an [authentication token](/serverless/containers/how-to/create-auth-token-from-console/) for your container
2626

0 commit comments

Comments
 (0)