80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: hello-world
|
|
namespace: hello-world
|
|
spec: {}
|
|
status: {}
|
|
|
|
---
|
|
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Rollout
|
|
metadata:
|
|
name: hello-world-bluegreen
|
|
namespace: hello-world
|
|
spec:
|
|
replicas: 2
|
|
revisionHistoryLimit: 2
|
|
selector:
|
|
matchLabels:
|
|
app: rollout-bluegreen
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: rollout-bluegreen
|
|
spec:
|
|
containers:
|
|
- name: hello-world
|
|
image: docker.io/waylonwalker/learn-rollouts:v1
|
|
ports:
|
|
- containerPort: 5000
|
|
strategy:
|
|
blueGreen:
|
|
# activeService specifies the service to update with the new template hash at time of promotion.
|
|
# This field is mandatory for the blueGreen update strategy.
|
|
activeService: hello-world-active
|
|
# previewService specifies the service to update with the new template hash before promotion.
|
|
# This allows the preview stack to be reachable without serving production traffic.
|
|
# This field is optional.
|
|
previewService: hello-world-preview
|
|
# autoPromotionEnabled disables automated promotion of the new stack by pausing the rollout
|
|
# immediately before the promotion. If omitted, the default behavior is to promote the new
|
|
# stack as soon as the ReplicaSet are completely ready/available.
|
|
# Rollouts can be resumed using: `kubectl argo rollouts promote ROLLOUT`
|
|
autoPromotionEnabled: false
|
|
#
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hello-world-active
|
|
namespace: hello-world
|
|
spec:
|
|
type: NodePort # Change service type to NodePort
|
|
ports:
|
|
- name: "5000"
|
|
port: 5000
|
|
targetPort: 5000
|
|
nodePort: 30001 # Specify a node port (you can choose any available port)
|
|
selector:
|
|
app: hello-world
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hello-world-preview
|
|
namespace: hello-world
|
|
spec:
|
|
type: NodePort # Change service type to NodePort
|
|
ports:
|
|
- name: "5000"
|
|
port: 5000
|
|
targetPort: 5000
|
|
nodePort: 30002 # Specify a different node port (make sure it's available)
|
|
selector:
|
|
app: hello-world
|