-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error out a task if a job reaches terminal state (#1370)
* Return a fatal engine error if a job never gets healthy but reaches a failed terminal state Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
- Loading branch information
1 parent
6e9e762
commit 6871b2f
Showing
14 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
labels: | ||
kudo.dev/operator: failjob-operator | ||
spec: | ||
operatorVersion: | ||
name: failjob-operator-0.1.0 | ||
status: | ||
aggregatedStatus: | ||
status: FATAL_ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
kubectl: | ||
- kudo install --instance failjob-operator-instance ./failjob-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
labels: | ||
kudo.dev/operator: job-timeout-operator | ||
spec: | ||
operatorVersion: | ||
name: job-timeout-operator-0.1.0 | ||
status: | ||
aggregatedStatus: | ||
status: FATAL_ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
kubectl: | ||
- kudo uninstall --instance failjob-operator-instance | ||
- kudo install --instance job-timout-operator-instance ./job-timeout-operator |
25 changes: 25 additions & 0 deletions
25
test/e2e/terminal-failed-job/failjob-operator/operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "failjob-operator" | ||
operatorVersion: "0.1.0" | ||
appVersion: "1.7.9" | ||
kubernetesVersion: 1.13.0 | ||
maintainers: | ||
- name: Your name | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: app | ||
kind: Apply | ||
spec: | ||
resources: | ||
- failjob.yaml | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: everything | ||
tasks: | ||
- app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: |
14 changes: 14 additions & 0 deletions
14
test/e2e/terminal-failed-job/failjob-operator/templates/failjob.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: failing-job | ||
namespace: {{ .Namespace }} | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: main | ||
image: alpine | ||
command: ["false"] | ||
restartPolicy: Never | ||
backoffLimit: 0 |
25 changes: 25 additions & 0 deletions
25
test/e2e/terminal-failed-job/job-timeout-operator/operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "job-timeout-operator" | ||
operatorVersion: "0.1.0" | ||
appVersion: "1.7.9" | ||
kubernetesVersion: 1.13.0 | ||
maintainers: | ||
- name: Your name | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: app | ||
kind: Apply | ||
spec: | ||
resources: | ||
- timeoutjob.yaml | ||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: everything | ||
tasks: | ||
- app |
2 changes: 2 additions & 0 deletions
2
test/e2e/terminal-failed-job/job-timeout-operator/params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: |
15 changes: 15 additions & 0 deletions
15
test/e2e/terminal-failed-job/job-timeout-operator/templates/timeoutjob.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: timeout-job | ||
namespace: {{ .Namespace }} | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: main | ||
image: alpine | ||
command: ["sleep", "1000"] | ||
restartPolicy: Never | ||
backoffLimit: 3 | ||
activeDeadlineSeconds: 60 |