You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ k get rollout
NAME STATUS CANARY_STEP CANARY_STATE MESSAGE AGE
rollouts-demo Progressing 1 StepUpgrade Rollout is in step(1/4), and upgrade workload to new version 30s
❯ k get pods
NAME READY STATUS RESTARTS AGE
workload-demo-7489b6d7-t49rv 0/1 ErrImagePull 0 12s
workload-demo-75cdb8b549-497mq 1/1 Running 0 41s
workload-demo-75cdb8b549-5ct2k 1/1 Running 0 41s
workload-demo-75cdb8b549-76c5r 1/1 Running 0 41s
workload-demo-75cdb8b549-kq76b 1/1 Running 0 41s
workload-demo-75cdb8b549-xxtt6 1/1 Running 0 41s
❯ k get rollout
NAME STATUS CANARY_STEP CANARY_STATE MESSAGE AGE
rollouts-demo Progressing 1 StepUpgrade Rollout has been paused, you can resume it by kube-cli 85s
❯ k get pods
NAME READY STATUS RESTARTS AGE
workload-demo-7489b6d7-t49rv 0/1 ImagePullBackOff 0 65s
workload-demo-75cdb8b549-497mq 1/1 Running 0 94s
workload-demo-75cdb8b549-5ct2k 1/1 Running 0 94s
workload-demo-75cdb8b549-76c5r 1/1 Running 0 94s
workload-demo-75cdb8b549-kq76b 1/1 Running 0 94s
workload-demo-75cdb8b549-xxtt6 1/1 Running 0 94s
apply v3
kubectl apply -f v3.yaml
result:
❯ k get pods
NAME READY STATUS RESTARTS AGE
workload-demo-7489b6d7-t49rv 0/1 ErrImagePull 0 2m6s
workload-demo-75cdb8b549-5ct2k 1/1 Running 0 2m35s
workload-demo-75cdb8b549-76c5r 1/1 Running 0 2m35s
workload-demo-75cdb8b549-kq76b 1/1 Running 0 2m35s
workload-demo-75cdb8b549-xxtt6 1/1 Running 0 2m35s
The stable version's replicas=4, available replicas=4, it should be 5
minAvailable:=*(deployment.Spec.Replicas) -maxUnavailablenewRSUnavailablePodCount:=*(newRS.Spec.Replicas) -newRS.Status.AvailableReplicas// this line should also sub oldRS Unavaliable Pod Count?maxScaledDown:=allPodsCount-minAvailable-newRSUnavailablePodCount
Scenario
There are 3 version of the application
v1: stable version
v2:bug canary version
v3: hotfix version
initial
result:
❯ k get rollout NAME STATUS CANARY_STEP CANARY_STATE MESSAGE AGE rollouts-demo Progressing 1 StepUpgrade Rollout is in step(1/4), and upgrade workload to new version 30s ❯ k get pods NAME READY STATUS RESTARTS AGE workload-demo-7489b6d7-t49rv 0/1 ErrImagePull 0 12s workload-demo-75cdb8b549-497mq 1/1 Running 0 41s workload-demo-75cdb8b549-5ct2k 1/1 Running 0 41s workload-demo-75cdb8b549-76c5r 1/1 Running 0 41s workload-demo-75cdb8b549-kq76b 1/1 Running 0 41s workload-demo-75cdb8b549-xxtt6 1/1 Running 0 41s
pause rollout
kubectl patch rollout rollouts-demo -p '{"spec":{"strategy":{"paused":true}}}' --type merge
result:
apply v3
result:
The stable version's replicas=4, available replicas=4, it should be 5
Maybe Bug Code
rollouts/pkg/controller/deployment/rolling.go
Line 131 in 5626a7f
POC
v1.yaml
v2.yaml
using image:busyboy to make deployment failed
v3.yaml
update.yaml
The text was updated successfully, but these errors were encountered: