From 5eb0f10bfb75e76291e1596ec41ab28b1b0c7a05 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 30 Apr 2024 13:30:41 +0100 Subject: [PATCH 1/3] docs: Specify no-edit flag in release process commit signing --- docs/content/contributing/releasing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/contributing/releasing.md b/docs/content/contributing/releasing.md index b8c70fc20..66c34782c 100644 --- a/docs/content/contributing/releasing.md +++ b/docs/content/contributing/releasing.md @@ -27,8 +27,8 @@ gh pr checkout Sign the previous commit: -```shell -git commit --gpg-sign --amend +```bash +git commit --gpg-sign --amend --no-edit ``` And force push: From 29c99d0ed5c01c64e97d0e833467ede2467ac8f5 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 30 Apr 2024 16:17:11 +0100 Subject: [PATCH 2/3] docs: Update addons docs --- docs/content/addons/calico-cni.md | 44 ------------ docs/content/addons/cluster-autoscaler.md | 14 ++-- docs/content/addons/cni.md | 84 +++++++++++++++++++++++ docs/content/addons/nfd.md | 15 ++-- 4 files changed, 103 insertions(+), 54 deletions(-) delete mode 100644 docs/content/addons/calico-cni.md create mode 100644 docs/content/addons/cni.md diff --git a/docs/content/addons/calico-cni.md b/docs/content/addons/calico-cni.md deleted file mode 100644 index efcff5df6..000000000 --- a/docs/content/addons/calico-cni.md +++ /dev/null @@ -1,44 +0,0 @@ -+++ -title = "Calico 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 Calico CNI on the new cluster via `ClusterResourceSets` at the -`AfterControlPlaneInitialized` phase. - -Deployment of Calico is opt-in via the [provider-specific cluster configuration]({{< ref ".." >}}). - -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. - -## Example - -To enable deployment of Calico on a cluster, specify the following values: - -```yaml -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: -spec: - topology: - variables: - - name: clusterConfig - value: - addons: - cni: - provider: Calico -``` - -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. To do so, specify: - -```shell ---set-file handlers.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content= -``` diff --git a/docs/content/addons/cluster-autoscaler.md b/docs/content/addons/cluster-autoscaler.md index 68394f3de..d73d8b2fa 100644 --- a/docs/content/addons/cluster-autoscaler.md +++ b/docs/content/addons/cluster-autoscaler.md @@ -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 @@ -26,7 +27,7 @@ spec: value: addons: clusterAutoscaler: - strategy: ClusterResourceSet + strategy: HelmAddon workers: machineDeployments: - class: default-worker @@ -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 diff --git a/docs/content/addons/cni.md b/docs/content/addons/cni.md new file mode 100644 index 000000000..a8bb2e70e --- /dev/null +++ b/docs/content/addons/cni.md @@ -0,0 +1,84 @@ ++++ +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: +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: +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. To do so, specify: + +```shell +--set-file handlers.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content= +``` + +[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm diff --git a/docs/content/addons/nfd.md b/docs/content/addons/nfd.md index 04fc26bbf..a235302e1 100644 --- a/docs/content/addons/nfd.md +++ b/docs/content/addons/nfd.md @@ -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 @@ -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 From 1a2288994825fece7d4cce05b4651f4eb045b860 Mon Sep 17 00:00:00 2001 From: Shalin Patel Date: Tue, 30 Apr 2024 14:17:15 -0700 Subject: [PATCH 3/3] docs: fix helm value path in CNI documentation --- docs/content/addons/cni.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/addons/cni.md b/docs/content/addons/cni.md index a8bb2e70e..6b2220f62 100644 --- a/docs/content/addons/cni.md +++ b/docs/content/addons/cni.md @@ -75,10 +75,11 @@ ConfigMaps from the same namespace as the CAPI runtime extensions hook pod is ru 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. To do so, specify: +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 handlers.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content= +--set-file hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content= ``` [Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm