func()

in internal/controller/teamcity_controller.go [251:273]


func (r *TeamcityReconciler) performZeroDowntimeUpgradeOrRequeue(ctx context.Context, teamcity *TeamCity, ongoingUpdate bool) (bool, error) {
	var err error
	statefulSetsWillBeRestarted := false
	if statefulSetsWillBeRestarted, err = doesNodesUpdateChangeStatefulSetSpec(r, ctx, teamcity); err != nil {
		return false, nil
	}
	if statefulSetsWillBeRestarted || ongoingUpdate {
		currentCheckpoint := checkpoint.NewCheckpoint(r.Client, *teamcity)
		err := currentCheckpoint.UpdateStageFromConfigMap(ctx)
		if err != nil {
			if !errors.IsNotFound(err) {
				return false, err
			}
		}
		requeue, err := doActionBasedOnCheckpointOrRequeue(r, ctx, currentCheckpoint)
		if err != nil {
			return false, err
		}
		return requeue, err
	}
	return false, nil

}