...

Source file src/github.com/redhat-developer/odo/pkg/dev/kubedev/reconcile.go

Documentation: github.com/redhat-developer/odo/pkg/dev/kubedev

     1  package kubedev
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/redhat-developer/odo/pkg/dev/common"
     7  	"github.com/redhat-developer/odo/pkg/watch"
     8  )
     9  
    10  // reconcile updates the component if a matching component exists or creates one if it doesn't exist
    11  // Once the component has started, it will sync the source code to it.
    12  // The componentStatus will be modified to reflect the status of the component when the function returns
    13  func (o *DevClient) reconcile(ctx context.Context, parameters common.PushParameters, componentStatus *watch.ComponentStatus) (err error) {
    14  
    15  	// podOK indicates if the pod is ready to use for the inner loop
    16  	var podOK bool
    17  	podOK, err = o.createComponents(ctx, parameters, componentStatus)
    18  	if err != nil {
    19  		return err
    20  	}
    21  	if !podOK {
    22  		return nil
    23  	}
    24  
    25  	return o.innerloop(ctx, parameters, componentStatus)
    26  }
    27  

View as plain text