Skip to content

Commit 7269168

Browse files
Add VM SKU parameter, Azure CNI support, and improved image registry documentation
Co-authored-by: tamilmani1989 <[email protected]>
1 parent 7a08a48 commit 7269168

File tree

2 files changed

+57
-7
lines changed

2 files changed

+57
-7
lines changed

hack/aks/Makefile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,26 +442,35 @@ byocni-cluster-up: ## Create complete BYO CNI cluster with CNS and CNI (default:
442442
@echo "Creating BYO CNI cluster with CNS and $(CNI_TYPE)..."
443443
@echo "Variables: CLUSTER=$(CLUSTER), CNS_VERSION=$(CNS_VERSION), CNI_TYPE=$(CNI_TYPE)"
444444
@$(MAKE) validate-cni-type
445+
ifeq ($(CNI_TYPE),azurecni)
446+
@$(MAKE) overlay-up
447+
else
445448
@$(MAKE) overlay-byocni-nokubeproxy-up
449+
endif
446450
@echo "Cluster created successfully. Deploying CNS..."
447451
@$(MAKE) deploy-cns
448452
@echo "CNS deployed successfully. Deploying $(CNI_TYPE)..."
449453
ifeq ($(CNI_TYPE),cilium)
450454
@$(MAKE) deploy-cilium
455+
else ifeq ($(CNI_TYPE),azurecni)
456+
@echo "Azure CNI is already configured in the cluster. No additional CNI deployment needed."
451457
else
452-
@echo "Warning: CNI_TYPE=$(CNI_TYPE) not supported yet. Only cilium is currently supported."
453-
@echo "Available CNI types: cilium"
458+
@echo "Warning: CNI_TYPE=$(CNI_TYPE) not supported yet."
459+
@echo "Available CNI types: cilium, azurecni"
454460
@exit 1
455461
endif
456462
@echo "BYO CNI cluster setup completed successfully!"
457463

458464
validate-cni-type: ## Validate the CNI type
459465
ifeq ($(CNI_TYPE),cilium)
460466
@echo "✓ CNI type validation passed: $(CNI_TYPE)"
467+
else ifeq ($(CNI_TYPE),azurecni)
468+
@echo "✓ CNI type validation passed: $(CNI_TYPE)"
461469
else
462470
@echo "✗ Error: CNI_TYPE=$(CNI_TYPE) is not supported."
463-
@echo "Available CNI types: cilium"
471+
@echo "Available CNI types: cilium, azurecni"
464472
@echo "Example: make byocni-cluster-up CNI_TYPE=cilium"
473+
@echo "Example: make byocni-cluster-up CNI_TYPE=azurecni"
465474
@exit 1
466475
endif
467476

@@ -504,14 +513,15 @@ byocni-cluster-vars: ## Show variables for BYO CNI cluster setup
504513
@echo " REGION=$(REGION)"
505514
@echo " SUB=$(SUB)"
506515
@echo " VNET=$(VNET)"
516+
@echo " VM_SIZE=$(VM_SIZE)"
507517
@echo ""
508518
@echo "CNI configuration:"
509519
@echo " CNI_TYPE=$(CNI_TYPE)"
510520
@echo ""
511521
@echo "CNS configuration:"
512522
@echo " CNS_VERSION=$(CNS_VERSION)"
513523
@echo " AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION)"
514-
@echo " CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)"
524+
@echo " CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) (MCR/ACR - affects CNS image paths)"
515525
@echo ""
516526
@echo "Cilium configuration:"
517527
@echo " CILIUM_DIR=$(CILIUM_DIR)"
@@ -520,9 +530,15 @@ byocni-cluster-vars: ## Show variables for BYO CNI cluster setup
520530
@echo " IPV6_HP_BPF_VERSION=$(IPV6_HP_BPF_VERSION)"
521531
@echo " DUALSTACK=$(DUALSTACK)"
522532
@echo ""
533+
@echo "Image registry options:"
534+
@echo " - MCR: mcr.microsoft.com/containernetworking"
535+
@echo " - ACR: acnpublic.azurecr.io (default for Cilium)"
536+
@echo " - Custom: your-registry.azurecr.io/path"
537+
@echo ""
523538
@echo "Repository root:"
524539
@echo " REPO_ROOT=$(REPO_ROOT)"
525540
@echo ""
526541
@echo "Example usage:"
527542
@echo " make byocni-cluster-up CLUSTER=my-cluster SUB=<subscription-id>"
543+
@echo " make byocni-cluster-up CLUSTER=my-cluster SUB=<subscription-id> CNI_TYPE=azurecni"
528544
@echo " make byocni-cluster-up CLUSTER=my-cluster SUB=<subscription-id> CNS_VERSION=v1.6.0 CILIUM_DIR=1.16 CILIUM_VERSION_TAG=v1.16.5"

hack/aks/README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,56 @@ Create a BYO CNI cluster with Cilium (default):
6565
make byocni-cluster-up CLUSTER=my-cluster SUB=<subscription-id>
6666
```
6767

68+
Create a BYO CNI cluster with Azure CNI:
69+
```bash
70+
make byocni-cluster-up CLUSTER=my-cluster SUB=<subscription-id> CNI_TYPE=azurecni
71+
```
72+
6873
### Customization
6974

7075
All parameters are configurable:
7176
```bash
7277
make byocni-cluster-up \
7378
CLUSTER=my-cilium-cluster \
7479
SUB=<subscription-id> \
80+
VM_SIZE=Standard_D2s_v3 \
7581
CNS_VERSION=v1.6.0 \
7682
CILIUM_DIR=1.16 \
7783
CILIUM_VERSION_TAG=v1.16.5 \
7884
CILIUM_IMAGE_REGISTRY=mcr.microsoft.com/containernetworking
7985
```
8086

87+
Using different image repositories:
88+
```bash
89+
# Using MCR for both CNS and Cilium
90+
make byocni-cluster-up \
91+
CLUSTER=my-cluster \
92+
SUB=<subscription-id> \
93+
CNS_IMAGE_REPO=MCR \
94+
CILIUM_IMAGE_REGISTRY=mcr.microsoft.com/containernetworking
95+
96+
# Using ACR for CNS and custom registry for Cilium
97+
make byocni-cluster-up \
98+
CLUSTER=my-cluster \
99+
SUB=<subscription-id> \
100+
CNS_IMAGE_REPO=ACR \
101+
CILIUM_IMAGE_REGISTRY=my-registry.azurecr.io/cilium
102+
```
103+
81104
### Available Configuration
82105

83-
- `CNI_TYPE`: cilium (default) - Future CNI types can be added
106+
- `CNI_TYPE`: cilium, azurecni (default: cilium)
107+
- `VM_SIZE`: Node VM size (default: Standard_B2s)
84108
- `CNS_VERSION`: CNS version to deploy (default: v1.5.38)
85109
- `AZURE_IPAM_VERSION`: Azure IPAM version (default: v0.3.0)
86110
- `CNS_IMAGE_REPO`: CNS image repository - MCR or ACR (default: MCR)
111+
- MCR: Uses Microsoft Container Registry paths
112+
- ACR: Uses Azure Container Registry paths
87113
- `CILIUM_DIR`: Cilium version directory - 1.12, 1.13, 1.14, 1.16, 1.17 (default: 1.14)
88114
- `CILIUM_VERSION_TAG`: Cilium image tag (default: v1.14.8)
89115
- `CILIUM_IMAGE_REGISTRY`: Cilium image registry (default: acnpublic.azurecr.io)
116+
- Can be set to mcr.microsoft.com/containernetworking for MCR
117+
- Or custom registry URL
90118
- `IPV6_HP_BPF_VERSION`: IPv6 HP BPF version for dual stack (default: v0.0.3)
91119
- `DUALSTACK`: Enable dual-stack configuration (default: false)
92120

@@ -97,12 +125,18 @@ make byocni-cluster-vars
97125

98126
### Workflow
99127

100-
The `byocni-cluster-up` target orchestrates three main steps:
128+
The `byocni-cluster-up` target orchestrates the complete setup workflow:
101129

102-
1. **Cluster Creation**: Uses `overlay-byocni-nokubeproxy-up` to create AKS cluster
130+
**For Cilium CNI (default):**
131+
1. **Cluster Creation**: Uses `overlay-byocni-nokubeproxy-up` to create AKS cluster without CNI
103132
2. **CNS Deployment**: Uses root makefile `test-load` target with CNS-specific parameters
104133
3. **CNI Deployment**: Deploys Cilium using manifests from `test/integration/manifests/cilium/`
105134

135+
**For Azure CNI:**
136+
1. **Cluster Creation**: Uses `overlay-up` to create AKS cluster with Azure CNI pre-configured
137+
2. **CNS Deployment**: Uses root makefile `test-load` target with CNS-specific parameters
138+
3. **CNI Configuration**: Azure CNI is already configured - no additional deployment needed
139+
106140
Individual steps can also be run separately:
107141
```bash
108142
make deploy-cns

0 commit comments

Comments
 (0)