Skip to content

Commit 7529542

Browse files
committed
cap the overrides map to be at 10
1 parent b149b0c commit 7529542

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

pkg/apis/crds/karpenter.azure.com_aksnodeclasses.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ spec:
186186
LocalDNS configures the per-node local DNS, with VnetDNS and KubeDNS overrides.
187187
LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster.
188188
For more details see aka.ms/aks/localdns.
189+
Note: LocalDNS requires Kubernetes 1.36+ when using mode 'Preferred'. Use mode 'Required' at your own risk on older versions.
189190
properties:
190191
kubeDNSOverrides:
191192
additionalProperties:
@@ -260,6 +261,7 @@ spec:
260261
&& has(self.protocol) && self.protocol == ''ForceTCP'')'
261262
description: KubeDNS overrides apply to DNS traffic from pods
262263
with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
264+
maxProperties: 10
263265
type: object
264266
mode:
265267
description: Mode of enablement for localDNS.
@@ -341,6 +343,7 @@ spec:
341343
&& has(self.protocol) && self.protocol == ''ForceTCP'')'
342344
description: VnetDNS overrides apply to DNS traffic from pods
343345
with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
346+
maxProperties: 10
344347
type: object
345348
required:
346349
- kubeDNSOverrides
@@ -715,6 +718,7 @@ spec:
715718
LocalDNS configures the per-node local DNS, with VnetDNS and KubeDNS overrides.
716719
LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster.
717720
For more details see aka.ms/aks/localdns.
721+
Note: LocalDNS requires Kubernetes 1.36+ when using mode 'Preferred'. Use mode 'Required' at your own risk on older versions.
718722
properties:
719723
kubeDNSOverrides:
720724
additionalProperties:
@@ -789,6 +793,7 @@ spec:
789793
&& has(self.protocol) && self.protocol == ''ForceTCP'')'
790794
description: KubeDNS overrides apply to DNS traffic from pods
791795
with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
796+
maxProperties: 10
792797
type: object
793798
mode:
794799
description: Mode of enablement for localDNS.
@@ -870,6 +875,7 @@ spec:
870875
&& has(self.protocol) && self.protocol == ''ForceTCP'')'
871876
description: VnetDNS overrides apply to DNS traffic from pods
872877
with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
878+
maxProperties: 10
873879
type: object
874880
required:
875881
- kubeDNSOverrides

pkg/apis/v1alpha2/aksnodeclass.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ type AKSNodeClassSpec struct {
8989
// LocalDNS configures the per-node local DNS, with VnetDNS and KubeDNS overrides.
9090
// LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster.
9191
// For more details see aka.ms/aks/localdns.
92+
// Note: LocalDNS requires Kubernetes 1.36+ when using mode 'Preferred'. Use mode 'Required' at your own risk on older versions.
9293
// +optional
9394
LocalDNS *LocalDNS `json:"localDNS,omitempty"`
9495
}
@@ -130,9 +131,11 @@ type LocalDNS struct {
130131
// +required
131132
Mode *LocalDNSMode `json:"mode"`
132133
// VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
134+
// +kubebuilder:validation:MaxProperties=10
133135
// +required
134136
VnetDNSOverrides map[string]*LocalDNSOverrides `json:"vnetDNSOverrides"`
135137
// KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
138+
// +kubebuilder:validation:MaxProperties=10
136139
// +required
137140
KubeDNSOverrides map[string]*LocalDNSOverrides `json:"kubeDNSOverrides"`
138141
}

pkg/apis/v1beta1/aksnodeclass.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ type AKSNodeClassSpec struct {
9090
// LocalDNS configures the per-node local DNS, with VnetDNS and KubeDNS overrides.
9191
// LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster.
9292
// For more details see aka.ms/aks/localdns.
93+
// Note: LocalDNS requires Kubernetes 1.36+ when using mode 'Preferred'. Use mode 'Required' at your own risk on older versions.
9394
// +optional
9495
LocalDNS *LocalDNS `json:"localDNS,omitempty"`
9596
}
@@ -131,9 +132,11 @@ type LocalDNS struct {
131132
// +required
132133
Mode *LocalDNSMode `json:"mode"`
133134
// VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
135+
// +kubebuilder:validation:MaxProperties=10
134136
// +required
135137
VnetDNSOverrides map[string]*LocalDNSOverrides `json:"vnetDNSOverrides"`
136138
// KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
139+
// +kubebuilder:validation:MaxProperties=10
137140
// +required
138141
KubeDNSOverrides map[string]*LocalDNSOverrides `json:"kubeDNSOverrides"`
139142
}

0 commit comments

Comments
 (0)