//updateStatus updates the status of the integration
updateStatus updates the status of the integration
// updateStatus updates the status of the integration
func (r *ReconcileIntegration) updateStatus(deploymentObj *appsv1.Deployment, config EIConfigNew) error {
	availableReplicas := deploymentObj.Status.AvailableReplicas
	currentStatus := "NotRunning"
	if availableReplicas > 0 {
		currentStatus = "Running"
	}
	if !reflect.DeepEqual(currentStatus, config.integration.Status.Readiness) {
		config.integration.Status.Readiness = currentStatus
		err := r.client.Status().Update(context.TODO(), &config.integration)
		return err
	}
	serviceName := nameForService(&config.integration)
	if !reflect.DeepEqual(serviceName, config.integration.Status.ServiceName) {
		config.integration.Status.ServiceName = serviceName
		err := r.client.Status().Update(context.TODO(), &config.integration)
		return err
	}
	return nil
}
func ( r * ReconcileIntegration ) updateStatus ( deploymentObj * appsv1 . Deployment , config EIConfigNew ) error { availableReplicas := deploymentObj . Status . AvailableReplicas currentStatus := " " if availableReplicas > 0 { currentStatus = " " } if ! reflect . DeepEqual ( currentStatus , config . integration . Status . Readiness ) { config . integration . Status . Readiness = currentStatus err := r . client . Status ( ) . Update ( context . TODO ( ) , & config . integration ) return err } serviceName := nameForService ( & config . integration ) if ! reflect . DeepEqual ( serviceName , config . integration . Status . ServiceName ) { config . integration . Status . ServiceName = serviceName err := r . client . Status ( ) . Update ( context . TODO ( ) , & config . integration ) return err } return nil }
updateStatus updates the status of the integration
updateStatus updates the status of the integration
// Update status.Status if needed // Update status.ServiceName if needed