Skip to content

Commit 2d52403

Browse files
authored
Merge pull request #17237 from HealthengineAU/rm-cpu-limits
Remove default CPU limits for aws-iam-authentication and node-problem-detector
2 parents 806e038 + bdc25ad commit 2d52403

19 files changed

+13
-25
lines changed

k8s/crds/kops.k8s.io_clusters.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ spec:
197197
- type: integer
198198
- type: string
199199
description: CPULimit CPU limit of AWS IAM Authenticator container.
200-
Default 10m
201200
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
202201
x-kubernetes-int-or-string: true
203202
cpuRequest:
@@ -5983,9 +5982,7 @@ spec:
59835982
anyOf:
59845983
- type: integer
59855984
- type: string
5986-
description: |-
5987-
CPULimit of NodeProblemDetector container.
5988-
Default: 10m
5985+
description: CPULimit of NodeProblemDetector container.
59895986
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
59905987
x-kubernetes-int-or-string: true
59915988
cpuRequest:

pkg/apis/kops/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ type AWSAuthenticationSpec struct {
429429
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
430430
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
431431
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
432-
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
432+
// CPULimit CPU limit of AWS IAM Authenticator container.
433433
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
434434
// IdentityMappings maps IAM Identities to Kubernetes users/groups
435435
IdentityMappings []AWSAuthenticationIdentityMappingSpec `json:"identityMappings,omitempty"`

pkg/apis/kops/componentconfig.go

-1
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,6 @@ type NodeProblemDetectorConfig struct {
10811081
// Default: 80Mi
10821082
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
10831083
// CPULimit of NodeProblemDetector container.
1084-
// Default: 10m
10851084
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
10861085
}
10871086

pkg/apis/kops/v1alpha2/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ type AWSAuthenticationSpec struct {
427427
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
428428
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
429429
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
430-
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
430+
// CPULimit CPU limit of AWS IAM Authenticator container.
431431
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
432432
// IdentityMappings maps IAM Identities to Kubernetes users/groups
433433
IdentityMappings []AWSAuthenticationIdentityMappingSpec `json:"identityMappings,omitempty"`

pkg/apis/kops/v1alpha2/componentconfig.go

-1
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,6 @@ type NodeProblemDetectorConfig struct {
11471147
// Default: 80Mi
11481148
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
11491149
// CPULimit of NodeProblemDetector container.
1150-
// Default: 10m
11511150
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
11521151
}
11531152

pkg/apis/kops/v1alpha3/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ type AWSAuthenticationSpec struct {
395395
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
396396
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
397397
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
398-
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
398+
// CPULimit CPU limit of AWS IAM Authenticator container.
399399
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
400400
// IdentityMappings maps IAM Identities to Kubernetes users/groups
401401
IdentityMappings []AWSAuthenticationIdentityMappingSpec `json:"identityMappings,omitempty"`

pkg/apis/kops/v1alpha3/componentconfig.go

-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,6 @@ type NodeProblemDetectorConfig struct {
10731073
// Default: 80Mi
10741074
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
10751075
// CPULimit of NodeProblemDetector container.
1076-
// Default: 10m
10771076
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
10781077
}
10791078

pkg/model/components/nodeproblemdetector.go

-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ func (b *NodeProblemDetectorOptionsBuilder) BuildOptions(o *kops.Cluster) error
5151
npd.MemoryRequest = &defaultMemoryRequest
5252
}
5353

54-
if npd.CPULimit == nil {
55-
defaultCPULimit := resource.MustParse("200m")
56-
npd.CPULimit = &defaultCPULimit
57-
}
58-
5954
if npd.MemoryLimit == nil {
6055
defaultMemoryLimit := resource.MustParse("100Mi")
6156
npd.MemoryLimit = &defaultMemoryLimit

tests/integration/update_cluster/complex/data/aws_s3_object_complex.example.com-addons-authentication.aws-k8s-1.12_content

-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ spec:
174174
name: aws-iam-authenticator
175175
resources:
176176
limits:
177-
cpu: 100m
178177
memory: 20Mi
179178
requests:
180179
cpu: 10m

tests/integration/update_cluster/complex/data/aws_s3_object_complex.example.com-addons-bootstrap_content

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
version: 9.99.0
100100
- id: k8s-1.12
101101
manifest: authentication.aws/k8s-1.12.yaml
102-
manifestHash: 4a72854108b5bf11c547c832153a13abc6b26952723ae7a9a9f8dd7126b8116c
102+
manifestHash: 9d0ba9f3934d111d6bb78773dd7176afd7287e0d257d1b096a7f92f4f0f635bb
103103
name: authentication.aws
104104
selector:
105105
role.kubernetes.io/authentication: "1"

tests/integration/update_cluster/many-addons/data/aws_s3_object_cluster-completed.spec_content

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ spec:
201201
networking:
202202
amazonvpc: {}
203203
nodeProblemDetector:
204-
cpuLimit: 200m
205204
cpuRequest: 20m
206205
enabled: true
207206
image: registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.18

tests/integration/update_cluster/many-addons/data/aws_s3_object_many-addons.example.com-addons-bootstrap_content

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ spec:
163163
version: 9.99.0
164164
- id: k8s-1.17
165165
manifest: node-problem-detector.addons.k8s.io/k8s-1.17.yaml
166-
manifestHash: 94b31d90ea983e0cb64dc233c11174684a0b0fb18ea9cd7cbc93013881e1a230
166+
manifestHash: 2184f20ded053de803f02517754d43cbcf905d42f5f24c14db1d438552cddd60
167167
name: node-problem-detector.addons.k8s.io
168168
prune:
169169
kinds:

tests/integration/update_cluster/many-addons/data/aws_s3_object_many-addons.example.com-addons-node-problem-detector.addons.k8s.io-k8s-1.17_content

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ spec:
8080
name: node-problem-detector
8181
resources:
8282
limits:
83-
cpu: 200m
8483
memory: 100Mi
8584
requests:
8685
cpu: 20m

upup/models/cloudup/resources/addons/authentication.aws/k8s-1.12.yaml.template

+3-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ spec:
191191
cpu: {{ or .Authentication.AWS.CPURequest "10m" }}
192192
limits:
193193
memory: {{ or .Authentication.AWS.MemoryLimit "20Mi" }}
194-
cpu: {{ or .Authentication.AWS.CPULimit "100m" }}
194+
{{- if .Authentication.AWS.CPULimit }}
195+
cpu: {{ .Authentication.AWS.CPULimit }}
196+
{{- end }}
195197
livenessProbe:
196198
httpGet:
197199
host: 127.0.0.1

upup/models/cloudup/resources/addons/node-problem-detector.addons.k8s.io/k8s-1.17.yaml.template

+2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ spec:
6262
privileged: true
6363
resources:
6464
limits:
65+
{{- if .CPULimit }}
6566
cpu: {{ .CPULimit }}
67+
{{- end }}
6668
memory: {{ .MemoryLimit }}
6769
requests:
6870
cpu: {{ .CPURequest }}

upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awsiamauthenticator/crd/authentication.aws-k8s-1.12.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ spec:
176176
name: aws-iam-authenticator
177177
resources:
178178
limits:
179-
cpu: 100m
180179
memory: 20Mi
181180
requests:
182181
cpu: 10m

upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awsiamauthenticator/crd/manifest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
version: 9.99.0
100100
- id: k8s-1.12
101101
manifest: authentication.aws/k8s-1.12.yaml
102-
manifestHash: 4debe9956ffc92cd7c8da44e6fcc4c9705d51faa6640be9a59e8d86e0854c7ad
102+
manifestHash: ac5ba2e6329d812c6868648642c335f51ecacbff8836b1011868b7604d45d2ca
103103
name: authentication.aws
104104
selector:
105105
role.kubernetes.io/authentication: "1"

upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awsiamauthenticator/mappings/authentication.aws-k8s-1.12.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ spec:
175175
name: aws-iam-authenticator
176176
resources:
177177
limits:
178-
cpu: 100m
179178
memory: 20Mi
180179
requests:
181180
cpu: 10m

upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awsiamauthenticator/mappings/manifest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
version: 9.99.0
100100
- id: k8s-1.12
101101
manifest: authentication.aws/k8s-1.12.yaml
102-
manifestHash: c8a71f31e741c1938991952cf16728801dc2e2f1b81f92aef39b0d9c250a3f94
102+
manifestHash: 285bcdd9f7937fc1e50c19c27b6c0f4e3ef4ccb1e8ea4d1db8feee887481d457
103103
name: authentication.aws
104104
selector:
105105
role.kubernetes.io/authentication: "1"

0 commit comments

Comments
 (0)