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
5 changes: 5 additions & 0 deletions k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ Deploy all resources:
kubectl apply -f k8s/
```

Both colors pin an explicit image tag. To release: set the new tag on the color the Service
is **not** selecting, `kubectl apply` that deployment, check its pods, then switch the Service.
The other color keeps the previous tag as the rollback target (switch the selector back).
Currently green runs `v0.29` (active) and blue runs `v0.23` (rollback).

Switch between blue/green by updating the service selector in `ui-service.yaml`:

```yaml
Expand Down
2 changes: 1 addition & 1 deletion k8s/cloudflared-tunnel-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- name: harbor-registry-secret
containers:
- name: cloudflared
image: harbor.dataknife.net/library/cloudflared-tunnel:v0.27
image: harbor.dataknife.net/library/cloudflared-tunnel:v0.29
imagePullPolicy: IfNotPresent
env:
- name: TUNNEL_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion k8s/ui-deployment-blue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: ui
image: harbor.dataknife.net/library/high-command-ui:latest
image: harbor.dataknife.net/library/high-command-ui:v0.23
imagePullPolicy: Always
env:
- name: NODE_ENV
Expand Down
2 changes: 1 addition & 1 deletion k8s/ui-deployment-green.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: ui
image: harbor.dataknife.net/library/high-command-ui:latest
image: harbor.dataknife.net/library/high-command-ui:v0.29
imagePullPolicy: Always
env:
- name: NODE_ENV
Expand Down
4 changes: 2 additions & 2 deletions k8s/ui-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
labels:
app: high-command-ui
annotations:
deployment.kubernetes.io/active-version: "blue"
deployment.kubernetes.io/active-version: "green"
spec:
type: ClusterIP
selector:
app: high-command-ui
version: blue
version: green
ports:
- name: http
port: 80
Expand Down
Loading