Skip to content

Commit dae343a

Browse files
Merge branch 'master' into sanprabhu/cilium-node-subnet-pipeline-changes
2 parents eb032b1 + 287cce8 commit dae343a

File tree

8 files changed

+49
-22
lines changed

8 files changed

+49
-22
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/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
// +kubebuilder:resource:shortName=nnc
1717
// +kubebuilder:subresource:status
1818
// +kubebuilder:printcolumn:name="Requested IPs",type=integer,priority=1,JSONPath=`.spec.requestedIPCount`
19+
// +kubebuilder:printcolumn:name="Availability Zone",type=string,priority=1,JSONPath=`.spec.availabilityZone`
1920
// +kubebuilder:printcolumn:name="Allocated IPs",type=integer,priority=0,JSONPath=`.status.assignedIPCount`
2021
// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetName`
2122
// +kubebuilder:printcolumn:name="Subnet CIDR",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetAddressSpace`
@@ -46,6 +47,9 @@ type NodeNetworkConfigSpec struct {
4647
// +kubebuilder:validation:Optional
4748
RequestedIPCount int64 `json:"requestedIPCount"`
4849
IPsNotInUse []string `json:"ipsNotInUse,omitempty"`
50+
// AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed.
51+
// +kubebuilder:validation:Optional
52+
AvailabilityZone string `json:"availabilityZone,omitempty"`
4953
}
5054

5155
// Status indicates the NNC reconcile status

crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
name: Requested IPs
2222
priority: 1
2323
type: integer
24+
- jsonPath: .spec.availabilityZone
25+
name: Availability Zone
26+
priority: 1
27+
type: string
2428
- jsonPath: .status.assignedIPCount
2529
name: Allocated IPs
2630
type: integer
@@ -71,6 +75,10 @@ spec:
7175
spec:
7276
description: NodeNetworkConfigSpec defines the desired state of NetworkConfig
7377
properties:
78+
availabilityZone:
79+
description: AvailabilityZone contains the Azure availability zone
80+
for the virtual machine where network containers are placed.
81+
type: string
7482
ipsNotInUse:
7583
items:
7684
type: string

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

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets v0.12.0
1111
github.com/Masterminds/semver v1.5.0
1212
github.com/Microsoft/go-winio v0.6.2
13-
github.com/Microsoft/hcsshim v0.12.8
13+
github.com/Microsoft/hcsshim v0.12.9
1414
github.com/avast/retry-go/v3 v3.1.1
1515
github.com/avast/retry-go/v4 v4.6.0
1616
github.com/billgraziano/dpapi v0.5.0
@@ -39,7 +39,7 @@ require (
3939
go.uber.org/zap v1.27.0
4040
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
4141
golang.org/x/sys v0.26.0
42-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
42+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
4343
google.golang.org/grpc v1.67.1
4444
google.golang.org/protobuf v1.35.1
4545
gopkg.in/natefinch/lumberjack.v2 v2.2.1
@@ -63,7 +63,7 @@ require (
6363
github.com/coreos/go-iptables v0.8.0
6464
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
6565
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
66-
github.com/fsnotify/fsnotify v1.7.0
66+
github.com/fsnotify/fsnotify v1.8.0
6767
github.com/go-logr/logr v1.4.2 // indirect
6868
github.com/go-openapi/jsonpointer v0.20.0 // indirect
6969
github.com/go-openapi/jsonreference v0.20.2 // indirect
@@ -93,7 +93,7 @@ require (
9393
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
9494
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
9595
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
96-
github.com/prometheus/common v0.60.0
96+
github.com/prometheus/common v0.60.1
9797
github.com/prometheus/procfs v0.15.1 // indirect
9898
github.com/sirupsen/logrus v1.9.3
9999
github.com/spf13/afero v1.11.0 // indirect
@@ -137,7 +137,8 @@ require (
137137
)
138138

139139
require (
140-
github.com/containerd/containerd v1.7.23 // indirect
140+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
141+
github.com/containerd/typeurl/v2 v2.2.0 // indirect
141142
github.com/gorilla/websocket v1.5.0 // indirect
142143
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
143144
)

go.sum

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q
3939
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
4040
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
4141
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
42-
github.com/Microsoft/hcsshim v0.12.8 h1:BtDWYlFMcWhorrvSSo2M7z0csPdw6t7no/C3FsSvqiI=
43-
github.com/Microsoft/hcsshim v0.12.8/go.mod h1:cibQ4BqhJ32FXDwPdQhKhwrwophnh3FuT4nwQZF907w=
42+
github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg=
43+
github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y=
4444
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
4545
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
4646
github.com/avast/retry-go/v3 v3.1.1 h1:49Scxf4v8PmiQ/nY0aY3p0hDueqSmc7++cBbtiDGu2g=
@@ -58,10 +58,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
5858
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
5959
github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0=
6060
github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0=
61-
github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ=
62-
github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw=
6361
github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4=
6462
github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
63+
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
64+
github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
65+
github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsPEmzLso=
66+
github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g=
6567
github.com/containernetworking/cni v1.2.2 h1:9IbP6KJQQxVKo4hhnm8r50YcVKrJbJu3Dqw+Rbt1vYk=
6668
github.com/containernetworking/cni v1.2.2/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M=
6769
github.com/coreos/go-iptables v0.8.0 h1:MPc2P89IhuVpLI7ETL/2tx3XZ61VeICZjYqDEgNsPRc=
@@ -89,8 +91,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
8991
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
9092
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
9193
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
92-
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
93-
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
94+
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
95+
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
9496
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
9597
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
9698
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
@@ -241,8 +243,8 @@ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/j
241243
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
242244
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
243245
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
244-
github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA=
245-
github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
246+
github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc=
247+
github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
246248
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
247249
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
248250
github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4=
@@ -392,8 +394,8 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
392394
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
393395
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
394396
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
395-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs=
396-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
397+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
398+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
397399
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
398400
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
399401
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=

hack/aks/Makefile

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

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

0 commit comments

Comments
 (0)