Skip to content

Commit 3e67e3d

Browse files
committed
fix: update tests to not set limits everywhere anymore
1 parent a6e7903 commit 3e67e3d

File tree

35 files changed

+416
-311
lines changed

35 files changed

+416
-311
lines changed

chart/templates/skyhook-crd.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ spec:
383383
pattern: ^[a-z][-a-z0-9]{0,41}[a-z]$
384384
type: string
385385
resources:
386-
default: {}
387386
description: |-
388387
Resources lets you set the cpu and memory limits and requests for this package.
389388
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
@@ -392,28 +391,24 @@ spec:
392391
anyOf:
393392
- type: integer
394393
- type: string
395-
default: 500m
396394
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
397395
x-kubernetes-int-or-string: true
398396
cpuRequest:
399397
anyOf:
400398
- type: integer
401399
- type: string
402-
default: 500m
403400
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
404401
x-kubernetes-int-or-string: true
405402
memoryLimit:
406403
anyOf:
407404
- type: integer
408405
- type: string
409-
default: 256Mi
410406
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
411407
x-kubernetes-int-or-string: true
412408
memoryRequest:
413409
anyOf:
414410
- type: integer
415411
- type: string
416-
default: 256Mi
417412
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
418413
x-kubernetes-int-or-string: true
419414
type: object

docs/resource_management.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,18 @@ If there is **no LimitRange** and you do **not** set resource requests/limits in
108108

109109
---
110110

111+
## 7. Special Case: Uninstall Pod Resources
112+
113+
Uninstall pods in Skyhook **do not use per-package resource overrides**.
114+
Instead, their resource requests/limits are determined only by the namespace defaults:
115+
116+
- If a LimitRange is present in the namespace, uninstall pods will use those default CPU and memory requests/limits.
117+
- If there is no LimitRange, uninstall pods will run as "BestEffort" (no resource requests/limits).
118+
- Any `resources:` overrides set for the original package are **not applied** to the uninstall pod.
119+
120+
**Note:**
121+
- Ensure defaults are big enough for uninstall processes if using the uninstall package life cycle.
122+
123+
---
124+
111125
For more information, see the [Kubernetes documentation on resource management](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) and [LimitRange](https://kubernetes.io/docs/concepts/policy/limit-range/).

k8s-tests/chainsaw/skyhook/cleanup-pods/force-config.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ spec:
3737
env:
3838
- name: SLEEP_LEN
3939
value: "3"
40-
resources:
41-
cpuLimit: 50m
42-
cpuRequest: 50m
43-
memoryLimit: 32Mi
44-
memoryRequest: 32Mi
4540
bb:
4641
version: "1.2"
4742
gracefulShutdown: 46s
@@ -51,10 +46,5 @@ spec:
5146
env:
5247
- name: SLEEP_LEN
5348
value: "2"
54-
resources:
55-
cpuLimit: 50m
56-
cpuRequest: 50m
57-
memoryLimit: 32Mi
58-
memoryRequest: 32Mi
5949
configMap:
6050
foo: buz

k8s-tests/chainsaw/skyhook/cleanup-pods/muck_up.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ spec:
3737
env:
3838
- name: SLEEP_LEN
3939
value: "3"
40-
resources:
41-
cpuLimit: 50m
42-
cpuRequest: 50m
43-
memoryLimit: 32Mi
44-
memoryRequest: 32Mi
4540
bb:
4641
version: "1.2"
4742
gracefulShutdown: 46s
@@ -53,10 +48,5 @@ spec:
5348
value: "2"
5449
- name: SLEEP_LEN
5550
value: "2"
56-
resources:
57-
cpuLimit: 50m
58-
cpuRequest: 50m
59-
memoryLimit: 32Mi
60-
memoryRequest: 32Mi
6151
configMap:
6252
foo: bur

k8s-tests/chainsaw/skyhook/cleanup-pods/setup.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ spec:
3737
env:
3838
- name: SLEEP_LEN
3939
value: "2"
40-
resources:
41-
cpuLimit: 50m
42-
cpuRequest: 50m
43-
memoryLimit: 32Mi
44-
memoryRequest: 32Mi
4540
bb:
4641
version: "1.2"
4742
image: ghcr.io/nvidia/skyhook/agentless
@@ -50,10 +45,5 @@ spec:
5045
env:
5146
- name: SLEEP_LEN
5247
value: "2"
53-
resources:
54-
cpuLimit: 50m
55-
cpuRequest: 50m
56-
memoryLimit: 32Mi
57-
memoryRequest: 32Mi
5848
configMap:
5949
foo: bar

k8s-tests/chainsaw/skyhook/config-skyhook/skyhook.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41-
resources:
42-
cpuLimit: 50m
43-
cpuRequest: 50m
44-
memoryLimit: 32Mi
45-
memoryRequest: 32Mi
4641
dexter:
4742
version: "1.2.3"
4843
image: ghcr.io/nvidia/skyhook/agentless
@@ -52,11 +47,6 @@ spec:
5247
game.properties:
5348
type: service
5449
services: [rsyslog]
55-
resources:
56-
cpuLimit: 50m
57-
cpuRequest: 50m
58-
memoryLimit: 32Mi
59-
memoryRequest: 32Mi
6050
configMap:
6151
game.properties: |
6252
enemies=aliens
@@ -86,8 +76,3 @@ spec:
8676
color.bad=yellow
8777
allow.textmode=true
8878
how.nice.to.look=fairlyNice
89-
resources:
90-
cpuLimit: 50m
91-
cpuRequest: 50m
92-
memoryLimit: 32Mi
93-
memoryRequest: 32Mi

k8s-tests/chainsaw/skyhook/config-skyhook/update-no-interrupt.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41-
resources:
42-
cpuLimit: 50m
43-
cpuRequest: 50m
44-
memoryLimit: 32Mi
45-
memoryRequest: 32Mi
4641
dexter:
4742
version: "1.2.3"
4843
image: ghcr.io/nvidia/skyhook/agentless
@@ -57,11 +52,6 @@ spec:
5752
changed
5853
ui.properties: |
5954
changed
60-
resources:
61-
cpuLimit: 50m
62-
cpuRequest: 50m
63-
memoryLimit: 32Mi
64-
memoryRequest: 32Mi
6555
baxter:
6656
version: "3.2.1"
6757
image: ghcr.io/nvidia/skyhook/agentless
@@ -73,9 +63,4 @@ spec:
7363
game.properties: |
7464
changed again
7565
ui.properties: |
76-
changed
77-
resources:
78-
cpuLimit: 50m
79-
cpuRequest: 50m
80-
memoryLimit: 32Mi
81-
memoryRequest: 32Mi
66+
changed

k8s-tests/chainsaw/skyhook/config-skyhook/update-while-running.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41-
resources:
42-
cpuLimit: 50m
43-
cpuRequest: 50m
44-
memoryLimit: 32Mi
45-
memoryRequest: 32Mi
4641
dexter:
4742
version: "1.2.3"
4843
image: ghcr.io/nvidia/skyhook/agentless
@@ -63,11 +58,6 @@ spec:
6358
color.bad=yellow
6459
allow.textmode=true
6560
how.nice.to.look=fairlyNice
66-
resources:
67-
cpuLimit: 50m
68-
cpuRequest: 50m
69-
memoryLimit: 32Mi
70-
memoryRequest: 32Mi
7161
baxter:
7262
version: "3.2.1"
7363
image: ghcr.io/nvidia/skyhook/agentless
@@ -82,9 +72,4 @@ spec:
8272
color.good=purple
8373
color.bad=yellow
8474
allow.textmode=true
85-
how.nice.to.look=fairlyNice
86-
resources:
87-
cpuLimit: 50m
88-
cpuRequest: 50m
89-
memoryLimit: 32Mi
90-
memoryRequest: 32Mi
75+
how.nice.to.look=fairlyNice

k8s-tests/chainsaw/skyhook/config-skyhook/update.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41-
resources:
42-
cpuLimit: 50m
43-
cpuRequest: 50m
44-
memoryLimit: 32Mi
45-
memoryRequest: 32Mi
4641
dexter:
4742
version: "1.2.3"
4843
image: ghcr.io/nvidia/skyhook/agentless
@@ -60,11 +55,6 @@ spec:
6055
color.bad=yellow
6156
allow.textmode=true
6257
how.nice.to.look=fairlyNice
63-
resources:
64-
cpuLimit: 50m
65-
cpuRequest: 50m
66-
memoryLimit: 32Mi
67-
memoryRequest: 32Mi
6858
baxter:
6959
version: "3.2.1"
7060
image: ghcr.io/nvidia/skyhook/agentless
@@ -79,9 +69,4 @@ spec:
7969
color.good=purple
8070
color.bad=yellow
8171
allow.textmode=true
82-
how.nice.to.look=fairlyNice
83-
resources:
84-
cpuLimit: 50m
85-
cpuRequest: 50m
86-
memoryLimit: 32Mi
87-
memoryRequest: 32Mi
72+
how.nice.to.look=fairlyNice

k8s-tests/chainsaw/skyhook/depends-on/skyhook.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,12 @@ spec:
3939
env:
4040
- name: SLEEP_LEN
4141
value: "1"
42-
resources:
43-
cpuLimit: 50m
44-
cpuRequest: 50m
45-
memoryLimit: 32Mi
46-
memoryRequest: 32Mi
4742
bb-slow:
4843
version: "1.2"
4944
image: ghcr.io/nvidia/skyhook/agentless
5045
env:
5146
- name: SLEEP_LEN
5247
value: "10"
53-
resources:
54-
cpuLimit: 50m
55-
cpuRequest: 50m
56-
memoryLimit: 32Mi
57-
memoryRequest: 32Mi
5848
cc-last:
5949
version: "5.4.3"
6050
image: ghcr.io/nvidia/skyhook/agentless
@@ -63,9 +53,4 @@ spec:
6353
bb-slow: "1.2"
6454
env:
6555
- name: SLEEP_LEN
66-
value: "1"
67-
resources:
68-
cpuLimit: 50m
69-
cpuRequest: 50m
70-
memoryLimit: 32Mi
71-
memoryRequest: 32Mi
56+
value: "1"

0 commit comments

Comments
 (0)