Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
docs/samples: add manifests for canary demo (#4308)
Browse files Browse the repository at this point in the history
Adds the manifests required to demo canary rollout.

Signed-off-by: Shashank Ram <[email protected]>
  • Loading branch information
shashankram authored Oct 22, 2021
1 parent d9baef6 commit 8f92c9d
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/example/manifests/samples/canary/httpbin-split.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: split.smi-spec.io/v1alpha2
kind: TrafficSplit
metadata:
name: http-split
namespace: httpbin
spec:
service: httpbin.httpbin
backends:
- service: httpbin-v1
weight: 50
- service: httpbin-v2
weight: 50
49 changes: 49 additions & 0 deletions docs/example/manifests/samples/canary/httpbin-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: v1
kind: Service
metadata:
name: httpbin-v1
namespace: httpbin
labels:
app: httpbin
version: v1
spec:
ports:
- name: http
port: 14001
selector:
app: httpbin
version: v1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin-v1
namespace: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v1
template:
metadata:
labels:
app: httpbin
version: v1
spec:
serviceAccountName: httpbin
nodeSelector:
kubernetes.io/arch: amd64
kubernetes.io/os: linux
containers:
- image: simonkowallik/httpbin
imagePullPolicy: IfNotPresent
name: httpbin
command: ["gunicorn", "-b", "0.0.0.0:14001", "httpbin:app", "-k", "gevent"]
ports:
- containerPort: 14001
env:
- name: XHTTPBIN_POD
valueFrom:
fieldRef:
fieldPath: metadata.name
49 changes: 49 additions & 0 deletions docs/example/manifests/samples/canary/httpbin-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: v1
kind: Service
metadata:
name: httpbin-v2
namespace: httpbin
labels:
app: httpbin
version: v2
spec:
ports:
- name: http
port: 14001
selector:
app: httpbin
version: v2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin-v2
namespace: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v2
template:
metadata:
labels:
app: httpbin
version: v2
spec:
serviceAccountName: httpbin
nodeSelector:
kubernetes.io/arch: amd64
kubernetes.io/os: linux
containers:
- image: simonkowallik/httpbin
imagePullPolicy: IfNotPresent
name: httpbin
command: ["gunicorn", "-b", "0.0.0.0:14001", "httpbin:app", "-k", "gevent"]
ports:
- containerPort: 14001
env:
- name: XHTTPBIN_POD
valueFrom:
fieldRef:
fieldPath: metadata.name
19 changes: 19 additions & 0 deletions docs/example/manifests/samples/canary/httpbin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: httpbin
namespace: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: httpbin
labels:
app: httpbin
spec:
ports:
- name: http
port: 14001
selector:
app: httpbin

0 comments on commit 8f92c9d

Please sign in to comment.