// PersistenceActionStatus evaluates the current status of a PersistenceAction deployment.  It return the status
PersistenceActionStatus evaluates the current status of a PersistenceAction deployment.  It return the status
// PersistenceActionStatus evaluates the current status of a PersistenceAction deployment . It return the status
func PersistenceActionStatus(kclient kubernetes.Interface, p *v1alpha1.PersistenceAction) (*v1alpha1.PersistenceActionStatus, error) {
	res := &v1alpha1.PersistenceActionStatus{}
	if p.Spec.Applied == true {
		res.Applied = true
	} else {
		_, err := kclient.BatchV2alpha1().CronJobs(p.Namespace).Get(p.Name, metav1.GetOptions{})
		if err != nil {
			return nil, err
		}
	}
	return res, nil
}
func PersistenceActionStatus ( kclient kubernetes . Interface , p * v1alpha1 . PersistenceAction ) ( * v1alpha1 . PersistenceActionStatus , error ) { res := & v1alpha1 . PersistenceActionStatus { } if p . Spec . Applied == true { res . Applied = true } else { _ , err := kclient . BatchV2alpha1 ( ) . CronJobs ( p . Namespace ) . Get ( p . Name , metav1 . GetOptions { } ) if err != nil { return nil , err } } return res , nil }
PersistenceActionStatus evaluates the current status of a PersistenceAction deployment.
PersistenceActionStatus evaluates the current status of a PersistenceAction deployment .
//TODO need to lookup the job for the cronjob