Skip to content

Commit 48833fd

Browse files
authored
Merge pull request #125 from canonical/KU-3872/update-openstack-templates
update openstack provider resources to v1beta1
2 parents 71682d3 + 4d91c71 commit 48833fd

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

templates/cluster-template-openstack.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,31 @@ metadata:
66
name: ${CLUSTER_NAME}
77
spec:
88
infrastructureRef:
9-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
9+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
1010
kind: OpenStackCluster
1111
name: ${CLUSTER_NAME}
1212
controlPlaneRef:
1313
kind: MicroK8sControlPlane
1414
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
1515
name: ${CLUSTER_NAME}-control-plane
1616
---
17-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
17+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
1818
kind: OpenStackCluster
1919
metadata:
2020
name: ${CLUSTER_NAME}
2121
spec:
2222
apiServerLoadBalancer:
2323
enabled: ${OPENSTACK_USE_OCTAVIA_LOADBALANCER}
24-
cloudName: ${OPENSTACK_CLOUD}
2524
identityRef:
2625
name: ${OPENSTACK_CLOUD_CONFIG_SECRET_NAME}
27-
kind: Secret
28-
nodeCidr: ${OPENSTACK_NETWORK_CIDR}
26+
cloudName: ${OPENSTACK_CLOUD}
2927
disablePortSecurity: true
30-
dnsNameservers: [${OPENSTACK_DNS_NAMESERVERS:= }]
31-
externalNetworkId: ${OPENSTACK_EXTERNAL_NETWORK_ID:=""}
28+
managedSubnets:
29+
- cidr: ${OPENSTACK_NETWORK_CIDR}
30+
dnsNameservers: [${OPENSTACK_DNS_NAMESERVERS:= }]
31+
disableExternalNetwork: false
32+
externalNetwork:
33+
id: ${OPENSTACK_EXTERNAL_NETWORK_ID:=""}
3234
---
3335
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
3436
kind: MicroK8sControlPlane
@@ -50,27 +52,28 @@ spec:
5052
portCompatibilityRemap: true
5153
machineTemplate:
5254
infrastructureTemplate:
53-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
55+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
5456
kind: OpenStackMachineTemplate
5557
name: "${CLUSTER_NAME}-control-plane"
5658
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
5759
version: "v${KUBERNETES_VERSION}"
5860
upgradeStrategy: "${UPGRADE_STRATEGY}"
5961
---
60-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
62+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
6163
kind: OpenStackMachineTemplate
6264
metadata:
6365
name: ${CLUSTER_NAME}-control-plane
6466
spec:
6567
template:
6668
spec:
6769
flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR}
68-
image: ${OPENSTACK_IMAGE_NAME}
70+
image:
71+
filter:
72+
name: ${OPENSTACK_IMAGE_NAME}
6973
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}
70-
cloudName: ${OPENSTACK_CLOUD}
7174
identityRef:
7275
name: ${OPENSTACK_CLOUD_CONFIG_SECRET_NAME}
73-
kind: Secret
76+
cloudName: ${OPENSTACK_CLOUD}
7477
---
7578
apiVersion: cluster.x-k8s.io/v1beta1
7679
kind: MachineDeployment
@@ -93,22 +96,23 @@ spec:
9396
kind: MicroK8sConfigTemplate
9497
infrastructureRef:
9598
name: "${CLUSTER_NAME}-md-0"
96-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
99+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
97100
kind: OpenStackMachineTemplate
98101
---
99-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
102+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
100103
kind: OpenStackMachineTemplate
101104
metadata:
102105
name: ${CLUSTER_NAME}-md-0
103106
spec:
104107
template:
105108
spec:
106-
cloudName: ${OPENSTACK_CLOUD}
107109
identityRef:
108110
name: ${OPENSTACK_CLOUD_CONFIG_SECRET_NAME}
109-
kind: Secret
111+
cloudName: ${OPENSTACK_CLOUD}
110112
flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR}
111-
image: ${OPENSTACK_IMAGE_NAME}
113+
image:
114+
filter:
115+
name: ${OPENSTACK_IMAGE_NAME}
112116
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}
113117
---
114118
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1

0 commit comments

Comments
 (0)