..
This commit is contained in:
parent
5eedfe81f0
commit
21b3a988dc
14
base/gateway.yaml
Normal file
14
base/gateway.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: networking.istio.io/v1alpha3
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo-gateway
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
istio: ingressgateway # use istio default controller
|
||||||
|
servers:
|
||||||
|
- port:
|
||||||
|
number: 80
|
||||||
|
name: http
|
||||||
|
protocol: HTTP
|
||||||
|
hosts:
|
||||||
|
- "*.itstant.com"
|
7
base/kustomization.yaml
Normal file
7
base/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- gateway.yaml
|
||||||
|
- virtualService.yaml
|
||||||
|
- rollout.yaml
|
||||||
|
- service.yaml
|
35
base/rollout.yaml
Normal file
35
base/rollout.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Rollout
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
canary:
|
||||||
|
canaryService: rollouts-demo-canary
|
||||||
|
stableService: rollouts-demo-stable
|
||||||
|
trafficRouting:
|
||||||
|
istio:
|
||||||
|
virtualServices:
|
||||||
|
- name: rollouts-demo-vsvc1
|
||||||
|
routes:
|
||||||
|
- primary
|
||||||
|
steps:
|
||||||
|
- setWeight: 5
|
||||||
|
- pause: {}
|
||||||
|
revisionHistoryLimit: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: rollouts-demo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: rollouts-demo
|
||||||
|
istio-injection: enabled
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: rollouts-demo
|
||||||
|
image: harbor.inje-private.com/open/nginx:a
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
24
base/service.yaml
Normal file
24
base/service.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo-canary
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: http
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: rollouts-demo
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo-stable
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: http
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: rollouts-demo
|
22
base/virtualService.yaml
Normal file
22
base/virtualService.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: networking.istio.io/v1alpha3
|
||||||
|
kind: VirtualService
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo-vsvc1
|
||||||
|
spec:
|
||||||
|
gateways:
|
||||||
|
- rollouts-demo-gateway
|
||||||
|
hosts:
|
||||||
|
- a.itstant.com
|
||||||
|
http:
|
||||||
|
- name: primary
|
||||||
|
route:
|
||||||
|
- destination:
|
||||||
|
host: rollouts-demo-stable
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
weight: 100
|
||||||
|
- destination:
|
||||||
|
host: rollouts-demo-canary
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
weight: 0
|
10
overlays/dev/image-patch.yaml
Normal file
10
overlays/dev/image-patch.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Rollout
|
||||||
|
metadata:
|
||||||
|
name: rollouts-demo
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: rollouts-demo
|
||||||
|
image: harbor.inje-private.com/open/nginx:a
|
6
overlays/dev/kustomization.yaml
Normal file
6
overlays/dev/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
patchesStrategicMerge:
|
||||||
|
- image-patch.yaml
|
Loading…
Reference in New Issue
Block a user