-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add --tolerate-failures-until-deadline flag and deploy.tolerate…
…FailuresUntilDeadline config for improved ci/cd usage
- Loading branch information
1 parent
dfd6015
commit f6daddf
Showing
14 changed files
with
260 additions
and
95 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
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,14 @@ | ||
apiVersion: skaffold/v2beta29 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: tolerance-check | ||
context: tolerance-check | ||
docker: | ||
buildArgs: | ||
STOP_FAILING_TIME: '{{.STOP_FAILING_TIME}}' | ||
deploy: | ||
statusCheckDeadlineSeconds: 120 | ||
kubectl: | ||
manifests: | ||
- tolerance-check/kubernetes/* |
7 changes: 7 additions & 0 deletions
7
integration/testdata/status-check-tolerance/tolerance-check/Dockerfile
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,7 @@ | ||
FROM alpine:latest | ||
ARG STOP_FAILING_TIME | ||
ENV STOP_FAILING_TIME=${STOP_FAILING_TIME:-not_found} | ||
|
||
|
||
COPY script.sh /script.sh | ||
ENTRYPOINT [ "/script.sh" ] |
19 changes: 19 additions & 0 deletions
19
integration/testdata/status-check-tolerance/tolerance-check/kubernetes/deployment.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,19 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: tolerance-check | ||
labels: | ||
app: tolerance-check | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: tolerance-check | ||
template: | ||
metadata: | ||
labels: | ||
app: tolerance-check | ||
spec: | ||
containers: | ||
- name: tolerance-check | ||
image: tolerance-check |
19 changes: 19 additions & 0 deletions
19
integration/testdata/status-check-tolerance/tolerance-check/script.sh
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,19 @@ | ||
#!/bin/sh | ||
|
||
current_time=$(date +%s) | ||
stop_failing_time=$STOP_FAILING_TIME | ||
|
||
echo $current_time | ||
echo "========" | ||
echo $stop_failing_time | ||
echo "========" | ||
|
||
if [[ $current_time -le $stop_failing_time ]]; then | ||
echo "current time less than stop failing time, container will exit with error" | ||
exit 1 | ||
fi | ||
while : | ||
do | ||
echo "Hello world!!!! - current time greater than stop failing time!" | ||
sleep 2 | ||
done |
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
Oops, something went wrong.