diff --git a/k8s/README.md b/k8s/README.md index aab8b27..56ea741 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -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 diff --git a/k8s/cloudflared-tunnel-deployment.yaml b/k8s/cloudflared-tunnel-deployment.yaml index b1c3773..31f1d5e 100644 --- a/k8s/cloudflared-tunnel-deployment.yaml +++ b/k8s/cloudflared-tunnel-deployment.yaml @@ -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 diff --git a/k8s/ui-deployment-blue.yaml b/k8s/ui-deployment-blue.yaml index 5430d49..879b3a7 100644 --- a/k8s/ui-deployment-blue.yaml +++ b/k8s/ui-deployment-blue.yaml @@ -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 diff --git a/k8s/ui-deployment-green.yaml b/k8s/ui-deployment-green.yaml index b9843fc..f87ed8a 100644 --- a/k8s/ui-deployment-green.yaml +++ b/k8s/ui-deployment-green.yaml @@ -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 diff --git a/k8s/ui-service.yaml b/k8s/ui-service.yaml index 3f705d2..f0a539a 100644 --- a/k8s/ui-service.yaml +++ b/k8s/ui-service.yaml @@ -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