// WaitUntilDeploymentState waits until isState returns true
WaitUntilDeploymentState waits until isState returns true
// WaitUntilDeploymentState waits until isState returns true
func (m *AppManager) WaitUntilDeploymentState(isState func(*appsv1.Deployment, error) bool) (*appsv1.Deployment, error) {
	deploymentsClient := m.client.Deployments(m.namespace)
	var lastDeployment *appsv1.Deployment
	waitErr := wait.PollImmediate(PollInterval, PollTimeout, func() (bool, error) {
		var err error
		lastDeployment, err = deploymentsClient.Get(m.app.AppName, metav1.GetOptions{})
		done := isState(lastDeployment, err)
		if !done && err != nil {
			return true, err
		}
		return done, nil
	})
	if waitErr != nil {
		return nil, fmt.Errorf("deployment %q is not in desired state, received: %+v: %s", m.app.AppName, lastDeployment, waitErr)
	}
	return lastDeployment, nil
}
func ( m * AppManager ) WaitUntilDeploymentState ( isState func ( * appsv1 . Deployment , error ) bool ) ( * appsv1 . Deployment , error ) { deploymentsClient := m . client . Deployments ( m . namespace ) var lastDeployment * appsv1 . Deployment waitErr := wait . PollImmediate ( PollInterval , PollTimeout , func ( ) ( bool , error ) { var err error lastDeployment , err = deploymentsClient . Get ( m . app . AppName , metav1 . GetOptions { } ) done := isState ( lastDeployment , err ) if ! done && err != nil { return true , err } return done , nil } ) if waitErr != nil { return nil , fmt . Errorf ( " " , m . app . AppName , lastDeployment , waitErr ) } return lastDeployment , nil }
WaitUntilDeploymentState waits until isState returns true
WaitUntilDeploymentState waits until isState returns true