Skip to content

Commit 63a1921

Browse files
committed
docs: Update addons docs
1 parent b8daa3f commit 63a1921

File tree

4 files changed

+103
-54
lines changed

4 files changed

+103
-54
lines changed

docs/content/addons/calico-cni.md

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

docs/content/addons/cluster-autoscaler.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
title = "Cluster Autoscaler"
33
+++
44

5-
By leveraging CAPI cluster lifecycle hooks, this handler deploys [Cluster Autoscaler][cluster-autoscaler]
6-
on the new cluster via `ClusterResourceSets` at the `AfterControlPlaneInitialized` phase.
5+
By leveraging CAPI cluster lifecycle hooks, this handler deploys [Cluster Autoscaler] on the new cluster at the
6+
`AfterControlPlaneInitialized` phase.
77

88
Deployment of Cluster Autoscaler is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}).
99

10-
The hook creates a `ClusterResourceSet` to deploy the Cluster Autoscaler resources.
10+
The hook uses either the [Cluster API Add-on Provider for Helm] or `ClusterResourceSet` to deploy the cluster-autoscaler
11+
resources depending on the selected deployment strategy.
1112

1213
## Example
1314

@@ -25,7 +26,7 @@ spec:
2526
value:
2627
addons:
2728
clusterAutoscaler:
28-
strategy: ClusterResourceSet
29+
strategy: HelmAddon
2930
workers:
3031
machineDeployments:
3132
- class: default-worker
@@ -39,4 +40,7 @@ spec:
3940
# Remove the replicas field, otherwise the topology controller will revert back the autoscaler's changes
4041
```
4142

42-
[cluster-autoscaler]: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/clusterapi
43+
To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.
44+
45+
[Cluster Autoscaler]: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/clusterapi
46+
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm

docs/content/addons/cni.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
+++
2+
title = "CNI"
3+
icon = "fa-solid fa-network-wired"
4+
+++
5+
6+
When deploying a cluster with CAPI, deployment and configuration of CNI is up to the user. By leveraging CAPI cluster
7+
lifecycle hooks, this handler deploys a requested CNI provider on the new cluster at the `AfterControlPlaneInitialized`
8+
phase.
9+
10+
The hook uses either the [Cluster API Add-on Provider for Helm] or `ClusterResourceSet` to deploy the CNI resources
11+
depending on the selected deployment strategy.
12+
13+
Currently the hook supports [Cilium](#cilium) and [Calico](#calico) CNI providers.
14+
15+
## Cilium
16+
17+
Deployment of Cilium is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}).
18+
19+
### Cilium Example
20+
21+
To enable deployment of Cilium on a cluster, specify the following values:
22+
23+
```yaml
24+
apiVersion: cluster.x-k8s.io/v1beta1
25+
kind: Cluster
26+
metadata:
27+
name: <NAME>
28+
spec:
29+
topology:
30+
variables:
31+
- name: clusterConfig
32+
value:
33+
addons:
34+
cni:
35+
provider: Cilium
36+
strategy: HelmAddon
37+
```
38+
39+
To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.
40+
41+
## Calico
42+
43+
Deployment of Calico is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}).
44+
45+
### Calico Example
46+
47+
To enable deployment of Calico on a cluster, specify the following values:
48+
49+
```yaml
50+
apiVersion: cluster.x-k8s.io/v1beta1
51+
kind: Cluster
52+
metadata:
53+
name: <NAME>
54+
spec:
55+
topology:
56+
variables:
57+
- name: clusterConfig
58+
value:
59+
addons:
60+
cni:
61+
provider: Calico
62+
strategy: HelmAddon
63+
```
64+
65+
### ClusterResourceSet strategy
66+
67+
To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.
68+
69+
When using the `ClusterResourceSet` strategy, the hook creates two `ClusterResourceSets`: one to deploy the Tigera
70+
Operator, and one to deploy Calico via the Tigera `Installation` CRD. The Tigera Operator CRS is shared between all
71+
clusters in the operator, whereas the Calico installation CRS is unique per cluster.
72+
73+
As ClusterResourceSets must exist in the same name as the cluster they apply to, the lifecycle hook copies default
74+
ConfigMaps from the same namespace as the CAPI runtime extensions hook pod is running in. This enables users to
75+
configure defaults specific for their environment rather than compiling the defaults into the binary.
76+
77+
The Helm chart comes with default configurations for the Calico Installation CRS per supported provider, but overriding
78+
is possible. To do so, specify:
79+
80+
```shell
81+
--set-file handlers.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content=<file>
82+
```
83+
84+
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm

docs/content/addons/nfd.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title = "Node Feature Discovery"
33
icon = "fa-solid fa-eye"
44
+++
55

6-
By leveraging CAPI cluster lifecycle hooks, this handler deploys [Node Feature
7-
Discovery](https://github.com/kubernetes-sigs/node-feature-discovery) (NFD) on the new cluster via `ClusterResourceSets`
8-
at the `AfterControlPlaneInitialized` phase.
6+
By leveraging CAPI cluster lifecycle hooks, this handler deploys [Node Feature Discovery] (NFD) on the new cluster at
7+
the `AfterControlPlaneInitialized` phase.
98

10-
Deployment of NFD is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}).
9+
Deployment of NFD is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}).
1110

12-
The hook creates a `ClusterResourceSet` to deploy the NFD resources.
11+
The hook uses either the [Cluster API Add-on Provider for Helm] or `ClusterResourceSet` to deploy the NFD resources
12+
depending on the selected deployment strategy.
1313

1414
## Example
1515

@@ -29,3 +29,8 @@ spec:
2929
nfd:
3030
strategy: HelmAddon
3131
```
32+
33+
To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.
34+
35+
[Node Feature Discovery]: https://github.com/kubernetes-sigs/node-feature-discovery
36+
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm

0 commit comments

Comments
 (0)