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
41 changes: 41 additions & 0 deletions examples/v1/kubernetes/bluegreen/app.pipecd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: pipecd.dev/v1beta1
kind: Application
spec:
name: bluegreen
labels:
env: example
team: product
pipeline:
stages:
# Roll out CANARY variant with the same number of replicas as PRIMARY.
- name: K8S_CANARY_ROLLOUT
with:
replicas: 100%
# Route all traffic to CANARY variant.
- name: K8S_TRAFFIC_ROUTING
with:
canary: 100
# Wait for a manual approval on the web console before promoting.
- name: WAIT_APPROVAL
with:
minApproverNum: 1
# Replace with real usernames.
approvers:
- example-user
# Roll out PRIMARY variant to the new version.
- name: K8S_PRIMARY_ROLLOUT
# Route all traffic back to PRIMARY variant.
- name: K8S_TRAFFIC_ROUTING
with:
primary: 100
# Clean up CANARY variant workloads.
- name: K8S_CANARY_CLEAN
plugins:
kubernetes:
input:
manifests:
- deployment.yaml
- service.yaml
description: |
This app demonstrates how to deploy a Kubernetes app by BlueGreen strategy without requiring any mesh.
References: [adding a new app](https://pipecd.dev/docs-v1.0.x/user-guide/managing-application/adding-an-application/), [app configuration](https://pipecd.dev/docs-v1.0.x/user-guide/managing-application/configuration-reference/)
25 changes: 25 additions & 0 deletions examples/v1/kubernetes/bluegreen/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: bluegreen
labels:
app: bluegreen
spec:
replicas: 2
selector:
matchLabels:
app: bluegreen
pipecd.dev/variant: primary
template:
metadata:
labels:
app: bluegreen
pipecd.dev/variant: primary
spec:
containers:
- name: helloworld
image: ghcr.io/pipe-cd/helloworld:v0.32.0
args:
- server
ports:
- containerPort: 9085
12 changes: 12 additions & 0 deletions examples/v1/kubernetes/bluegreen/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: bluegreen
spec:
selector:
app: bluegreen
pipecd.dev/variant: primary
ports:
- protocol: TCP
port: 9085
targetPort: 9085
Loading