fix: Handle StatefulSets with an OnDelete update strategy
Fixes
@@ -53,6 +53,7 @@ var (
msgKubectlKilled = "kubectl rollout status command interrupted\n"
MsgKubectlConnection = "kubectl connection error\n"
+ msgStrategyTypeNotSupported = "rollout status is only available for RollingUpdate strategy type"
nonRetryContainerErrors = map[proto.StatusCode]struct{}{
proto.StatusCode_STATUSCHECK_IMAGE_PULL_ERR: {},
@@ -373,6 +374,13 @@ func parseKubectlRolloutError(details string, deadline time.Duration, err error)
ErrCode: proto.StatusCode_STATUSCHECK_KUBECTL_PID_KILLED,
Message: fmt.Sprintf("received Ctrl-C or deployments could not stabilize within %v: %s", deadline, msgKubectlKilled),
}
+ // statefulset rollouts that use OnDelete strategy type don't support monitoring rollout, treat it as
+ // if the deployment just completed successfully
+ case strings.Contains(err.Error(), msgStrategyTypeNotSupported):
+ return &proto.ActionableErr{
+ ErrCode: proto.StatusCode_STATUSCHECK_SUCCESS,
+ Message: details,
+ }
default:
return &proto.ActionableErr{
ErrCode: proto.StatusCode_STATUSCHECK_UNKNOWN,
