refactor: remove unused func/var/methods (#315)

Signed-off-by: Dhruv Jain <92215138+jaydee029@users.noreply.github.com>
This commit is contained in:
Dhruv Jain
2024-04-25 12:16:15 +05:30
committed by GitHub
parent d705c16ced
commit ca4e2c6131
29 changed files with 5 additions and 488 deletions

View File

@@ -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) {

View File

@@ -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

View File

@@ -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):
}
}