Skip to content

Commit 9189f09

Browse files
committed
create public IP as target
1 parent 6d50417 commit 9189f09

File tree

1 file changed

+30
-160
lines changed

1 file changed

+30
-160
lines changed

hack/aks/Makefile

Lines changed: 30 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ azcfg: ## Set the $AZCLI to use aks-preview
4545
@$(AZCLI) extension add --name aks-preview --yes
4646
@$(AZCLI) extension update --name aks-preview
4747

48+
public-ip: rg-up
49+
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
50+
--resource-group $(GROUP) \
51+
--allocation-method Static \
52+
--ip-tags $(IP_TAG) \
53+
--location $(REGION) \
54+
--sku Standard \
55+
--tier Regional \
56+
--version IPv4
57+
4858
set-kubeconf: ## Adds the kubeconf for $CLUSTER
4959
$(AZCLI) aks get-credentials -n $(CLUSTER) -g $(GROUP)
5060

@@ -116,14 +126,7 @@ nodesubnet-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an NodeSubne
116126
@$(MAKE) set-kubeconf
117127

118128
overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster
119-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
120-
--resource-group $(GROUP) \
121-
--allocation-method Static \
122-
--ip-tags $(IP_TAG) \
123-
--location $(REGION) \
124-
--sku Standard \
125-
--tier Regional \
126-
--version IPv4
129+
@$(MAKE) public-ip
127130
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
128131
--auto-upgrade-channel $(AUTOUPGRADE) \
129132
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -144,14 +147,7 @@ endif
144147
@$(MAKE) set-kubeconf
145148

146149
overlay-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster without kube-proxy
147-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
148-
--resource-group $(GROUP) \
149-
--allocation-method Static \
150-
--ip-tags $(IP_TAG) \
151-
--location $(REGION) \
152-
--sku Standard \
153-
--tier Regional \
154-
--version IPv4
150+
@$(MAKE) public-ip
155151
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
156152
--auto-upgrade-channel $(AUTOUPGRADE) \
157153
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -169,14 +165,7 @@ overlay-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an Overlay BYO
169165
@$(MAKE) set-kubeconf
170166

171167
overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster
172-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
173-
--resource-group $(GROUP) \
174-
--allocation-method Static \
175-
--ip-tags $(IP_TAG) \
176-
--location $(REGION) \
177-
--sku Standard \
178-
--tier Regional \
179-
--version IPv4
168+
@$(MAKE) public-ip
180169
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
181170
--auto-upgrade-channel $(AUTOUPGRADE) \
182171
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -194,14 +183,7 @@ overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster
194183
@$(MAKE) set-kubeconf
195184

196185
overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster
197-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
198-
--resource-group $(GROUP) \
199-
--allocation-method Static \
200-
--ip-tags $(IP_TAG) \
201-
--location $(REGION) \
202-
--sku Standard \
203-
--tier Regional \
204-
--version IPv4
186+
@$(MAKE) public-ip
205187
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
206188
--auto-upgrade-channel $(AUTOUPGRADE) \
207189
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -218,14 +200,7 @@ overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster
218200
@$(MAKE) set-kubeconf
219201

220202
swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster
221-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
222-
--resource-group $(GROUP) \
223-
--allocation-method Static \
224-
--ip-tags $(IP_TAG) \
225-
--location $(REGION) \
226-
--sku Standard \
227-
--tier Regional \
228-
--version IPv4
203+
@$(MAKE) public-ip
229204
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
230205
--auto-upgrade-channel $(AUTOUPGRADE) \
231206
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -245,14 +220,7 @@ endif
245220
@$(MAKE) set-kubeconf
246221

247222
swift-byocni-nokubeproxy-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster without kube-proxy, add managed identity and public ip
248-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
249-
--resource-group $(GROUP) \
250-
--allocation-method Static \
251-
--ip-tags $(IP_TAG) \
252-
--location $(REGION) \
253-
--sku Standard \
254-
--tier Regional \
255-
--version IPv4
223+
@$(MAKE) public-ip
256224
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
257225
--auto-upgrade-channel $(AUTOUPGRADE) \
258226
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -270,14 +238,7 @@ swift-byocni-nokubeproxy-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI clus
270238
@$(MAKE) set-kubeconf
271239

272240
swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster
273-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
274-
--resource-group $(GROUP) \
275-
--allocation-method Static \
276-
--ip-tags $(IP_TAG) \
277-
--location $(REGION) \
278-
--sku Standard \
279-
--tier Regional \
280-
--version IPv4
241+
@$(MAKE) public-ip
281242
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
282243
--auto-upgrade-channel $(AUTOUPGRADE) \
283244
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -295,14 +256,7 @@ swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster
295256
@$(MAKE) set-kubeconf
296257

297258
swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
298-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
299-
--resource-group $(GROUP) \
300-
--allocation-method Static \
301-
--ip-tags $(IP_TAG) \
302-
--location $(REGION) \
303-
--sku Standard \
304-
--tier Regional \
305-
--version IPv4
259+
@$(MAKE) public-ip
306260
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
307261
--auto-upgrade-channel $(AUTOUPGRADE) \
308262
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -318,14 +272,7 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
318272
@$(MAKE) set-kubeconf
319273

320274
swiftv2-multitenancy-cluster-up: rg-up
321-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
322-
--resource-group $(GROUP) \
323-
--allocation-method Static \
324-
--ip-tags $(IP_TAG) \
325-
--location $(REGION) \
326-
--sku Standard \
327-
--tier Regional \
328-
--version IPv4
275+
@$(MAKE) public-ip
329276
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
330277
--network-plugin azure \
331278
--network-plugin-mode overlay \
@@ -340,14 +287,7 @@ swiftv2-multitenancy-cluster-up: rg-up
340287
@$(MAKE) set-kubeconf
341288

342289
swiftv2-dummy-cluster-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
343-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
344-
--resource-group $(GROUP) \
345-
--allocation-method Static \
346-
--ip-tags $(IP_TAG) \
347-
--location $(REGION) \
348-
--sku Standard \
349-
--tier Regional \
350-
--version IPv4
290+
@$(MAKE) public-ip
351291
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
352292
--network-plugin azure \
353293
--vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \
@@ -361,14 +301,7 @@ swiftv2-dummy-cluster-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
361301
# These AKS clusters can only be created in a limited subscription listed here:
362302
# https://dev.azure.com/msazure/CloudNativeCompute/_git/aks-rp?path=/resourceprovider/server/microsoft.com/containerservice/flags/network_flags.go&version=GBmaster&line=134&lineEnd=135&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents
363303
vnetscale-swift-byocni-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale SWIFT BYO CNI cluster
364-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
365-
--resource-group $(GROUP) \
366-
--allocation-method Static \
367-
--ip-tags $(IP_TAG) \
368-
--location $(REGION) \
369-
--sku Standard \
370-
--tier Regional \
371-
--version IPv4
304+
@$(MAKE) public-ip
372305
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
373306
--auto-upgrade-channel $(AUTOUPGRADE) \
374307
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -385,14 +318,7 @@ vnetscale-swift-byocni-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale
385318
@$(MAKE) set-kubeconf
386319

387320
vnetscale-swift-byocni-nokubeproxy-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale SWIFT BYO CNI cluster without kube-proxy
388-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
389-
--resource-group $(GROUP) \
390-
--allocation-method Static \
391-
--ip-tags $(IP_TAG) \
392-
--location $(REGION) \
393-
--sku Standard \
394-
--tier Regional \
395-
--version IPv4
321+
@$(MAKE) public-ip
396322
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
397323
--auto-upgrade-channel $(AUTOUPGRADE) \
398324
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -410,14 +336,7 @@ vnetscale-swift-byocni-nokubeproxy-up: rg-up vnetscale-swift-net-up ## Bring up
410336
@$(MAKE) set-kubeconf
411337

412338
vnetscale-swift-cilium-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale SWIFT Cilium cluster
413-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
414-
--resource-group $(GROUP) \
415-
--allocation-method Static \
416-
--ip-tags $(IP_TAG) \
417-
--location $(REGION) \
418-
--sku Standard \
419-
--tier Regional \
420-
--version IPv4
339+
@$(MAKE) public-ip
421340
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
422341
--auto-upgrade-channel $(AUTOUPGRADE) \
423342
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -435,14 +354,7 @@ vnetscale-swift-cilium-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale
435354
@$(MAKE) set-kubeconf
436355

437356
vnetscale-swift-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale SWIFT AzCNI cluster
438-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
439-
--resource-group $(GROUP) \
440-
--allocation-method Static \
441-
--ip-tags $(IP_TAG) \
442-
--location $(REGION) \
443-
--sku Standard \
444-
--tier Regional \
445-
--version IPv4
357+
@$(MAKE) public-ip
446358
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
447359
--auto-upgrade-channel $(AUTOUPGRADE) \
448360
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -458,14 +370,7 @@ vnetscale-swift-up: rg-up vnetscale-swift-net-up ## Bring up a Vnet Scale SWIFT
458370
@$(MAKE) set-kubeconf
459371

460372
windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster
461-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
462-
--resource-group $(GROUP) \
463-
--allocation-method Static \
464-
--ip-tags $(IP_TAG) \
465-
--location $(REGION) \
466-
--sku Standard \
467-
--tier Regional \
468-
--version IPv4
373+
@$(MAKE) public-ip
469374
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
470375
--auto-upgrade-channel $(AUTOUPGRADE) \
471376
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -483,14 +388,7 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster
483388
@$(MAKE) set-kubeconf
484389

485390
linux-cniv1-up: rg-up overlay-net-up ## Bring up a Linux CNIv1 cluster
486-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
487-
--resource-group $(GROUP) \
488-
--allocation-method Static \
489-
--ip-tags $(IP_TAG) \
490-
--location $(REGION) \
491-
--sku Standard \
492-
--tier Regional \
493-
--version IPv4
391+
@$(MAKE) public-ip
494392
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
495393
--auto-upgrade-channel $(AUTOUPGRADE) \
496394
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -507,14 +405,7 @@ linux-cniv1-up: rg-up overlay-net-up ## Bring up a Linux CNIv1 cluster
507405
@$(MAKE) set-kubeconf
508406

509407
dualstack-overlay-up: rg-up overlay-net-up ## Brings up an dualstack Overlay cluster with Linux node only
510-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
511-
--resource-group $(GROUP) \
512-
--allocation-method Static \
513-
--ip-tags $(IP_TAG) \
514-
--location $(REGION) \
515-
--sku Standard \
516-
--tier Regional \
517-
--version IPv4
408+
@$(MAKE) public-ip
518409
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
519410
--auto-upgrade-channel $(AUTOUPGRADE) \
520411
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -532,14 +423,7 @@ dualstack-overlay-up: rg-up overlay-net-up ## Brings up an dualstack Overlay clu
532423
@$(MAKE) set-kubeconf
533424

534425
dualstack-overlay-byocni-up: rg-up overlay-net-up ## Brings up an dualstack Overlay BYO CNI cluster
535-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
536-
--resource-group $(GROUP) \
537-
--allocation-method Static \
538-
--ip-tags $(IP_TAG) \
539-
--location $(REGION) \
540-
--sku Standard \
541-
--tier Regional \
542-
--version IPv4
426+
@$(MAKE) public-ip
543427
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
544428
--auto-upgrade-channel $(AUTOUPGRADE) \
545429
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -557,14 +441,7 @@ dualstack-overlay-byocni-up: rg-up overlay-net-up ## Brings up an dualstack Over
557441
@$(MAKE) set-kubeconf
558442

559443
cilium-dualstack-up: rg-up overlay-net-up ## Brings up a Cilium Dualstack Overlay cluster with Linux node only
560-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
561-
--resource-group $(GROUP) \
562-
--allocation-method Static \
563-
--ip-tags $(IP_TAG) \
564-
--location $(REGION) \
565-
--sku Standard \
566-
--tier Regional \
567-
--version IPv4
444+
@$(MAKE) public-ip
568445
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
569446
--auto-upgrade-channel $(AUTOUPGRADE) \
570447
--node-os-upgrade-channel $(NODEUPGRADE) \
@@ -583,14 +460,7 @@ cilium-dualstack-up: rg-up overlay-net-up ## Brings up a Cilium Dualstack Overla
583460
@$(MAKE) set-kubeconf
584461

585462
dualstack-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up a Dualstack overlay BYOCNI cluster with Linux node only and no kube-proxy
586-
$(AZCLI) network public-ip create --name $(PUBLIC_IP) \
587-
--resource-group $(GROUP) \
588-
--allocation-method Static \
589-
--ip-tags $(IP_TAG) \
590-
--location $(REGION) \
591-
--sku Standard \
592-
--tier Regional \
593-
--version IPv4
463+
@$(MAKE) public-ip
594464
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
595465
--auto-upgrade-channel $(AUTOUPGRADE) \
596466
--node-os-upgrade-channel $(NODEUPGRADE) \

0 commit comments

Comments
 (0)