Skip to content

Commit c57821f

Browse files
authored
Merge pull request #5466 from richardcase/e2e_templates_docs
📖 docs: update README for e2e templates and clusterclass notes
2 parents 5e56bbc + f4ca2d4 commit c57821f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

test/e2e/data/infrastructure-aws/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,41 @@ In e2e tests, this manifest can be used by setting the flavor to `custom` (clust
3232
},
3333
}, result)
3434
```
35+
36+
## ClusterClass Notes
37+
38+
If you want to add a new ClusterClass based flavour for a test you will need to do the following:
39+
40+
1. Create a new folder under `./test/e2e/data/infrastructure-aww/withclusterclass/kustomize_sources`
41+
2. Create a file called `cluster-template.yaml` with contains:
42+
- A single **Cluster** resource
43+
- Uses a topology
44+
- The class name used by the topology is important. We'll use `eks-e2e` as an example.
45+
3. Create a new file for your clusterclass (including templates). It must be named `clusterclass-[CLASSNAME].yaml`. So in our example it would be name clusterclass-eks-e2e.yaml.
46+
4. Create a file called `kustomization.yaml` with the following contents as a minumim:
47+
48+
```yaml
49+
resources:
50+
- cluster-template.yaml
51+
generatorOptions:
52+
disableNameSuffixHash: true
53+
labels:
54+
type: generated
55+
annotations:
56+
note: generated
57+
```
58+
59+
5. Update the e2e test config file (`./test/e2e/data/e2e_conf.yaml` or `./test/e2e/data/e2e_eks_conf.yaml`) to include the files, specifically for **v9.9.99** of the **aws**c provider.. For example:
60+
61+
```yaml
62+
- sourcePath: "./infrastructure-aws/withclusterclass/kustomize_sources/eks-clusterclass/clusterclass-eks-e2e.yaml"
63+
- sourcePath: "./infrastructure-aws/withclusterclass/generated/cluster-template-eks-clusterclass.yaml"
64+
```
65+
66+
You will now be able to use the flavour in tests.
67+
68+
### Troubleshooting
69+
70+
Run `make generate-test-flavors` and check that the cluster template has been created in `test/e2e/data/infrastructure-aws/withclusterclass/generated`.
71+
72+
Check the artifacts of the Prow job if it fails. Navigate to `artifacts/repository/infrastructure-aws/v9.9.99/` and check that the clusterclass and cluster template files are there.

0 commit comments

Comments
 (0)