Skip to content

Commit e460a65

Browse files
committed
fix: race bug running more then one pod at a time
1 parent 00f97bd commit e460a65

File tree

15 files changed

+190
-109
lines changed

15 files changed

+190
-109
lines changed

chart/templates/skyhook-crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ spec:
431431
concert without needing to delete to ad in discovery of the issue.
432432
type: boolean
433433
podNonInterruptLabels:
434-
description: PodNonInteruptLabels are a set of labels we want to monitor
435-
pods for whether they Interruptible
434+
description: PodNonInterruptLabels are a set of labels we want to
435+
monitor pods for whether they Interruptible
436436
properties:
437437
matchExpressions:
438438
description: matchExpressions is a list of label selector requirements.

k8s-tests/chainsaw/skyhook/interrupt-grouping/assert.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,9 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
kind: Pod
2822
apiVersion: v1
2923
metadata:
30-
generateName: interrupt-grouping-dax-1.2.3-apply-
3124
namespace: skyhook
3225
labels:
3326
skyhook.nvidia.com/name: interrupt-grouping
@@ -61,7 +54,6 @@ spec:
6154
kind: Pod
6255
apiVersion: v1
6356
metadata:
64-
generateName: interrupt-grouping-dax-1.2.3-config-
6557
namespace: skyhook
6658
labels:
6759
skyhook.nvidia.com/name: interrupt-grouping
@@ -92,7 +84,6 @@ spec:
9284
kind: Pod
9385
apiVersion: v1
9486
metadata:
95-
generateName: interrupt-grouping-interrupt-service-
9687
namespace: skyhook
9788
labels:
9889
skyhook.nvidia.com/name: interrupt-grouping
@@ -132,7 +123,6 @@ spec:
132123
kind: Pod
133124
apiVersion: v1
134125
metadata:
135-
generateName: interrupt-grouping-dax-1.2.3-post-interrupt-
136126
namespace: skyhook
137127
labels:
138128
skyhook.nvidia.com/name: interrupt-grouping

k8s-tests/chainsaw/skyhook/interrupt/assert.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
kind: Pod
2923
apiVersion: v1
3024
metadata:
31-
generateName: interrupt-invalid-1.2.3-uninstall-
3225
namespace: skyhook
3326
labels:
3427
skyhook.nvidia.com/name: interrupt
@@ -63,7 +56,6 @@ spec:
6356
kind: Pod
6457
apiVersion: v1
6558
metadata:
66-
generateName: interrupt-jason-1.3.2-apply-
6759
namespace: skyhook
6860
labels:
6961
skyhook.nvidia.com/name: interrupt
@@ -126,7 +118,6 @@ data:
126118
kind: Pod
127119
apiVersion: v1
128120
metadata:
129-
generateName: interrupt-interrupt-service-
130121
namespace: skyhook
131122
labels:
132123
skyhook.nvidia.com/name: interrupt

k8s-tests/chainsaw/skyhook/interrupt/pod.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
apiVersion: v1
2923
kind: Pod
@@ -64,8 +58,8 @@ metadata:
6458
name: invalid-package
6559
namespace: skyhook
6660
labels:
67-
skyhook.nvidia.com/package: invalid-1.2.3
68-
skyhook.nvidia.com/name: interrupt
61+
skyhook.nvidia.com/package: invalid-1.2.3
62+
skyhook.nvidia.com/name: interrupt
6963
annotations:
7064
skyhook.nvidia.com/package: '{"name":"invalid","version":"1.2.3","stage":"apply","skyhook":"interrupt","image":"ghcr.io/nvidia/skyhook/agentless"}'
7165
spec:

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
apiVersion: skyhook.nvidia.com/v1alpha1
2923
kind: Skyhook

k8s-tests/chainsaw/skyhook/simple-skyhook/assert.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
kind: Pod
2923
apiVersion: v1
3024
metadata:
31-
generateName: simple-skyhook-spencer-3.2.3-apply-
3225
namespace: skyhook
3326
labels:
3427
skyhook.nvidia.com/name: simple-skyhook

k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update-no-packages.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
kind: Pod
2923
apiVersion: v1
3024
metadata:
31-
generateName: uninstall-upgrade-skyhook-dogs-1.2.5-uninstall-
3225
namespace: skyhook
3326
labels:
3427
skyhook.nvidia.com/name: uninstall-upgrade-skyhook
@@ -63,7 +56,6 @@ spec:
6356
kind: Pod
6457
apiVersion: v1
6558
metadata:
66-
generateName: uninstall-upgrade-skyhook-nullptr-2.0.1-uninstall-
6759
namespace: skyhook
6860
labels:
6961
skyhook.nvidia.com/name: uninstall-upgrade-skyhook

k8s-tests/chainsaw/skyhook/uninstall-upgrade-skyhook/assert-update.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
---
2822
kind: Pod
2923
apiVersion: v1
3024
metadata:
31-
generateName: uninstall-upgrade-skyhook-cats-6.2.0-uninstall-
3225
namespace: skyhook
3326
labels:
3427
skyhook.nvidia.com/name: uninstall-upgrade-skyhook
@@ -77,7 +70,6 @@ spec:
7770
kind: Pod
7871
apiVersion: v1
7972
metadata:
80-
generateName: uninstall-upgrade-skyhook-dogs-1.2.6-uninstall-
8173
namespace: skyhook
8274
labels:
8375
skyhook.nvidia.com/name: uninstall-upgrade-skyhook
@@ -112,7 +104,6 @@ spec:
112104
kind: Pod
113105
apiVersion: v1
114106
metadata:
115-
generateName: uninstall-upgrade-skyhook-nullptr-2.0.1-upgrade-
116107
namespace: skyhook
117108
labels:
118109
skyhook.nvidia.com/name: uninstall-upgrade-skyhook

k8s-tests/chainsaw/skyhook/validate-packages/assert-update.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
# LICENSE END
1919
#
2020

21-
22-
23-
24-
25-
26-
2721
apiVersion: v1
2822
kind: Node
2923
metadata:
@@ -73,24 +67,24 @@ status:
7367
observedGeneration: 3
7468
nodeState:
7569
(values(@)):
76-
- invalid-image|3.2.3:
77-
name: invalid-image
78-
state: complete
79-
version: '3.2.3'
70+
- invalid-env|5.4.3:
8071
image: ghcr.io/nvidia/skyhook/agentless
72+
name: invalid-env
8173
stage: config
82-
invalid-resources|1.2.3:
83-
name: invalid-resources
8474
state: complete
85-
version: '1.2.3'
75+
version: 5.4.3
76+
invalid-image|3.2.3:
8677
image: ghcr.io/nvidia/skyhook/agentless
78+
name: invalid-image
8779
stage: config
88-
invalid-env|5.4.3:
89-
name: invalid-env
9080
state: complete
91-
version: '5.4.3'
81+
version: 3.2.3
82+
invalid-resources|1.2.3:
9283
image: ghcr.io/nvidia/skyhook/agentless
84+
name: invalid-resources
9385
stage: config
86+
state: complete
87+
version: 1.2.3
9488
nodeStatus:
9589
# grab values should be one and is complete
9690
(values(@)):

operator/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $(REPORTING):
140140
mkdir -p $@
141141

142142
.PHONY: test
143-
test:: reporting manifests generate fmt vet lint helm-tests e2e-tests unit-tests ## Run all tests.
143+
test:: reporting manifests generate fmt vet lint unit-tests e2e-tests helm-tests ## Run all tests.
144144

145145
ifndef CI
146146
## we double define test so we can do thing different if in ci vs local
@@ -166,7 +166,7 @@ unit-tests: reporting manifests generate envtest ginkgo kill ## Run unit tests.
166166
## https://kyverno.github.io/chainsaw/latest/configuration/file/
167167
CHAINSAW_ARGS:=--exec-timeout 30s --parallel 2
168168

169-
e2e-tests: chainsaw run ## Run end to end tests.
169+
e2e-tests: chainsaw install run ## Run end to end tests.
170170
## requires a cluster to be running with access
171171
## locally use kind to create clusters
172172
## in ci, the plan current is to have a real cluster, and create a node pool for testing

0 commit comments

Comments
 (0)