Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions pkg/client/queuejob.go

This file was deleted.

5 changes: 1 addition & 4 deletions pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,11 +1406,8 @@ func (qjm *XController) backoff(ctx context.Context, q *arbv1.AppWrapper, reason
qjm.serverOption.BackoffTime, qjm.qjqueue.IfExistActiveQ(q), qjm.qjqueue.IfExistUnschedulableQ(q), q, q.ResourceVersion, q.Status)
}

// Run start AppWrapper Controller
// Run starts AppWrapper Controller
func (cc *XController) Run(stopCh chan struct{}) {
// initialized
createAppWrapperKind(cc.config)

go cc.appwrapperInformer.Informer().Run(stopCh)

go cc.qjobResControls[arbv1.ResourceTypePod].Run(stopCh)
Expand Down
16 changes: 0 additions & 16 deletions pkg/controller/queuejob/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ package queuejob

import (
corev1 "k8s.io/api/core/v1"
apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"

arbv1 "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1"
"github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client"
)

func GetXQJFullName(qj *arbv1.AppWrapper) string {
Expand All @@ -37,18 +33,6 @@ func HigherSystemPriorityQJ(qj1, qj2 interface{}) bool {
return qj1.(*arbv1.AppWrapper).Status.SystemPriority > qj2.(*arbv1.AppWrapper).Status.SystemPriority
}

func createAppWrapperKind(config *rest.Config) error {
extensionscs, err := apiextensionsclient.NewForConfig(config)
if err != nil {
return err
}
_, err = client.CreateAppWrapperKind(extensionscs)
if err != nil && !apierrors.IsAlreadyExists(err) {
return err
}
return nil
}

// GenerateAppWrapperCondition returns condition of a AppWrapper condition.
func GenerateAppWrapperCondition(condType arbv1.AppWrapperConditionType, condStatus corev1.ConditionStatus, condReason string, condMsg string) arbv1.AppWrapperCondition {
return arbv1.AppWrapperCondition{
Expand Down