-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reconcile/deployment: properly track updateStatus for components
Previously, status could be incorrectly tracked for `Deployment` based application, such as `VMAgent` or `VMSingle`. Check was based on `controller-manager` status condition `NewReplicaSetAvailable` update on `Deployments`. But it due to kubernetes bug kubernetes/kubernetes#115538, condition was not updated if `replicaSet` for deployment exists and it was previously ready. This commit copies logic from `kubectl` tool for `Deployment` rollout status track https://kubernetes.io/docs/reference/kubectl/generated/kubectl_rollout/kubectl_rollout_status/. It also adds check for `generation`, which eliminates possible race condition between `Deployment` state updates by `api-server` and `controller-manager`. --------- Co-authored-by: Nikolay <[email protected]>
- Loading branch information
Showing
4 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters