sigs.k8s.io/kueue@v0.6.2/pkg/controller/jobs/kubeflow/kubeflowjob/interface.go (about)

     1  /*
     2  Copyright 2023 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package kubeflowjob
    18  
    19  import (
    20  	kftraining "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
    21  	"k8s.io/apimachinery/pkg/runtime/schema"
    22  	"sigs.k8s.io/controller-runtime/pkg/client"
    23  )
    24  
    25  type KFJobControl interface {
    26  	// Object returns the KFJob interface.
    27  	Object() client.Object
    28  	// GVK returns the GroupVersionKind for the KFJob.
    29  	GVK() schema.GroupVersionKind
    30  	// RunPolicy returns the RunPolicy for the KFJob.
    31  	RunPolicy() *kftraining.RunPolicy
    32  	// ReplicaSpecs returns the ReplicaSpecs for the KFJob.
    33  	ReplicaSpecs() map[kftraining.ReplicaType]*kftraining.ReplicaSpec
    34  	// JobStatus returns the JobStatus for the KFJob.
    35  	JobStatus() *kftraining.JobStatus
    36  	// OrderedReplicaTypes returns the ordered list of ReplicaTypes for the KFJob.
    37  	OrderedReplicaTypes() []kftraining.ReplicaType
    38  }