Skip to content

Commit

Permalink
clean up documentation based on latest clusterctl release
Browse files Browse the repository at this point in the history
  • Loading branch information
eljohnson92 committed May 29, 2024
1 parent 83e7008 commit 6537fb4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .github/filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ src:

kubeadm:
- templates/flavors/kubeadm/default/*
- e2e/capl-cluster-flavors/kubeadm-capl-cluster/*
kubeadm_cluster-autoscaler:
- templates/flavors/kubeadm/cluster-autoscaler/*
kubeadm_dual-stack:
Expand All @@ -23,6 +24,7 @@ kubeadm_vpcless:

k3s:
- templates/flavors/k3s/default/*
- e2e/capl-cluster-flavors/k3s-capl-cluster/*
k3s_cluster-autoscaler:
- templates/flavors/k3s/cluster-autoscaler/*
k3s_dual-stack:
Expand All @@ -40,6 +42,7 @@ k3s_vpcless:

rke2:
- templates/flavors/rke2/default/*
- e2e/capl-cluster-flavors/rke2-capl-cluster/*
rke2_cluster-autoscaler:
- templates/flavors/rke2/cluster-autoscaler/*
rke2_etcd-backup-restore:
Expand Down
9 changes: 2 additions & 7 deletions docs/src/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,12 @@ infrastructure-local-linode/v0.0.0
└── metadata.yaml
```

This can then be used with `clusterctl` by adding the following to `~/.clusterctl/cluster-api.yaml`
(assuming the repo exists in the `$HOME` directory):
This can then be used with `clusterctl` by adding the following to `~/.cluster-api/clusterctl.yaml`:

```
providers:
- name: local-linode
url: ${HOME}/cluster-api-provider-linode/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
url: ${PWD}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
```

Expand Down Expand Up @@ -273,10 +272,6 @@ export LINODE_REGION=us-sea
export LINODE_CONTROL_PLANE_MACHINE_TYPE=g6-standard-2
export LINODE_MACHINE_TYPE=g6-standard-2

# IMPORTANT: Set linode, k3s, and rke2 providers in this config file.
# Find an example at e2e/gha-clusterctl-config.yaml
export CLUSTERCTL_CONFIG=~/.cluster-api/clusterctl.yaml

make e2etest
```

Expand Down
38 changes: 22 additions & 16 deletions docs/src/developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ For e2e tests CAPL uses the [Chainsaw project](https://kyverno.github.io/chainsa
spin up a cluster with the CAPL controllers installed and then uses `chainsaw-test.yaml` files to drive e2e testing.

All test live in the e2e folder with a directory structure of `e2e/${COMPONENT}/${TEST_NAME}`

### Environment Setup
The e2e tests use the `local-linode` infrastructure provider, this is registered by adding the following to `~/.cluster-api/clusterctl.yaml`:
```
providers:
- name: local-linode
url: ${PWD}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
```

### Running Tests
In order to run e2e tests run the following commands:
```bash
Expand All @@ -199,10 +209,6 @@ export LINODE_REGION=us-sea
export LINODE_CONTROL_PLANE_MACHINE_TYPE=g6-standard-2
export LINODE_MACHINE_TYPE=g6-standard-2

# IMPORTANT: Set linode, k3s, and rke2 providers in this config file.
# Find an example at e2e/gha-clusterctl-config.yaml
export CLUSTERCTL_CONFIG=~/.cluster-api/clusterctl.yaml

make e2etest
```
*Note: By default `make e2etest` runs all the e2e tests defined under `/e2e` dir*
Expand All @@ -219,18 +225,18 @@ make e2etest E2E_SELECTOR='flavors' E2E_FLAGS='--assert-timeout 10m0s'

There are other selectors you can use to invoke specfic tests. Please look at the table below for all the selectors available:

| Tests | Selector |
|----------------------------------|-------------------|
| All Tests | `all` |
| All Controllers | `quick` |
| All Flavors (default, k3s, rke2) | `flavors` |
| K3S Cluster | `k3s` |
| RKE2 Cluster | `rke2` |
| Default (kubeadm) Cluster | `default-cluster` |
| Linode Cluster Controller | `linodecluster` |
| Linode Machine Controller | `linodemachine` |
| Linode Obj Controller | `linodeobj` |
| Linode VPC Controller | `linodevpc` |
| Tests | Selector |
|----------------------------------|-----------------|
| All Tests | `all` |
| All Controllers | `quick` |
| All Flavors (default, k3s, rke2) | `flavors` |
| K3S Cluster | `k3s` |
| RKE2 Cluster | `rke2` |
| Default (kubeadm) Cluster | `kubeadm` |
| Linode Cluster Controller | `linodecluster` |
| Linode Machine Controller | `linodemachine` |
| Linode Obj Controller | `linodeobj` |
| Linode VPC Controller | `linodevpc` |

*Note: For any flavor e2e tests, please set the required env variables*

Expand Down
12 changes: 3 additions & 9 deletions docs/src/topics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ to provision the node. If you are using a custom image ensure the [cloud_init](h
By default, clusters are provisioned within VPC. For Regions which do not have [VPC support](https://www.linode.com/docs/products/networking/vpc/#availability) yet, use the [VPCLess](./flavors/vpcless.md) flavor to have clusters provisioned.
```

## Register linode as an infrastructure provider
1. Add `linode` as an infrastructure provider in `~/.cluster-api/clusterctl.yaml`
```yaml
providers:
- name: linode-linode
url: https://github.com/linode/cluster-api-provider-linode/releases/latest/infrastructure-components.yaml
type: InfrastructureProvider
```
## Install CAPL on your management cluster
```admonish warning
The `linode-linode` infrastructure provider requires clusterctl version 1.7.2 or higher
```
Install CAPL and enable the helm addon provider which is used by the majority of the CAPL flavors
```bash
clusterctl init --infrastructure linode-linode --addon helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: rke2-capl-cluster
# Labels to allow the test to be triggered based on selector flag
labels:
Expand Down
8 changes: 1 addition & 7 deletions e2e/gha-clusterctl-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
providers:
- name: local-linode
url: /home/runner/work/cluster-api-provider-linode/cluster-api-provider-linode/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
url: ${PWD}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
- name: "k3s"
url: https://github.com/k3s-io/cluster-api-k3s/releases/latest/bootstrap-components.yaml
type: "BootstrapProvider"
- name: "k3s"
url: https://github.com/k3s-io/cluster-api-k3s/releases/latest/control-plane-components.yaml
type: "ControlPlaneProvider"
- name: "rke2"
url: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/latest/bootstrap-components.yaml"
type: "BootstrapProvider"
- name: "rke2"
url: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/latest/control-plane-components.yaml"
type: "ControlPlaneProvider"

0 comments on commit 6537fb4

Please sign in to comment.