Skip to content

Commit

Permalink
Add MachineDeployment template (kubernetes-sigs#384)
Browse files Browse the repository at this point in the history
This patch adds MachineDeployment template as in
cluster-api-provider-aws.
  • Loading branch information
hidekazuna authored and pierreprinetti committed Apr 22, 2024
1 parent c5cfc3b commit 8dc0ead
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/clusterctl/examples/openstack/generate-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ CACERT="/etc/certs/cacert"
mkdir -p $PWD/$OUTPUT
cp -n $PWD/cluster.yaml $PWD/$OUTPUT/cluster.yaml || true
cp -n $PWD/machines.yaml.template $PWD/$OUTPUT/machines.yaml || true
cp -n $PWD/machine-deployment.yaml.template $PWD/$OUTPUT/machine-deployment.yaml || true

# Make the config directory
mkdir -p $CONFIG_DIR
Expand Down
41 changes: 41 additions & 0 deletions cmd/clusterctl/examples/openstack/machine-deployment.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: "cluster.k8s.io/v1alpha1"
kind: MachineDeployment
metadata:
name: test1-machinedeployment
labels:
cluster.k8s.io/cluster-name: test1
spec:
replicas: 1
selector:
matchLabels:
cluster.k8s.io/cluster-name: test1
set: node
template:
metadata:
labels:
cluster.k8s.io/cluster-name: test1
set: node
spec:
providerSpec:
value:
apiVersion: "openstackproviderconfig/v1alpha1"
kind: "OpenstackProviderSpec"
flavor: m1.medium
image: <Image Name>
sshUserName: <SSH Username>
keyName: cluster-api-provider-openstack
availabilityZone: nova
networks:
- uuid: <Kubernetes Network ID>
securityGroups:
- uuid: <Security Group ID>
userDataSecret:
name: worker-user-data
namespace: openstack-provider-system
trunk: false
tags:
- a-machine-specific-tag
serverMetadata:
key: value
versions:
kubelet: 1.14.0

0 comments on commit 8dc0ead

Please sign in to comment.