Skip to content

Commit

Permalink
Rename KCP infrastructureTemplate to machineTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed May 28, 2021
1 parent afe9c20 commit b951b0b
Show file tree
Hide file tree
Showing 31 changed files with 155 additions and 124 deletions.
9 changes: 5 additions & 4 deletions templates/cluster-template-aad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -116,6 +112,11 @@ spec:
- - LABEL=etcd_disk
- /var/lib/etcddisk
useExperimentalRetryJoin: true
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-ephemeral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-external-cloud-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -111,6 +107,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -150,6 +146,11 @@ spec:
- echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
- mv /etc/resolv.conf /etc/resolv.conf.OLD && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- systemctl restart systemd-resolved
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-machinepool-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -127,6 +123,11 @@ spec:
- mac=$(ip -o link | grep eth0 | grep ether | awk '{ print $17 }')
- sed -i -e "s/MACADDRESS/$${mac}/g" /etc/netplan/60-eth0.yaml
- netplan apply
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-machinepool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-multi-tenancy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -115,6 +111,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-nvidia-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -111,6 +107,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -119,6 +115,11 @@ spec:
- if [ -f /tmp/kubeadm-join-config.yaml ] || [ -f /run/kubeadm/kubeadm-join-config.yaml ]; then echo '127.0.0.1 apiserver.${CLUSTER_NAME}.capz.io apiserver' >> /etc/hosts; fi
preKubeadmCommands:
- if [ -f /tmp/kubeadm.yaml ] || [ -f /run/kubeadm/kubeadm.yaml ]; then echo '127.0.0.1 apiserver.${CLUSTER_NAME}.capz.io apiserver' >> /etc/hosts; fi
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-system-assigned-identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-user-assigned-identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -127,6 +123,11 @@ spec:
- mac=$(ip -o link | grep eth0 | grep ether | awk '{ print $17 }')
- sed -i -e "s/MACADDRESS/$${mac}/g" /etc/netplan/60-eth0.yaml
- netplan apply
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -110,6 +106,11 @@ spec:
mounts:
- - LABEL=etcd_disk
- /var/lib/etcddisk
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
9 changes: 5 additions & 4 deletions templates/flavors/base/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ metadata:
name: "${CLUSTER_NAME}-control-plane"
spec:
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
infrastructureTemplate:
kind: AzureMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
name: "${CLUSTER_NAME}-control-plane"
machineTemplate:
infrastructureRef:
kind: AzureMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
name: "${CLUSTER_NAME}-control-plane"
kubeadmConfigSpec:
initConfiguration:
nodeRegistration:
Expand Down
9 changes: 5 additions & 4 deletions templates/test/ci/cluster-template-prow-ci-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
kubeadmConfigSpec:
clusterConfiguration:
apiServer:
Expand Down Expand Up @@ -193,6 +189,11 @@ spec:
preKubeadmCommands:
- bash -c /tmp/kubeadm-bootstrap.sh
useExperimentalRetryJoin: true
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: AzureMachineTemplate
name: ${CLUSTER_NAME}-control-plane
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}
---
Expand Down
Loading

0 comments on commit b951b0b

Please sign in to comment.