mirror of
https://github.com/paralus/paralus.git
synced 2026-05-12 03:16:44 +00:00
refactor: remove unused func/var/methods (#315)
Signed-off-by: Dhruv Jain <92215138+jaydee029@users.noreply.github.com>
This commit is contained in:
@@ -165,18 +165,6 @@ func getJobState(j *batchv1.Job) (state clusterv2.StepObjectState, reason string
|
||||
return
|
||||
}
|
||||
|
||||
func getPersistentVolumeClaimState(pvc *corev1.PersistentVolumeClaim) (state clusterv2.StepObjectState, reason string) {
|
||||
if pvc.Status.Phase == corev1.ClaimBound {
|
||||
state = clusterv2.StepObjectComplete
|
||||
reason = "claim bound"
|
||||
return
|
||||
}
|
||||
|
||||
state = clusterv2.StepObjectCreated
|
||||
reason = "in progress"
|
||||
return
|
||||
}
|
||||
|
||||
// ObjectState returns the object state of runtime object
|
||||
func ObjectState(o runtime.Object) (state clusterv2.StepObjectState, reason string) {
|
||||
switch o.(type) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
clusterv2 "github.com/paralus/paralus/proto/types/controller"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -23,7 +22,6 @@ import (
|
||||
|
||||
var (
|
||||
stepLog = logf.Log.WithName("cluster-v2-step")
|
||||
ma = meta.NewAccessor()
|
||||
)
|
||||
|
||||
// Handler is the interface for working with steps
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package step
|
||||
|
||||
import (
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
)
|
||||
|
||||
func isHardFailure(err error) {
|
||||
switch {
|
||||
case apierrs.IsBadRequest(err), apierrs.IsInvalid(err):
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user