Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helm/soperator-activechecks/templates/active-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
{{- end }}
hostUsers: {{ include "soperator-activechecks.hostUsers" $root }}
suspend: {{ default false $check.suspend }}
activeDeadlineSeconds: {{ default 1800 $check.activeDeadlineSeconds }}
runAfterCreation: {{ default false $check.runAfterCreation }}
{{- if eq $check.checkType "slurmJob" }}
slurmJobSpec:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
suite: test activeDeadlineSeconds rendering
templates:
- templates/active-checks.yaml
tests:
- it: should default activeDeadlineSeconds to 1800
documentSelector:
path: metadata.name
value: test-default-deadline
set:
slurmClusterRefName: test-cluster
images:
k8sJob: "test-image:latest"
jobContainer:
volumeMounts: []
volumes: []
checks:
test-default-deadline:
enabled: true
checkType: k8sJob
k8sJobSpec:
jobContainer:
command: ["echo", "test"]
asserts:
- equal:
path: spec.activeDeadlineSeconds
value: 1800

- it: should override activeDeadlineSeconds for manage-jail-state
documentSelector:
path: metadata.name
value: manage-jail-state
set:
slurmClusterRefName: test-cluster
images:
k8sJob: "test-image:latest"
sansible: "sansible-image:latest"
jobContainer:
volumeMounts: []
volumes: []
asserts:
- equal:
path: spec.activeDeadlineSeconds
value: 3600

- it: should override activeDeadlineSeconds for manage-jail-state-force
documentSelector:
path: metadata.name
value: manage-jail-state-force
set:
slurmClusterRefName: test-cluster
images:
k8sJob: "test-image:latest"
sansible: "sansible-image:latest"
jobContainer:
volumeMounts: []
volumes: []
asserts:
- equal:
path: spec.activeDeadlineSeconds
value: 3600

- it: should override activeDeadlineSeconds for manage-jail-state-dry-run
documentSelector:
path: metadata.name
value: manage-jail-state-dry-run
set:
slurmClusterRefName: test-cluster
images:
k8sJob: "test-image:latest"
sansible: "sansible-image:latest"
jobContainer:
volumeMounts: []
volumes: []
asserts:
- equal:
path: spec.activeDeadlineSeconds
value: 3600
3 changes: 3 additions & 0 deletions helm/soperator-activechecks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ checks:
- "create-user-soperatorchecks"
suspend: true
runAfterCreation: true
activeDeadlineSeconds: 3600
k8sJobSpec:
jobContainer:
appArmorProfile: unconfined
Expand All @@ -354,6 +355,7 @@ checks:
- "create-user-soperatorchecks"
suspend: true
runAfterCreation: false
activeDeadlineSeconds: 3600
k8sJobSpec:
jobContainer:
appArmorProfile: unconfined
Expand Down Expand Up @@ -386,6 +388,7 @@ checks:
schedule: "0 11 * * *"
suspend: false
runAfterCreation: false
activeDeadlineSeconds: 3600
k8sJobSpec:
jobContainer:
appArmorProfile: unconfined
Expand Down
Loading