Skip to content

Commit 3ee4cf0

Browse files
authored
Merge pull request #2399 from Nordix/lentzi90/release-templates
🌱 Release: Include ClusterClasses and Images templates
2 parents 811167b + b691082 commit 3ee4cf0

File tree

5 files changed

+41
-37
lines changed

5 files changed

+41
-37
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ templates/cluster-template-%.yaml: kustomize/v1beta1/% $(KUSTOMIZE) FORCE
486486
.PHONY: release-templates
487487
release-templates: $(RELEASE_DIR) templates ## Generate release templates
488488
cp templates/cluster-template*.yaml $(RELEASE_DIR)/
489+
cp templates/clusterclass*.yaml $(RELEASE_DIR)/
490+
cp templates/image-template*.yaml $(RELEASE_DIR)/
489491

490492
IMAGE_PATCH_DIR := $(ARTIFACTS)/image-patch
491493

docs/book/src/development/development.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This document explains how to develop Cluster API Provider OpenStack (CAPO).
3838
Note that CAPO depends on ORC. No matter how you choose to work, you will need to deploy ORC in order to make CAPO functional:
3939

4040
```bash
41-
kubectl apply -f https://github.com/k-orc/openstack-resource-controller/releases/download/v1.0.0/install.yaml
41+
kubectl apply -f https://github.com/k-orc/openstack-resource-controller/releases/latest/download/install.yaml
4242
```
4343

4444
TL;DR: Here is a short version for how to develop with Tilt:
@@ -58,11 +58,12 @@ export RESOURCE_TYPE=...
5858
make tilt-up
5959
# Back in CAPO repo
6060
# Install ORC
61-
kubectl apply -f https://github.com/k-orc/openstack-resource-controller/releases/download/v1.0.0/install.yaml
61+
kubectl apply -f https://github.com/k-orc/openstack-resource-controller/releases/latest/download/install.yaml
6262
# Create secret with clouds.yaml (the file is created by create_devstack.sh)
6363
kubectl create secret generic dev-test-cloud-config --from-file=clouds.yaml
6464
# Add images to use in the tests
65-
clusterctl generate yaml --from templates/images-template.yaml | kubectl apply -f -
65+
clusterctl generate yaml --from templates/image-template-node.yaml | kubectl apply -f -
66+
clusterctl generate yaml --from templates/image-template-bastion.yaml | kubectl apply -f -
6667
```
6768

6869
At this point, you should be able to apply the `dev-test` ClusterClass and start creating/deleting `development` clusters through the Tilt UI.
@@ -95,10 +96,11 @@ After generating `infrastructure-components.yaml`, replace the `us.gcr.io/k8s-ar
9596
## Automatically Adding Images to OpenStack
9697

9798
Before you can create a Cluster, you will need a suitable image in OpenStack.
98-
There is a convenient template available in `templates/images-template.yaml` for this purpose.
99+
There are convenient templates available in `templates/image-template-*.yaml` for this purpose.
100+
For example:
99101

100102
```bash
101-
clusterctl generate yaml --from templates/images-template.yaml | kubectl apply -f -
103+
clusterctl generate yaml --from templates/image-template-node.yaml | kubectl apply -f -
102104
```
103105

104106
## Testing Cluster Creation using the 'dev-test' ClusterClass with Tilt

templates/image-template-bastion.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: openstack.k-orc.cloud/v1alpha1
3+
kind: Image
4+
metadata:
5+
name: bastion-image
6+
spec:
7+
managementPolicy: managed
8+
resource:
9+
name: ubuntu-24.04
10+
content:
11+
diskFormat: qcow2
12+
download:
13+
url: ${BASTION_IMAGE_URL:="https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img"}
14+
cloudCredentialsRef:
15+
secretName: ${CLOUD_CONFIG_SECRET:=dev-test-cloud-config}
16+
cloudName: ${OPENSTACK_CLOUD:=capo-e2e}

templates/image-template-node.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: openstack.k-orc.cloud/v1alpha1
3+
kind: Image
4+
metadata:
5+
name: node-image
6+
spec:
7+
managementPolicy: managed
8+
resource:
9+
name: flatcar_production
10+
content:
11+
diskFormat: qcow2
12+
download:
13+
url: ${NODE_IMAGE_URL:="https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_openstack_image.img"}
14+
cloudCredentialsRef:
15+
secretName: ${CLOUD_CONFIG_SECRET:=dev-test-cloud-config}
16+
cloudName: ${OPENSTACK_CLOUD:=capo-e2e}

templates/images-template.yaml

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

0 commit comments

Comments
 (0)