Skip to content

Commit cf40118

Browse files
committed
fix: reviews
1 parent f81fc82 commit cf40118

File tree

35 files changed

+279
-167
lines changed

35 files changed

+279
-167
lines changed

chart/templates/skyhook-crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ spec:
477477
description: Priority determines the order in which skyhooks are applied. Lower values are applied first.
478478
type: integer
479479
minimum: 0
480-
default: 0
480+
default: 200
481481
serial:
482482
default: false
483483
description: Serial tells skyhook if it allowed to run in parallel or

docs/ordering_of_skyhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## What
33
With v0.8.0 Skyhooks now always get applied in a repeatable and specific order. This also means that all Skyhooks will now be sequential, though packages within a Skyhook can be parallel. Each custom resource now supports a `priority` field which is a non-zero positive integer. Skyhooks will be processed in order starting from 0, any Skyhooks with the same `priority` will be processed by sorting them by their `metadata.name` field.
44

5-
**NOTE**: Any Skyhook which does NOT provide a `priority` field will be assigned a priority value of 0.
5+
**NOTE**: Any Skyhook which does NOT provide a `priority` field will be assigned a priority value of 200.
66

77
Two additional flow control features have been added with this and can be set in the annotations of each skyhook:
88
* `skyhook.nvidia.com/disable`: bool. When `true` it will skip this Skyhook from processing and continue with any other ones further down the priority order.

examples/simple/scr.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ metadata:
2929
skyhook.nvidia.com/pause: "false"
3030
skyhook.nvidia.com/disable: "false"
3131
spec:
32+
nodeSelectors:
33+
matchLabels:
34+
skyhook.nvidia.com/test-node: skyhooke2e
3235
packages:
3336
baz:
3437
version: 1.1.0
3538
image: ghcr.io/nvidia/skyhook-packages/shellscript
3639
configMap:
3740
config.yaml: |-
3841
#!/bin/bash
39-
sleep 30
42+
sleep 1
4043
echo "Hello, config!"
4144
config_check.yaml: |-
4245
#!/bin/bash
43-
sleep 30
46+
sleep 1
4447
echo "Hello, config check!"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ kind: Test
2424
metadata:
2525
name: cleanup-pods
2626
spec:
27-
concurrent: false
2827
description: |
2928
This test runs a simple skyhook with dependsOn. We wait tell completed, then trigger update to force config cycle on package B. Once config
3029
is complete, we update again to make the package error, and at the same clear out the node annotation to trigger cleanup.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ spec:
3131
accordingly but the package with the config changes may be skipeed and hang, and this asserts that it doesn't hang in that condition. Then once that completes the same two
3232
packages have the key with a config interrupt changed and it's asserted that the config, interrupt, and post-interrupt runs for both those packages. Then once that completes
3333
again it does one more update on a key for the same two packages which doesn't have a config interrupt defined and makes sure that the config steps are ran for that.
34-
concurrent: false
3534
timeouts:
3635
assert: 360s
3736
catch: ## if errors, print the most important info

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41+
env:
42+
- name: SLEEP_LEN
43+
value: "1"
4144
dexter:
4245
version: "1.2.3"
4346
image: ghcr.io/nvidia/skyhook/agentless
@@ -47,6 +50,9 @@ spec:
4750
game.properties:
4851
type: service
4952
services: [rsyslog]
53+
env:
54+
- name: SLEEP_LEN
55+
value: "1"
5056
configMap:
5157
game.properties: |
5258
enemies=aliens
@@ -65,6 +71,9 @@ spec:
6571
game.properties:
6672
type: service
6773
services: [rsyslog, cron]
74+
env:
75+
- name: SLEEP_LEN
76+
value: "1"
6877
configMap:
6978
game.properties: |
7079
enemies=aliens

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41+
env:
42+
- name: SLEEP_LEN
43+
value: "1"
4144
dexter:
4245
version: "1.2.3"
4346
image: ghcr.io/nvidia/skyhook/agentless
@@ -47,6 +50,9 @@ spec:
4750
game.properties:
4851
type: service
4952
services: [rsyslog]
53+
env:
54+
- name: SLEEP_LEN
55+
value: "1"
5056
configMap:
5157
game.properties: |
5258
changed
@@ -59,6 +65,9 @@ spec:
5965
game.properties:
6066
type: service
6167
services: [rsyslog, cron]
68+
env:
69+
- name: SLEEP_LEN
70+
value: "1"
6271
configMap:
6372
game.properties: |
6473
changed again

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41+
env:
42+
- name: SLEEP_LEN
43+
value: "1"
4144
dexter:
4245
version: "1.2.3"
4346
image: ghcr.io/nvidia/skyhook/agentless
@@ -47,6 +50,9 @@ spec:
4750
game.properties:
4851
type: service
4952
services: [rsyslog]
53+
env:
54+
- name: SLEEP_LEN
55+
value: "1"
5056
configMap:
5157
game.properties: |
5258
enemies=aliens
@@ -61,6 +67,9 @@ spec:
6167
baxter:
6268
version: "3.2.1"
6369
image: ghcr.io/nvidia/skyhook/agentless
70+
env:
71+
- name: SLEEP_LEN
72+
value: "1"
6473
configInterrupts:
6574
game.properties:
6675
type: service

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ spec:
3838
interrupt:
3939
type: service
4040
services: [cron]
41+
env:
42+
- name: SLEEP_LEN
43+
value: "1"
4144
dexter:
4245
version: "1.2.3"
4346
image: ghcr.io/nvidia/skyhook/agentless
@@ -47,6 +50,9 @@ spec:
4750
game.properties:
4851
type: service
4952
services: [rsyslog]
53+
env:
54+
- name: SLEEP_LEN
55+
value: "1"
5056
configMap:
5157
game.properties: |
5258
changed
@@ -62,6 +68,9 @@ spec:
6268
game.properties:
6369
type: service
6470
services: [rsyslog, cron]
71+
env:
72+
- name: SLEEP_LEN
73+
value: "1"
6574
configMap:
6675
game.properties: |
6776
changed again

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ kind: Test
2424
metadata:
2525
name: depends-on
2626
spec:
27-
concurrent: false
2827
description: |
2928
Test makes sure depends-on works as expected. c depends on a, and b. Make sure a and b complete before c starts.
3029
timeouts:

0 commit comments

Comments
 (0)