Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docs for on rollback for script run (#4774)
* Add docs about the behavior when to rollback for SCRIPT_RUN stage Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com> * Add example for SCRIPT_RUN stage Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com> * Fix docs Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com> --------- Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
- Loading branch information
Showing
5 changed files
with
131 additions
and
9 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,28 @@ | ||
apiVersion: pipecd.dev/v1beta1 | ||
kind: KubernetesApp | ||
spec: | ||
name: script-run | ||
labels: | ||
env: example | ||
team: product | ||
pipeline: | ||
stages: | ||
- name: K8S_CANARY_ROLLOUT | ||
with: | ||
replicas: 10% | ||
- name: WAIT | ||
with: | ||
duration: 10s | ||
- name: SCRIPT_RUN | ||
with: | ||
env: | ||
MSG: "execute script1" | ||
R_MSG: "rollback script1" | ||
run: | | ||
echo $MSG | ||
sleep 10 | ||
onRollback: | | ||
echo $R_MSG | ||
sleep 10 | ||
- name: K8S_PRIMARY_ROLLOUT | ||
- name: K8S_CANARY_CLEAN |
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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: script-run | ||
labels: | ||
app: script-run | ||
spec: | ||
replicas: 2 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
matchLabels: | ||
app: script-run | ||
pipecd.dev/variant: primary | ||
template: | ||
metadata: | ||
labels: | ||
app: script-run | ||
pipecd.dev/variant: primary | ||
spec: | ||
containers: | ||
- name: helloworld | ||
image: gcr.io/pipecd/helloworld:v0.45.0 | ||
args: | ||
- server | ||
ports: | ||
- containerPort: 9085 |
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: v1 | ||
kind: Service | ||
metadata: | ||
name: script-run | ||
spec: | ||
selector: | ||
app: script-run | ||
ports: | ||
- protocol: TCP | ||
port: 9085 | ||
targetPort: 9085 |