Skip to content

Commit 0775271

Browse files
authored
Merge pull request #6953 from zalando-incubator/dev-to-kube-1.26
dev to kube-1.26
2 parents 73793d9 + be18472 commit 0775271

File tree

6 files changed

+43
-15
lines changed

6 files changed

+43
-15
lines changed

cluster/config-defaults.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ metrics_service_mem_max: "4Gi"
417417
metrics_server_metric_resolution: "15s"
418418

419419
kube_aws_iam_controller_cpu: "5m"
420-
kube_aws_iam_controller_mem_max: "1Gi"
420+
kube_aws_iam_controller_mem: "50Mi"
421421

422422
kube_state_metrics_cpu: "100m"
423423
kube_state_metrics_mem_max: "4Gi"
@@ -729,6 +729,7 @@ allowed_unsafe_sysctls: "net.ipv4.tcp_keepalive_time,net.ipv4.tcp_keepalive_intv
729729

730730
# the maximum amount of memory for EBS CSI controller's sidecars
731731
ebs_csi_controller_sidecar_memory: "80Mi"
732+
ebs_csi_controller_sidecar_cpu: "10m"
732733

733734
# pull images in parallel
734735
serialize_image_pulls: "false"

cluster/manifests/02-kube-aws-iam-controller/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ spec:
3434
resources:
3535
limits:
3636
cpu: "{{.Cluster.ConfigItems.kube_aws_iam_controller_cpu}}"
37-
memory: "{{.Cluster.ConfigItems.kube_aws_iam_controller_mem_max}}"
37+
memory: "{{.Cluster.ConfigItems.kube_aws_iam_controller_mem}}"
3838
requests:
3939
cpu: "{{.Cluster.ConfigItems.kube_aws_iam_controller_cpu}}"
40-
memory: "{{.Cluster.ConfigItems.kube_aws_iam_controller_mem_max}}"
40+
memory: "{{.Cluster.ConfigItems.kube_aws_iam_controller_mem}}"
4141
tolerations:
4242
- key: node.kubernetes.io/role
4343
value: master

cluster/manifests/02-kube-aws-iam-controller/vpa.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@ spec:
1717
containerPolicies:
1818
- containerName: kube-aws-iam-controller
1919
maxAllowed:
20-
memory: {{.Cluster.ConfigItems.kube_aws_iam_controller_mem_max}}
20+
{{ range $NodePool := .Cluster.NodePools }}
21+
{{ if eq $NodePool.Name "default-master" }}
22+
# Scaling is relative to r6g.large (smallest master node)
23+
# 0.014 -> 25m CPU, 0.003 -> 50Mi memory
24+
cpu: {{ scaleQuantity ( instanceTypeCPUQuantity ( index .InstanceTypes 0 )) 0.014 }}
25+
memory: {{ scaleQuantity ( instanceTypeMemoryQuantity ( index .InstanceTypes 0 )) 0.003 }}
26+
{{ end }}
27+
{{ end }}

cluster/manifests/03-ebs-csi/controller.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ spec:
9595
value: /var/lib/csi/sockets/pluginproxy/csi.sock
9696
resources:
9797
requests:
98-
cpu: 10m
98+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
9999
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
100100
limits:
101-
cpu: 10m
101+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
102102
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
103103
volumeMounts:
104104
- name: socket-dir
@@ -117,10 +117,10 @@ spec:
117117
value: /var/lib/csi/sockets/pluginproxy/csi.sock
118118
resources:
119119
requests:
120-
cpu: 10m
120+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
121121
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
122122
limits:
123-
cpu: 10m
123+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
124124
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
125125
volumeMounts:
126126
- name: socket-dir
@@ -139,10 +139,10 @@ spec:
139139
value: /var/lib/csi/sockets/pluginproxy/csi.sock
140140
resources:
141141
requests:
142-
cpu: 10m
142+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
143143
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
144144
limits:
145-
cpu: 10m
145+
cpu: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_cpu }}
146146
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
147147
volumeMounts:
148148
- name: socket-dir

cluster/manifests/03-ebs-csi/vpa.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,22 @@ spec:
1616
resourcePolicy:
1717
containerPolicies:
1818
- containerName: csi-provisioner
19+
{{ range $NodePool := .Cluster.NodePools }}
20+
{{ if eq $NodePool.Name "default-master" }}
21+
# Scaling is relative to r6g.large (smallest master node)
22+
# 0.006 -> ~90Mi memory, 0.031 -> ~55m CPU
23+
{{ $scaledCPU := scaleQuantity ( instanceTypeCPUQuantity ( index .InstanceTypes 0 )) 0.031 }}
24+
{{ $scaledMemory := scaleQuantity ( instanceTypeMemoryQuantity ( index .InstanceTypes 0 )) 0.006 }}
1925
maxAllowed:
20-
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
26+
cpu: {{ $scaledCPU }}
27+
memory: {{ $scaledMemory }}
2128
- containerName: csi-attacher
2229
maxAllowed:
23-
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
30+
cpu: {{ $scaledCPU }}
31+
memory: {{ $scaledMemory }}
2432
- containerName: csi-resizer
2533
maxAllowed:
26-
memory: {{ .Cluster.ConfigItems.ebs_csi_controller_sidecar_memory }}
34+
cpu: {{ $scaledCPU }}
35+
memory: {{ $scaledMemory }}
36+
{{ end }}
37+
{{ end }}

cluster/manifests/z-karpenter/vpa.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ spec:
1919
containerPolicies:
2020
- containerName: controller
2121
minAllowed:
22-
memory: {{.Cluster.ConfigItems.karpenter_controller_memory}}
23-
cpu: {{.Cluster.ConfigItems.karpenter_controller_cpu}}
22+
memory: {{ .Cluster.ConfigItems.karpenter_controller_memory }}
23+
cpu: {{ .Cluster.ConfigItems.karpenter_controller_cpu }}
24+
maxAllowed:
25+
{{ range $NodePool := .Cluster.NodePools}}
26+
{{ if eq $NodePool.Name "default-master" }}
27+
# Scaling is relative to r6g.large (smallest master node)
28+
# 0.016 -> ~250Mi memory, 0.027 -> ~50m CPU
29+
memory: {{ scaleQuantity (instanceTypeMemoryQuantity (index .InstanceTypes 0)) 0.016 }}
30+
cpu: {{ scaleQuantity (instanceTypeCPUQuantity (index .InstanceTypes 0)) 0.027 }}
31+
{{ end }}
32+
{{ end }}
2433
{{end}}

0 commit comments

Comments
 (0)