Skip to content

Commit c6ce570

Browse files
committed
chore: update documentation
1 parent 99cc3b3 commit c6ce570

9 files changed

Lines changed: 227 additions & 151 deletions

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@ cloud-provider specific control loops required for Kubernetes to function.
99
Read more about kubernetes cloud controller managers in the
1010
[kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/).
1111

12-
**WARNING**: this project is under active development and should be considered alpha.
12+
This is the cloud controller manager that is deployed by default on
13+
[Scaleway Kapsule](https://www.scaleway.com/en/kubernetes-kapsule) (Scaleway Managed Kubernetes)
14+
clusters, but it can also be deployed on self-managed Kubernetes clusters running on Scaleway
15+
Instances or Elastic Metal servers.
1316

1417
## Features
1518

16-
Currently `scaleway-cloud-controller-manager` currently implements:
19+
`scaleway-cloud-controller-manager` implements:
1720

18-
- Instances interface - updates nodes with cloud provider specific labels and
21+
- Instances/InstancesV2 interface - updates nodes with cloud provider specific labels and
1922
addresses, also deletes kubernetes nodes when deleted from the
20-
cloud-provider.
23+
cloud-provider. Supports both Scaleway Instances and Elastic Metal (baremetal) servers.
2124
- LoadBalancer interface - responsible for creating load balancers when a service
22-
of `type: LoadBalancer` is created in Kubernetes.
25+
of `type: LoadBalancer` is created in Kubernetes. See the available
26+
[annotations](docs/loadbalancer-annotations.md) and [examples](docs/loadbalancer-examples.md).
2327
- Zone interface - makes Kubernetes aware of the failure domain of each node.
2428

29+
It also synchronizes [Scaleway tags to Kubernetes labels and taints](docs/tags.md) on nodes.
30+
2531
## Branches and releases
2632

2733
There are two types of branches:
@@ -38,28 +44,38 @@ Learn more about running `scaleway-cloud-controller-manager` [here](docs/getting
3844

3945
**WARNING**: This cloud controller manager is installed by default on [Scaleway Kapsule](https://www.scaleway.com/en/kubernetes-kapsule) (Scaleway Managed Kubernetes), you don't have to do it yourself or it might cause conflicts.
4046

41-
### Quick start
47+
### Configuration
48+
49+
The CCM is configured entirely through environment variables (Scaleway credentials, region/zone,
50+
and behavior tuning). See the [configuration reference](docs/configuration.md) for the full list.
51+
52+
### Documentation
53+
54+
- [Getting started](docs/getting-started.md)
55+
- [Configuration (environment variables)](docs/configuration.md)
56+
- [LoadBalancer annotations](docs/loadbalancer-annotations.md)
57+
- [LoadBalancer examples](docs/loadbalancer-examples.md)
58+
- [Tag, label and taint synchronization](docs/tags.md)
59+
- [Development setup](docs/development-setup.md)
4260

4361
## Build
4462

4563
You can build the CCM executable using the following commands:
4664

4765
```bash
48-
make build
66+
make compile
4967
```
5068

51-
You can build a local docker image named scaleway-cloud-controller for your current architecture using the following command:
69+
You can build a local docker image for your current architecture using the following command.
70+
Set `REGISTRY` to your own registry/namespace to avoid building into the `scaleway` namespace:
5271

5372
```bash
54-
make docker-build
73+
REGISTRY=[registry] make docker-build
5574
```
5675

5776
## Test
5877

59-
You need to have a kubernetes cluster that is NOT a Kapsule cluster to launch the tests.
60-
If you want to follow a tutorial about bootstrapping your own Kubernetes cluster on Scaleway follow the getting starting documentation [here](docs/getting-started.md)
61-
62-
Once this is done, run the tests using
78+
The unit tests do not require a Kubernetes cluster or Scaleway credentials:
6379

6480
```bash
6581
make test

docs/configuration.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Configuration
2+
3+
`scaleway-cloud-controller-manager` is configured entirely through environment variables.
4+
The example [Secret manifest](../examples/k8s-scaleway-secret.yml) shows how to provide these
5+
values when running on Kubernetes.
6+
7+
## Scaleway credentials and location
8+
9+
These are the standard Scaleway SDK environment variables, used to authenticate and to determine
10+
where resources (load balancers, etc.) are managed.
11+
12+
### `SCW_ACCESS_KEY`
13+
**Required.** The access key of the [API key](https://www.scaleway.com/en/docs/generate-an-api-token/) used by the CCM.
14+
15+
### `SCW_SECRET_KEY`
16+
**Required.** The secret key of the API key used by the CCM.
17+
18+
### `SCW_DEFAULT_REGION`
19+
**Required.** The default region (e.g. `fr-par`, `nl-ams`, `pl-waw`) used for regional resources
20+
such as load balancers. The CCM will fail to start if no region can be determined.
21+
22+
### `SCW_DEFAULT_ZONE`
23+
The default zone (e.g. `fr-par-1`) used for zonal resources such as Instances and Elastic Metal
24+
servers. If not set, the first zone of `SCW_DEFAULT_REGION` is generally used.
25+
26+
### `SCW_DEFAULT_PROJECT_ID`
27+
The default Project ID used when creating resources (e.g. load balancers, IPs).
28+
29+
### `SCW_DEFAULT_ORGANIZATION_ID`
30+
The default Organization ID. Can be used instead of, or in addition to, `SCW_DEFAULT_PROJECT_ID`.
31+
32+
## CCM behavior
33+
34+
### `PN_ID`
35+
The ID of the Private Network to attach managed load balancers to, and to use for routing
36+
traffic to nodes. Can be overridden per-service with the
37+
[`service.beta.kubernetes.io/scw-loadbalancer-pn-ids`](loadbalancer-annotations.md#servicebetakubernetesioscw-loadbalancer-pn-ids)
38+
annotation.
39+
40+
### `LB_DEFAULT_TYPE`
41+
The default load balancer commercial offer type (e.g. `LB-S`, `LB-GP-M`) used when creating new
42+
load balancers. Can be overridden per-service with the
43+
[`service.beta.kubernetes.io/scw-loadbalancer-type`](loadbalancer-annotations.md#servicebetakubernetesioscw-loadbalancer-type)
44+
annotation. If unset, Scaleway's default load balancer type is used.
45+
46+
### `SCW_CCM_PREFIX`
47+
A prefix prepended to the name of load balancers created by the CCM. Useful to distinguish
48+
load balancers managed by different clusters or environments.
49+
50+
### `SCW_CCM_TAGS`
51+
A list of additional tags to apply to every load balancer created by the CCM. Tags are split
52+
using the delimiter configured by `SCW_CCM_TAGS_DELIMITER`.
53+
54+
### `SCW_CCM_TAGS_DELIMITER`
55+
The delimiter used to split `SCW_CCM_TAGS` into individual tags. Defaults to `,`.
56+
57+
### `EXTRA_USER_AGENT`
58+
A string appended to the user agent sent to the Scaleway API
59+
(`scaleway/ccm <version> (<git-commit>) <EXTRA_USER_AGENT>`). Useful for tracking requests made
60+
by a specific deployment.
61+
62+
### `DISABLE_INTERFACES`
63+
A comma-separated list of cloud-provider interfaces to disable. Possible values are:
64+
- `instances` - disables the Instances/InstancesV2 interface (node lifecycle, addresses, types).
65+
- `loadbalancer` - disables the LoadBalancer interface (no LB creation/management).
66+
- `zones` - disables the Zones interface (no failure-domain labeling).
67+
68+
### `DISABLE_TAGS_SYNC`
69+
If set to any non-empty value, disables synchronization of Scaleway Instance/server tags to
70+
Kubernetes node labels and taints. See [tag synchronization](tags.md) for details.

docs/development-setup.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,51 @@ The CCM has a simple build system based on make.
44

55
## Requirements
66

7-
- Go (1.23+)
7+
- Go (1.26+)
88
- make
99
- docker
1010

1111
## Unit testing
1212

13-
Run the following command for run the unit tests.
13+
Run the following command to run the unit tests.
1414

1515
```
1616
make test
1717
```
18+
19+
## Building
20+
21+
Build the `scaleway-cloud-controller-manager` binary:
22+
23+
```
24+
make compile
25+
```
26+
27+
Format the code with `gofmt`:
28+
29+
```
30+
make fmt
31+
```
32+
33+
Remove build artifacts:
34+
35+
```
36+
make clean
37+
```
38+
39+
## Docker images
40+
41+
Build a local docker image for your current architecture. Set `REGISTRY` to your own
42+
registry/namespace to avoid building into the `scaleway` namespace:
43+
44+
```
45+
REGISTRY=[registry] make docker-build
46+
```
47+
48+
Build and push a multi-arch image (amd64 and arm64) and create the manifest:
49+
50+
```
51+
REGISTRY=[registry] make docker-push-all
52+
```
53+
54+
`make release` is an alias for `make docker-push-all`.

0 commit comments

Comments
 (0)