Skip to content

Commit

Permalink
upgrade openstack template to v1beta1 format
Browse files Browse the repository at this point in the history
Signed-off-by: pli01 <[email protected]>
  • Loading branch information
pli01 committed Apr 25, 2024
1 parent 0440f55 commit 363fe4a
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions samples/openstack/k3s-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
kind: KThreesControlPlane
name: ${CLUSTER_NAME}-control-plane
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackCluster
name: ${CLUSTER_NAME}
---
Expand All @@ -47,7 +47,7 @@ spec:
clusterName: ${CLUSTER_NAME}
failureDomain: ${OPENSTACK_FAILURE_DOMAIN}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
name: ${CLUSTER_NAME}-md-0
version: ${KUBERNETES_VERSION}
Expand All @@ -59,57 +59,54 @@ metadata:
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: 1
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackCluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
cloudName: ${OPENSTACK_CLOUD}
dnsNameservers:
- ${OPENSTACK_DNS_NAMESERVERS}
externalNetworkId: ${OPENSTACK_EXTERNAL_NETWORK_ID}
externalNetwork:
id: ${OPENSTACK_EXTERNAL_NETWORK_ID}
identityRef:
kind: Secret
name: k3s-cloud-config
managedSecurityGroups: false
cloudName: ${OPENSTACK_CLOUD}
name: ${CLUSTER_NAME}-cloud-config
managedSecurityGroups: {}
disablePortSecurity: true
nodeCidr: 10.6.0.0/24
managedSubnets:
- cidr: 10.6.0.0/24
dnsNameservers:
- ${OPENSTACK_DNS_NAMESERVERS}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha6
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
template:
spec:
cloudName: ${OPENSTACK_CLOUD}
flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR}
identityRef:
kind: Secret
name: k3s-cloud-config
image: ${OPENSTACK_IMAGE_NAME}
image:
filter:
name: ${OPENSTACK_IMAGE_NAME}
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackMachineTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
namespace: default
spec:
template:
spec:
cloudName: ${OPENSTACK_CLOUD}
flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR}
identityRef:
kind: Secret
name: k3s-cloud-config
image: ${OPENSTACK_IMAGE_NAME}
image:
filter:
name: ${OPENSTACK_IMAGE_NAME}
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}

0 comments on commit 363fe4a

Please sign in to comment.