Skip to content

Commit

Permalink
Merge pull request #81 from canonical/MK-1358/update-openstack
Browse files Browse the repository at this point in the history
Update OpenStack cluster template
  • Loading branch information
neoaggelos authored Oct 10, 2023
2 parents 1f5c1fb + db5a06b commit 9645dc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions templates/cluster-template-openstack.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export OPENSTACK_SSH_KEY_NAME=my-ssh-key
export OPENSTACK_NETWORK_CIDR=10.6.0.0/24
export OPENSTACK_DNS_NAMESERVERS=

# OpenStack control plane configuration.
# Set this to 'false' to use a simple Floating IP for the control plane (works everywhere)
# Set this to 'true' to use an Octavia LoadBalancer for the control plane (requires octavia support in the cloud)
export OPENSTACK_USE_OCTAVIA_LOADBALANCER=false

# (optional) Containerd HTTP proxy configuration. Leave empty if not required.
export CONTAINERD_HTTP_PROXY=""
export CONTAINERD_HTTPS_PROXY=""
Expand Down
14 changes: 8 additions & 6 deletions templates/cluster-template-openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ metadata:
name: ${CLUSTER_NAME}
spec:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackCluster
name: ${CLUSTER_NAME}
controlPlaneRef:
kind: MicroK8sControlPlane
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
name: ${CLUSTER_NAME}-control-plane
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackCluster
metadata:
name: ${CLUSTER_NAME}
spec:
apiServerLoadBalancer:
enabled: ${OPENSTACK_USE_OCTAVIA_LOADBALANCER}
cloudName: ${OPENSTACK_CLOUD}
identityRef:
name: ${OPENSTACK_CLOUD_CONFIG_SECRET_NAME}
Expand Down Expand Up @@ -48,14 +50,14 @@ spec:
portCompatibilityRemap: true
machineTemplate:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackMachineTemplate
name: "${CLUSTER_NAME}-control-plane"
replicas: ${CONTROL_PLANE_MACHINE_COUNT:=1}
version: "v${KUBERNETES_VERSION}"
upgradeStrategy: "${UPGRADE_STRATEGY}"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
Expand Down Expand Up @@ -91,10 +93,10 @@ spec:
kind: MicroK8sConfigTemplate
infrastructureRef:
name: "${CLUSTER_NAME}-md-0"
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackMachineTemplate
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackMachineTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
Expand Down

0 comments on commit 9645dc7

Please sign in to comment.