Skip to content

Commit 9645dc7

Browse files
authored
Merge pull request #81 from canonical/MK-1358/update-openstack
Update OpenStack cluster template
2 parents 1f5c1fb + db5a06b commit 9645dc7

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

templates/cluster-template-openstack.rc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export OPENSTACK_SSH_KEY_NAME=my-ssh-key
2121
export OPENSTACK_NETWORK_CIDR=10.6.0.0/24
2222
export OPENSTACK_DNS_NAMESERVERS=
2323

24+
# OpenStack control plane configuration.
25+
# Set this to 'false' to use a simple Floating IP for the control plane (works everywhere)
26+
# Set this to 'true' to use an Octavia LoadBalancer for the control plane (requires octavia support in the cloud)
27+
export OPENSTACK_USE_OCTAVIA_LOADBALANCER=false
28+
2429
# (optional) Containerd HTTP proxy configuration. Leave empty if not required.
2530
export CONTAINERD_HTTP_PROXY=""
2631
export CONTAINERD_HTTPS_PROXY=""

templates/cluster-template-openstack.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ metadata:
66
name: ${CLUSTER_NAME}
77
spec:
88
infrastructureRef:
9-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
9+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
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/v1alpha5
17+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
1818
kind: OpenStackCluster
1919
metadata:
2020
name: ${CLUSTER_NAME}
2121
spec:
22+
apiServerLoadBalancer:
23+
enabled: ${OPENSTACK_USE_OCTAVIA_LOADBALANCER}
2224
cloudName: ${OPENSTACK_CLOUD}
2325
identityRef:
2426
name: ${OPENSTACK_CLOUD_CONFIG_SECRET_NAME}
@@ -48,14 +50,14 @@ spec:
4850
portCompatibilityRemap: true
4951
machineTemplate:
5052
infrastructureTemplate:
51-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
53+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
5254
kind: OpenStackMachineTemplate
5355
name: "${CLUSTER_NAME}-control-plane"
5456
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
5557
version: "v${KUBERNETES_VERSION}"
5658
upgradeStrategy: "${UPGRADE_STRATEGY}"
5759
---
58-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
60+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
5961
kind: OpenStackMachineTemplate
6062
metadata:
6163
name: ${CLUSTER_NAME}-control-plane
@@ -91,10 +93,10 @@ spec:
9193
kind: MicroK8sConfigTemplate
9294
infrastructureRef:
9395
name: "${CLUSTER_NAME}-md-0"
94-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
96+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
9597
kind: OpenStackMachineTemplate
9698
---
97-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
99+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
98100
kind: OpenStackMachineTemplate
99101
metadata:
100102
name: ${CLUSTER_NAME}-md-0

0 commit comments

Comments
 (0)