-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from gluke77/failure-handling-timeout
Failure handling: timeout
- Loading branch information
Showing
9 changed files
with
188 additions
and
15 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
source ../common.sh | ||
|
||
$KUBECTL_NAME create -f ../../manifests/appcontroller.yaml | ||
wait-appcontroller | ||
|
||
$KUBECTL_NAME create -f deps.yaml | ||
|
||
cat pod.yaml | $KUBECTL_NAME create -f - | ||
cat pod2.yaml | $KUBECTL_NAME exec -i k8s-appcontroller kubeac wrap | $KUBECTL_NAME create -f - | ||
cat timedout-pod.yaml | $KUBECTL_NAME create -f - | ||
|
||
$KUBECTL_NAME exec k8s-appcontroller ac-run | ||
$KUBECTL_NAME logs -f k8s-appcontroller |
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 @@ | ||
#!/bin/bash | ||
|
||
source ../common.sh | ||
|
||
$KUBECTL_NAME delete -f deps.yaml | ||
|
||
cat pod.yaml | $KUBECTL_NAME delete -f - | ||
cat pod2.yaml | $KUBECTL_NAME exec -i k8s-appcontroller kubeac wrap | $KUBECTL_NAME delete -f - | ||
cat timedout-pod.yaml | $KUBECTL_NAME delete -f - | ||
|
||
$KUBECTL_NAME delete -f ../../manifests/appcontroller.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,8 @@ | ||
apiVersion: appcontroller.k8s/v1alpha1 | ||
kind: Dependency | ||
metadata: | ||
name: ce1b11dc-2850-1dad-a7dd-302038af20af | ||
meta: | ||
on-error: "true" | ||
parent: pod/timed-out-pod | ||
child: pod/eventually-alive-pod2 |
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,24 @@ | ||
apiVersion: appcontroller.k8s/v1alpha1 | ||
kind: Definition | ||
metadata: | ||
name: pod-eventually-alive-pod | ||
meta: | ||
timeout: 60 | ||
pod: | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: eventually-alive-pod | ||
spec: | ||
containers: | ||
- command: ["/bin/sh"] | ||
args: | ||
- -c | ||
- sleep 30; echo ok > /tmp/health; sleep 60 | ||
image: gcr.io/google_containers/busybox | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/cat | ||
- /tmp/health | ||
name: test-container |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: eventually-alive-pod2 | ||
spec: | ||
containers: | ||
- command: ["/bin/sh"] | ||
args: | ||
- -c | ||
- echo ok > /tmp/health | ||
image: gcr.io/google_containers/busybox | ||
name: test-container | ||
restartPolicy: Never |
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,24 @@ | ||
apiVersion: appcontroller.k8s/v1alpha1 | ||
kind: Definition | ||
metadata: | ||
name: pod-timed-out-pod | ||
meta: | ||
timeout: 5 | ||
pod: | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: timed-out-pod | ||
spec: | ||
containers: | ||
- command: ["/bin/sh"] | ||
args: | ||
- -c | ||
- sleep 30; echo ok > /tmp/health; sleep 60 | ||
image: gcr.io/google_containers/busybox | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/cat | ||
- /tmp/health | ||
name: test-container |
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