Skip to content

Commit e2ad4e2

Browse files
authored
Merge pull request #5210 from nawazkh/update_dev_templates
Update self-managed templates to use internal LB for node-to-node communication
2 parents 40f31f5 + d753715 commit e2ad4e2

25 files changed

+354
-6
lines changed

templates/cluster-template-aad.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/cluster-template-dual-stack.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/cluster-template-flatcar.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/cluster-template-ipv6.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/cluster-template-nvidia-gpu.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/flavors/aad/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ resources:
88
patches:
99
- path: patches/kubeadm-controlplane.yaml
1010
- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml
11+
- path: ../../internal-load-balancer/azure-cluster-frontend-ip.yaml
12+
- path: ../../internal-load-balancer/kubeadm-config-template-worker-node.yaml
1113

1214
sortOptions:
1315
order: fifo

templates/flavors/azure-bastion/kustomization.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: default
44
resources:
5-
- ../default
5+
- ../base
6+
- machine-deployment.yaml
7+
- ../../azure-cluster-identity
68
patches:
9+
- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml
710
- path: patches/azure-cluster.yaml
11+
- path: ../../internal-load-balancer/azure-cluster-frontend-ip.yaml
12+
- path: ../../internal-load-balancer/kubeadm-config-template-worker-node.yaml
813

914
sortOptions:
1015
order: fifo
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
apiVersion: cluster.x-k8s.io/v1beta1
3+
kind: MachineDeployment
4+
metadata:
5+
name: "${CLUSTER_NAME}-md-0"
6+
spec:
7+
clusterName: "${CLUSTER_NAME}"
8+
replicas: ${WORKER_MACHINE_COUNT:=2}
9+
selector:
10+
matchLabels:
11+
template:
12+
spec:
13+
clusterName: "${CLUSTER_NAME}"
14+
version: "${KUBERNETES_VERSION}"
15+
bootstrap:
16+
configRef:
17+
name: "${CLUSTER_NAME}-md-0"
18+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
19+
kind: KubeadmConfigTemplate
20+
infrastructureRef:
21+
name: "${CLUSTER_NAME}-md-0"
22+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
23+
kind: AzureMachineTemplate
24+
---
25+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
26+
kind: AzureMachineTemplate
27+
metadata:
28+
name: "${CLUSTER_NAME}-md-0"
29+
spec:
30+
template:
31+
spec:
32+
vmSize: ${AZURE_NODE_MACHINE_TYPE}
33+
osDisk:
34+
osType: "Linux"
35+
diskSizeGB: 128
36+
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
37+
---
38+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
39+
kind: KubeadmConfigTemplate
40+
metadata:
41+
name: "${CLUSTER_NAME}-md-0"
42+
spec:
43+
template:
44+
spec:
45+
preKubeadmCommands: []
46+
joinConfiguration:
47+
nodeRegistration:
48+
name: '{{ ds.meta_data["local_hostname"] }}'
49+
kubeletExtraArgs:
50+
cloud-provider: external
51+
files:
52+
- contentFrom:
53+
secret:
54+
name: ${CLUSTER_NAME}-md-0-azure-json
55+
key: worker-node-azure.json
56+
owner: root:root
57+
path: /etc/kubernetes/azure.json
58+
permissions: "0644"

templates/flavors/azure-cni-v1/kustomization.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: default
44
resources:
5-
- ../default
5+
- ../base
6+
- machine-deployment.yaml
7+
- ../../azure-cluster-identity
68
patches:
79
- path: ../../azure-cluster-identity/azurecluster-identity-ref.yaml
810
- path: patches/azure-machine-template-controlplane.yaml
911
- path: patches/azure-machine-template.yaml
1012
- path: patches/kubeadm-control-plane.yaml
1113
- path: patches/kubeadm-worker-node.yaml
14+
- path: ../../internal-load-balancer/azure-cluster-frontend-ip.yaml
15+
- path: ../../internal-load-balancer/kubeadm-config-template-worker-node.yaml
1216

1317
sortOptions:
1418
order: fifo
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
apiVersion: cluster.x-k8s.io/v1beta1
3+
kind: MachineDeployment
4+
metadata:
5+
name: "${CLUSTER_NAME}-md-0"
6+
spec:
7+
clusterName: "${CLUSTER_NAME}"
8+
replicas: ${WORKER_MACHINE_COUNT:=2}
9+
selector:
10+
matchLabels:
11+
template:
12+
spec:
13+
clusterName: "${CLUSTER_NAME}"
14+
version: "${KUBERNETES_VERSION}"
15+
bootstrap:
16+
configRef:
17+
name: "${CLUSTER_NAME}-md-0"
18+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
19+
kind: KubeadmConfigTemplate
20+
infrastructureRef:
21+
name: "${CLUSTER_NAME}-md-0"
22+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
23+
kind: AzureMachineTemplate
24+
---
25+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
26+
kind: AzureMachineTemplate
27+
metadata:
28+
name: "${CLUSTER_NAME}-md-0"
29+
spec:
30+
template:
31+
spec:
32+
vmSize: ${AZURE_NODE_MACHINE_TYPE}
33+
osDisk:
34+
osType: "Linux"
35+
diskSizeGB: 128
36+
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}
37+
---
38+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
39+
kind: KubeadmConfigTemplate
40+
metadata:
41+
name: "${CLUSTER_NAME}-md-0"
42+
spec:
43+
template:
44+
spec:
45+
preKubeadmCommands: []
46+
joinConfiguration:
47+
nodeRegistration:
48+
name: '{{ ds.meta_data["local_hostname"] }}'
49+
kubeletExtraArgs:
50+
cloud-provider: external
51+
files:
52+
- contentFrom:
53+
secret:
54+
name: ${CLUSTER_NAME}-md-0-azure-json
55+
key: worker-node-azure.json
56+
owner: root:root
57+
path: /etc/kubernetes/azure.json
58+
permissions: "0644"

0 commit comments

Comments
 (0)