Skip to content

Commit 50c2a1c

Browse files
Merge branch 'master' into sanprabhu/cilium-node-subnet
2 parents 0cae5e4 + 5d14000 commit 50c2a1c

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

.pipelines/cni/cilium/cilium-scale-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ stages:
117117
new_count=${NODE_COUNT_UP} # Do not exceed NODE_COUNT_UP
118118
fi
119119
echo "Scaling up nodes to $new_count"
120-
az aks nodepool scale --name nodepool1 --cluster-name ${CLUSTER} --resource-group ${RESOURCE_GROUP} --node-count $new_count
120+
make -C ./hack/aks scale-nodes AZCLI=az GROUP=${RESOURCE_GROUP} CLUSTER=${CLUSTER} NODEPOOL=nodepool1 NODE_COUNT=$new_count
121121
if [ $new_count -eq ${NODE_COUNT_UP} ]; then
122122
echo "Node count reached ${NODE_COUNT_UP}"
123123
break
@@ -442,6 +442,7 @@ stages:
442442
- job: scale_down
443443
pool:
444444
name: "$(BUILD_POOL_NAME_DEFAULT)"
445+
timeoutInMinutes: 120
445446
steps:
446447
- task: AzureCLI@2
447448
inputs:
@@ -453,8 +454,7 @@ stages:
453454
set -ex
454455
az aks get-credentials --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
455456
echo "Scaling to 5 nodes"
456-
vmss_name=$(az vmss list -g MC_${RESOURCE_GROUP}_${CLUSTER}_$(LOCATION) --query "[].name" -o tsv)
457-
make -C ./hack/aks scale-vmss AZCLI=az GROUP=${RESOURCE_GROUP} CLUSTER=${CLUSTER} REGION=$(LOCATION) VMSS_NAME=$vmss_name NODE_COUNT=5
457+
make -C ./hack/aks scale-nodes AZCLI=az GROUP=${RESOURCE_GROUP} CLUSTER=${CLUSTER} NODEPOOL=nodepool1 NODE_COUNT=5
458458
kubectl get node
459459
name: "ScaleDown"
460460
displayName: "Scale down to 5 Nodes"

crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ type OverlayExtensionConfigList struct {
3131
}
3232

3333
// OverlayExtensionConfigSpec defines the desired state of OverlayExtensionConfig.
34+
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.extensionIPRange) || has(self.extensionIPRange)", message="ExtensionIPRange is required once set"
3435
type OverlayExtensionConfigSpec struct {
3536
// ExtensionIPRange field defines a CIDR that should be able to reach routing domain ip addresses.
3637
// +kubebuilder:validation:Optional
38+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
39+
// +kubebuilder:validation:MaxLength=43
40+
// 43 is max length of IPv6 CIDR string
3741
ExtensionIPRange string `json:"extensionIPRange,omitempty"`
3842
}
3943

crd/overlayextensionconfig/manifests/acn.azure.com_overlayextensionconfigs.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,18 @@ spec:
4848
description: OverlayExtensionConfigSpec defines the desired state of OverlayExtensionConfig.
4949
properties:
5050
extensionIPRange:
51-
description: ExtensionIPRange field defines a CIDR that should be
52-
able to reach routing domain ip addresses.
51+
description: |-
52+
ExtensionIPRange field defines a CIDR that should be able to reach routing domain ip addresses.
53+
43 is max length of IPv6 CIDR string
54+
maxLength: 43
5355
type: string
56+
x-kubernetes-validations:
57+
- message: Value is immutable
58+
rule: self == oldSelf
5459
type: object
60+
x-kubernetes-validations:
61+
- message: ExtensionIPRange is required once set
62+
rule: '!has(oldSelf.extensionIPRange) || has(self.extensionIPRange)'
5563
status:
5664
description: OverlayExtensionConfigStatus defines the observed state of
5765
OverlayExtensionConfig

hack/aks/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,5 +467,5 @@ down: ## Delete the cluster
467467
restart-vmss: ## Restarts the nodes in the cluster
468468
$(AZCLI) vmss restart -g MC_${GROUP}_${CLUSTER}_${REGION} --name $(VMSS_NAME)
469469

470-
scale-vmss: ## Scales the nodes in the cluster
471-
$(AZCLI) vmss scale -g MC_${GROUP}_${CLUSTER}_${REGION} --name $(VMSS_NAME) --new-capacity $(NODE_COUNT)
470+
scale-nodes: ## Scales the nodes in the cluster
471+
$(AZCLI) aks nodepool scale --resource-group $(GROUP) --cluster-name $(CLUSTER) --name $(NODEPOOL) --node-count $(NODE_COUNT)

0 commit comments

Comments
 (0)