Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update addons docs and tweak release doc #596

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions docs/content/addons/calico-cni.md

This file was deleted.

14 changes: 9 additions & 5 deletions docs/content/addons/cluster-autoscaler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ title = "Cluster Autoscaler"
icon = "fa-solid fa-up-right-and-down-left-from-center"
+++

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

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

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

## Example

Expand All @@ -26,7 +27,7 @@ spec:
value:
addons:
clusterAutoscaler:
strategy: ClusterResourceSet
strategy: HelmAddon
workers:
machineDeployments:
- class: default-worker
Expand All @@ -40,4 +41,7 @@ spec:
# Remove the replicas field, otherwise the topology controller will revert back the autoscaler's changes
```

[cluster-autoscaler]: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/clusterapi
To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.

[Cluster Autoscaler]: https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/clusterapi
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm
85 changes: 85 additions & 0 deletions docs/content/addons/cni.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
+++
title = "CNI"
icon = "fa-solid fa-network-wired"
+++

When deploying a cluster with CAPI, deployment and configuration of CNI is up to the user. By leveraging CAPI cluster
lifecycle hooks, this handler deploys a requested CNI provider on the new cluster at the `AfterControlPlaneInitialized`
phase.

The hook uses either the [Cluster API Add-on Provider for Helm] or `ClusterResourceSet` to deploy the CNI resources
depending on the selected deployment strategy.

Currently the hook supports [Cilium](#cilium) and [Calico](#calico) CNI providers.

## Cilium

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

### Cilium Example

To enable deployment of Cilium on a cluster, specify the following values:

```yaml
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: <NAME>
spec:
topology:
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Cilium
strategy: HelmAddon
```

To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.

## Calico

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

### Calico Example

To enable deployment of Calico on a cluster, specify the following values:

```yaml
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: <NAME>
spec:
topology:
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Calico
strategy: HelmAddon
```

### ClusterResourceSet strategy

To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.

When using the `ClusterResourceSet` strategy, the hook creates two `ClusterResourceSets`: one to deploy the Tigera
Operator, and one to deploy Calico via the Tigera `Installation` CRD. The Tigera Operator CRS is shared between all
clusters in the operator, whereas the Calico installation CRS is unique per cluster.

As ClusterResourceSets must exist in the same name as the cluster they apply to, the lifecycle hook copies default
ConfigMaps from the same namespace as the CAPI runtime extensions hook pod is running in. This enables users to
configure defaults specific for their environment rather than compiling the defaults into the binary.

The Helm chart comes with default configurations for the Calico Installation CRS per supported provider, but overriding
is possible. For example. to change Docker provider's Calico configuration, specify following helm argument when
deploying cluster-api-runtime-extensions-nutanix chart:

```shell
--set-file hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content=<file>
```

[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm
15 changes: 10 additions & 5 deletions docs/content/addons/nfd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ title = "Node Feature Discovery"
icon = "fa-solid fa-eye"
+++

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

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

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

## Example

Expand All @@ -29,3 +29,8 @@ spec:
nfd:
strategy: HelmAddon
```

To deploy the addon via `ClusterResourceSet` replace the value of `strategy` with `ClusterResourceSet`.

[Node Feature Discovery]: https://github.com/kubernetes-sigs/node-feature-discovery
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm
4 changes: 2 additions & 2 deletions docs/content/contributing/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ gh pr checkout <RELEASE_PR_NUMBER>

Sign the previous commit:

```shell
git commit --gpg-sign --amend
```bash
git commit --gpg-sign --amend --no-edit
```

And force push:
Expand Down
Loading