Update all Pipelines CRD versions to v1beta1. (#681)
This commit is contained in:
parent
e7c9011100
commit
578e8231d0
|
|
@ -15,7 +15,7 @@ go_library(
|
|||
deps = [
|
||||
"//backend/api:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/informers/externalversions/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@io_k8s_client_go//plugin/pkg/client/auth/gcp:go_default_library",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ package client
|
|||
|
||||
import (
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
|
@ -27,11 +27,11 @@ type ScheduledWorkflowClientInterface interface {
|
|||
|
||||
// ScheduledWorkflowClient is a client to call the ScheduledWorkflow API.
|
||||
type ScheduledWorkflowClient struct {
|
||||
informer v1alpha1.ScheduledWorkflowInformer
|
||||
informer v1beta1.ScheduledWorkflowInformer
|
||||
}
|
||||
|
||||
// NewScheduledWorkflowClient creates an instance of the client.
|
||||
func NewScheduledWorkflowClient(informer v1alpha1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
|
||||
func NewScheduledWorkflowClient(informer v1beta1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
|
||||
return &ScheduledWorkflowClient{
|
||||
informer: informer,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func NewPersistenceAgent(
|
|||
pipelineClient *client.PipelineClient,
|
||||
time util.TimeInterface) *PersistenceAgent {
|
||||
// obtain references to shared informers
|
||||
swfInformer := swfInformerFactory.Scheduledworkflow().V1alpha1().ScheduledWorkflows()
|
||||
swfInformer := swfInformerFactory.Scheduledworkflow().V1beta1().ScheduledWorkflows()
|
||||
workflowInformer := workflowInformerFactory.Argoproj().V1alpha1().Workflows()
|
||||
|
||||
// Add controller types to the default Kubernetes Scheme so Events can be
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ go_test(
|
|||
"//backend/api:go_default_library",
|
||||
"//backend/src/agent/persistence/client:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
|
||||
"github.com/kubeflow/pipelines/backend/src/agent/persistence/client"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ go_library(
|
|||
"//backend/src/apiserver/server:go_default_library",
|
||||
"//backend/src/apiserver/storage:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_cenkalti_backoff//:go_default_library",
|
||||
"@com_github_fsnotify_fsnotify//:go_default_library",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/clientset/versioned:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_cenkalti_backoff//:go_default_library",
|
||||
|
|
|
|||
|
|
@ -20,20 +20,20 @@ import (
|
|||
"github.com/cenkalti/backoff"
|
||||
"github.com/golang/glog"
|
||||
swfclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// creates a new client for the Kubernetes ScheduledWorkflow CRD.
|
||||
func CreateScheduledWorkflowClientOrFatal(namespace string, initConnectionTimeout time.Duration) v1alpha1.ScheduledWorkflowInterface {
|
||||
var swfClient v1alpha1.ScheduledWorkflowInterface
|
||||
func CreateScheduledWorkflowClientOrFatal(namespace string, initConnectionTimeout time.Duration) v1beta1.ScheduledWorkflowInterface {
|
||||
var swfClient v1beta1.ScheduledWorkflowInterface
|
||||
var operation = func() error {
|
||||
restConfig, err := rest.InClusterConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
swfClientSet := swfclient.NewForConfigOrDie(restConfig)
|
||||
swfClient = swfClientSet.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace)
|
||||
swfClient = swfClientSet.ScheduledworkflowV1beta1().ScheduledWorkflows(namespace)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
minio "github.com/minio/minio-go"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ go_library(
|
|||
"//backend/src/apiserver/model:go_default_library",
|
||||
"//backend/src/apiserver/storage:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_golang_glog//:go_default_library",
|
||||
|
|
@ -45,7 +45,7 @@ go_test(
|
|||
"//backend/src/apiserver/model:go_default_library",
|
||||
"//backend/src/apiserver/storage:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/golang/glog"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
func TestToModelRunMetric(t *testing.T) {
|
||||
|
|
@ -133,7 +133,7 @@ func TestToModelJob(t *testing.T) {
|
|||
Trigger: model.Trigger{
|
||||
CronSchedule: model.CronSchedule{
|
||||
CronScheduleStartTimeInSec: util.Int64Pointer(1),
|
||||
Cron: util.StringPointer("1 * * * *"),
|
||||
Cron: util.StringPointer("1 * * * *"),
|
||||
},
|
||||
},
|
||||
MaxConcurrency: 1,
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
"github.com/pkg/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc/codes"
|
||||
|
|
@ -724,7 +724,7 @@ func TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_Success(t *testing.T
|
|||
Namespace: "MY_NAMESPACE",
|
||||
UID: "WORKFLOW_1",
|
||||
OwnerReferences: []v1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID(job.UUID),
|
||||
|
|
@ -791,7 +791,7 @@ func TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_ExperimentNotFound(t
|
|||
Namespace: "MY_NAMESPACE",
|
||||
UID: "WORKFLOW_1",
|
||||
OwnerReferences: []v1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID(newJob.UUID),
|
||||
|
|
@ -978,7 +978,7 @@ func TestReadArtifact_Succeed(t *testing.T) {
|
|||
UID: "run-1",
|
||||
CreationTimestamp: v1.NewTime(time.Unix(11, 0).UTC()),
|
||||
OwnerReferences: []v1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID(job.UUID),
|
||||
|
|
@ -1022,7 +1022,7 @@ func TestReadArtifact_WorkflowNoStatus_NotFound(t *testing.T) {
|
|||
UID: "run-1",
|
||||
CreationTimestamp: v1.NewTime(time.Unix(11, 0).UTC()),
|
||||
OwnerReferences: []v1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID(job.UUID),
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -18,23 +18,23 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
)
|
||||
|
||||
type FakeScheduledWorkflowClient struct {
|
||||
workflows map[string]*v1alpha1.ScheduledWorkflow
|
||||
workflows map[string]*v1beta1.ScheduledWorkflow
|
||||
}
|
||||
|
||||
func NewScheduledWorkflowClientFake() *FakeScheduledWorkflowClient {
|
||||
return &FakeScheduledWorkflowClient{
|
||||
workflows: make(map[string]*v1alpha1.ScheduledWorkflow),
|
||||
workflows: make(map[string]*v1beta1.ScheduledWorkflow),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *FakeScheduledWorkflowClient) Create(workflow *v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (c *FakeScheduledWorkflowClient) Create(workflow *v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
|
||||
workflow.UID = "123"
|
||||
workflow.Namespace = "default"
|
||||
workflow.Name = workflow.GenerateName
|
||||
|
|
@ -47,11 +47,11 @@ func (c *FakeScheduledWorkflowClient) Delete(name string, options *v1.DeleteOpti
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *FakeScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (c *FakeScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *FakeScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (c *FakeScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1beta1.ScheduledWorkflow, error) {
|
||||
workflow, ok := c.workflows[name]
|
||||
if ok {
|
||||
return workflow, nil
|
||||
|
|
@ -59,7 +59,7 @@ func (c *FakeScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*
|
|||
return nil, errors.New("not found")
|
||||
}
|
||||
|
||||
func (c *FakeScheduledWorkflowClient) Update(*v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (c *FakeScheduledWorkflowClient) Update(*v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ func (c *FakeScheduledWorkflowClient) DeleteCollection(options *v1.DeleteOptions
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *FakeScheduledWorkflowClient) List(opts v1.ListOptions) (*v1alpha1.ScheduledWorkflowList, error) {
|
||||
func (c *FakeScheduledWorkflowClient) List(opts v1.ListOptions) (*v1beta1.ScheduledWorkflowList, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -83,14 +83,14 @@ type FakeBadScheduledWorkflowClient struct {
|
|||
FakeScheduledWorkflowClient
|
||||
}
|
||||
|
||||
func (FakeBadScheduledWorkflowClient) Create(workflow *v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (FakeBadScheduledWorkflowClient) Create(workflow *v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
|
||||
return nil, errors.New("some error")
|
||||
}
|
||||
|
||||
func (FakeBadScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (FakeBadScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1beta1.ScheduledWorkflow, error) {
|
||||
return nil, errors.New("some error")
|
||||
}
|
||||
|
||||
func (FakeBadScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (FakeBadScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
return nil, errors.New("some error")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/golang/glog"
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ go_library(
|
|||
"//backend/src/apiserver/model:go_default_library",
|
||||
"//backend/src/apiserver/resource:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_golang_glog//:go_default_library",
|
||||
"@com_github_golang_protobuf//jsonpb:go_default_library_gen",
|
||||
|
|
@ -61,7 +61,7 @@ go_test(
|
|||
"//backend/src/apiserver/resource:go_default_library",
|
||||
"//backend/src/apiserver/storage:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_google_go_cmp//cmp:go_default_library",
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/resource"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
)
|
||||
|
||||
type ReportServer struct {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc/codes"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -69,7 +69,7 @@ func TestValidateReportWorkflowRequest(t *testing.T) {
|
|||
Namespace: "MY_NAMESPACE",
|
||||
UID: "1",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("1"),
|
||||
|
|
@ -96,7 +96,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
|
|||
Namespace: "MY_NAMESPACE",
|
||||
UID: "1",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("1"),
|
||||
|
|
@ -114,7 +114,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
|
|||
Name: "MY_NAME",
|
||||
UID: "1",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("1"),
|
||||
|
|
@ -133,7 +133,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
|
|||
Name: "MY_NAME",
|
||||
Namespace: "MY_NAMESPACE",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("1"),
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc/codes"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
var testWorkflow = util.NewWorkflow(&v1alpha1.Workflow{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ go_test(
|
|||
"//backend/src/apiserver/list:go_default_library",
|
||||
"//backend/src/apiserver/model:go_default_library",
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_masterminds_squirrel//:go_default_library",
|
||||
"@com_github_minio_minio_go//:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/apiserver/list"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc/codes"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ go_library(
|
|||
deps = [
|
||||
"//backend/api:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_cenkalti_backoff//:go_default_library",
|
||||
"@com_github_ghodss_yaml//:go_default_library",
|
||||
|
|
@ -60,7 +60,7 @@ go_test(
|
|||
],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_ghodss_yaml//:go_default_library",
|
||||
"@com_github_kataras_iris//core/errors:go_default_library",
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func (p *WorkflowFormatter) Format(workflow *v1alpha1.Workflow) error {
|
|||
|
||||
func getWorkflowName(workflow *v1alpha1.Workflow) string {
|
||||
|
||||
const(
|
||||
const (
|
||||
defaultWorkflowName = "workflow-"
|
||||
)
|
||||
|
||||
|
|
@ -159,4 +159,3 @@ func (p *WorkflowFormatter) createSubtitute(match string) (string, error) {
|
|||
return match, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/kataras/iris/core/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package util
|
|||
import (
|
||||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/golang/glog"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import (
|
|||
"time"
|
||||
|
||||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import (
|
|||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/golang/glog"
|
||||
swfregister "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import (
|
|||
"testing"
|
||||
|
||||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
|
@ -30,7 +30,7 @@ func TestWorkflow_ScheduledWorkflowUUIDAsStringOrEmpty(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "WORKFLOW_NAME",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("MY_UID"),
|
||||
|
|
@ -45,7 +45,7 @@ func TestWorkflow_ScheduledWorkflowUUIDAsStringOrEmpty(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "WORKFLOW_NAME",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
UID: types.UID("MY_UID"),
|
||||
}},
|
||||
},
|
||||
|
|
@ -58,7 +58,7 @@ func TestWorkflow_ScheduledWorkflowUUIDAsStringOrEmpty(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "WORKFLOW_NAME",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "WRONG_KIND",
|
||||
Name: "SCHEDULE_NAME",
|
||||
UID: types.UID("MY_UID"),
|
||||
|
|
@ -87,7 +87,7 @@ func TestWorkflow_ScheduledWorkflowUUIDAsStringOrEmpty(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "WORKFLOW_NAME",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
}},
|
||||
|
|
@ -240,7 +240,7 @@ func TestWorkflow_SetOwnerReferences(t *testing.T) {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "WORKFLOW_NAME",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE_NAME",
|
||||
Controller: BoolPointer(true),
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ Namespace: default
|
|||
Labels: scheduledworkflows.kubeflow.org/enabled=true
|
||||
scheduledworkflows.kubeflow.org/status=Enabled
|
||||
Annotations: <none>
|
||||
API Version: kubeflow.org/v1alpha1
|
||||
API Version: kubeflow.org/v1beta1
|
||||
Kind: ScheduledWorkflow
|
||||
Metadata:
|
||||
Cluster Name:
|
||||
|
|
@ -102,7 +102,7 @@ Metadata:
|
|||
Generation: 0
|
||||
Initializers: <nil>
|
||||
Resource Version: 3056202
|
||||
Self Link: /apis/kubeflow.org/v1alpha1/namespaces/default/scheduledworkflows/every-minute-cron
|
||||
Self Link: /apis/kubeflow.org/v1beta1/namespaces/default/scheduledworkflows/every-minute-cron
|
||||
UID: 6b11874e-6928-11e8-9fd5-42010a8a0021
|
||||
Spec:
|
||||
Enabled: true
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ go_library(
|
|||
"//backend/src/crd/controller/scheduledworkflow/client:go_default_library",
|
||||
"//backend/src/crd/controller/scheduledworkflow/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/scheme:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions:go_default_library",
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ go_library(
|
|||
deps = [
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/controller/scheduledworkflow/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/clientset/versioned:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/client/informers/externalversions/workflow/v1alpha1:go_default_library",
|
||||
|
|
@ -35,7 +35,7 @@ go_test(
|
|||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_argoproj_argo//workflow/common:go_default_library",
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package client
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package client
|
|||
import (
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow/util"
|
||||
swfclientset "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
|
@ -25,12 +25,12 @@ import (
|
|||
// ScheduledWorkflowClient is a client to call the ScheduledWorkflow API.
|
||||
type ScheduledWorkflowClient struct {
|
||||
clientSet swfclientset.Interface
|
||||
informer v1alpha1.ScheduledWorkflowInformer
|
||||
informer v1beta1.ScheduledWorkflowInformer
|
||||
}
|
||||
|
||||
// NewScheduledWorkflowClient creates an instance of the client.
|
||||
func NewScheduledWorkflowClient(clientSet swfclientset.Interface,
|
||||
informer v1alpha1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
|
||||
informer v1beta1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
|
||||
return &ScheduledWorkflowClient{
|
||||
clientSet: clientSet,
|
||||
informer: informer,
|
||||
|
|
@ -60,7 +60,7 @@ func (p *ScheduledWorkflowClient) Get(namespace string, name string) (*util.Sche
|
|||
// Update Updates a ScheduledWorkflow in the Kubernetes API server.
|
||||
func (p *ScheduledWorkflowClient) Update(namespace string,
|
||||
schedule *util.ScheduledWorkflow) error {
|
||||
_, err := p.clientSet.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace).
|
||||
_, err := p.clientSet.ScheduledworkflowV1beta1().ScheduledWorkflows(namespace).
|
||||
Update(schedule.Get())
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/argoproj/argo/pkg/client/informers/externalversions/workflow/v1alpha1"
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
wraperror "github.com/pkg/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
workflowcommon "github.com/argoproj/argo/workflow/common"
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow/client"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow/util"
|
||||
swfregister "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
swfclientset "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
|
||||
swfScheme "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme"
|
||||
swfinformers "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions"
|
||||
|
|
@ -83,7 +83,7 @@ func NewController(
|
|||
time commonutil.TimeInterface) *Controller {
|
||||
|
||||
// obtain references to shared informers
|
||||
swfInformer := swfInformerFactory.Scheduledworkflow().V1alpha1().ScheduledWorkflows()
|
||||
swfInformer := swfInformerFactory.Scheduledworkflow().V1beta1().ScheduledWorkflows()
|
||||
workflowInformer := workflowInformerFactory.Argoproj().V1alpha1().Workflows()
|
||||
|
||||
// Add controller types to the default Kubernetes Scheme so Events can be
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_argoproj_argo//workflow/common:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
|
|
@ -38,7 +38,7 @@ go_test(
|
|||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//backend/src/common/util:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
|
||||
"@com_github_stretchr_testify//assert:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import (
|
|||
"math"
|
||||
"time"
|
||||
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
wraperror "github.com/pkg/errors"
|
||||
"github.com/robfig/cron"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"time"
|
||||
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package util
|
|||
import (
|
||||
"math"
|
||||
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"time"
|
||||
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
|
||||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
commonutil "github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/core"
|
||||
|
|
@ -582,7 +582,7 @@ func TestScheduledWorkflow_NewWorkflow(t *testing.T) {
|
|||
"scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)),
|
||||
"scheduledworkflows.kubeflow.org/workflowIndex": "1"},
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE1",
|
||||
UID: "",
|
||||
|
|
@ -655,7 +655,7 @@ func TestScheduledWorkflow_NewWorkflow_Parameterized(t *testing.T) {
|
|||
"scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)),
|
||||
"scheduledworkflows.kubeflow.org/workflowIndex": "1"},
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "ScheduledWorkflow",
|
||||
Name: "SCHEDULE1",
|
||||
UID: "",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ go_library(
|
|||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//backend/src/crd/controller/viewer/reconciler:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/viewer/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/viewer/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/signals:go_default_library",
|
||||
"@com_github_golang_glog//:go_default_library",
|
||||
"@io_k8s_api//apps/v1:go_default_library",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/kubeflow/pipelines/backend/src/crd/controller/viewer/reconciler"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/signals"
|
||||
|
||||
viewerV1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1alpha1"
|
||||
viewerV1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1beta1"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
|
|
@ -57,7 +57,7 @@ func main() {
|
|||
log.Fatalf("Failed to build Kubernetes runtime client: %v", err)
|
||||
}
|
||||
|
||||
viewerV1alpha1.AddToScheme(scheme.Scheme)
|
||||
viewerV1beta1.AddToScheme(scheme.Scheme)
|
||||
opts := &reconciler.Options{MaxNumViewers: *maxNumViewers}
|
||||
reconciler, err := reconciler.New(cli, scheme.Scheme, opts)
|
||||
if err != nil {
|
||||
|
|
@ -68,7 +68,7 @@ func main() {
|
|||
// Create a controller that is in charge of Viewer types, and also responds to
|
||||
// changes to any deployment and services that is owned by any Viewer instance.
|
||||
mgr, err := builder.SimpleController().
|
||||
ForType(&viewerV1alpha1.Viewer{}).
|
||||
ForType(&viewerV1beta1.Viewer{}).
|
||||
Owns(&appsv1.Deployment{}).
|
||||
Owns(&corev1.Service{}).
|
||||
WithConfig(cfg).
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ go_library(
|
|||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/controller/viewer/reconciler",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/viewer/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/viewer/v1beta1:go_default_library",
|
||||
"@com_github_golang_glog//:go_default_library",
|
||||
"@io_k8s_api//apps/v1:go_default_library",
|
||||
"@io_k8s_api//core/v1:go_default_library",
|
||||
|
|
@ -27,7 +27,7 @@ go_test(
|
|||
srcs = ["reconciler_test.go"],
|
||||
embed = [":go_default_library"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/viewer/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/viewer/v1beta1:go_default_library",
|
||||
"@com_github_google_go_cmp//cmp:go_default_library",
|
||||
"@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
|
||||
"@io_k8s_api//apps/v1:go_default_library",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
viewerV1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1alpha1"
|
||||
viewerV1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1beta1"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
|
|
@ -71,7 +71,7 @@ func New(cli client.Client, scheme *runtime.Scheme, opts *Options) (*Reconciler,
|
|||
func (r *Reconciler) Reconcile(req reconcile.Request) (reconcile.Result, error) {
|
||||
glog.Infof("Reconcile request: %+v", req)
|
||||
|
||||
view := &viewerV1alpha1.Viewer{}
|
||||
view := &viewerV1beta1.Viewer{}
|
||||
if err := r.Get(context.Background(), req.NamespacedName, view); err != nil {
|
||||
if errors.IsNotFound(err) {
|
||||
// No viewer instance, so this may be the result of a delete.
|
||||
|
|
@ -84,7 +84,7 @@ func (r *Reconciler) Reconcile(req reconcile.Request) (reconcile.Result, error)
|
|||
glog.Infof("Got instance: %+v", view)
|
||||
|
||||
// Ignore other viewer types for now.
|
||||
if view.Spec.Type != viewerV1alpha1.ViewerTypeTensorboard {
|
||||
if view.Spec.Type != viewerV1beta1.ViewerTypeTensorboard {
|
||||
glog.Infof("Unsupported spec type: %q", view.Spec.Type)
|
||||
// Return nil to indicate nothing more to do here.
|
||||
return reconcile.Result{}, nil
|
||||
|
|
@ -158,7 +158,7 @@ func (r *Reconciler) Reconcile(req reconcile.Request) (reconcile.Result, error)
|
|||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
func setPodSpecForTensorboard(view *viewerV1alpha1.Viewer, s *corev1.PodSpec) {
|
||||
func setPodSpecForTensorboard(view *viewerV1beta1.Viewer, s *corev1.PodSpec) {
|
||||
if len(s.Containers) == 0 {
|
||||
s.Containers = append(s.Containers, corev1.Container{})
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ func setPodSpecForTensorboard(view *viewerV1alpha1.Viewer, s *corev1.PodSpec) {
|
|||
|
||||
}
|
||||
|
||||
func deploymentFrom(view *viewerV1alpha1.Viewer) (*appsv1.Deployment, error) {
|
||||
func deploymentFrom(view *viewerV1beta1.Viewer) (*appsv1.Deployment, error) {
|
||||
name := view.Name + "-deployment"
|
||||
dpl := &appsv1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
@ -205,7 +205,7 @@ func deploymentFrom(view *viewerV1alpha1.Viewer) (*appsv1.Deployment, error) {
|
|||
dpl.Spec.Template.ObjectMeta.Labels["viewer"] = view.Name
|
||||
|
||||
switch view.Spec.Type {
|
||||
case viewerV1alpha1.ViewerTypeTensorboard:
|
||||
case viewerV1beta1.ViewerTypeTensorboard:
|
||||
setPodSpecForTensorboard(view, &dpl.Spec.Template.Spec)
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown viewer type: %q", view.Spec.Type)
|
||||
|
|
@ -223,7 +223,7 @@ prefix: %s
|
|||
rewrite: %s
|
||||
service: %s`
|
||||
|
||||
func serviceFrom(v *viewerV1alpha1.Viewer, deploymentName string) *corev1.Service {
|
||||
func serviceFrom(v *viewerV1beta1.Viewer, deploymentName string) *corev1.Service {
|
||||
name := v.Name + "-service"
|
||||
path := fmt.Sprintf("/%s/%s/", v.Spec.Type, v.Name)
|
||||
mapping := fmt.Sprintf(mappingTpl, v.Name, path, path, name)
|
||||
|
|
@ -254,8 +254,8 @@ func serviceFrom(v *viewerV1alpha1.Viewer, deploymentName string) *corev1.Servic
|
|||
}
|
||||
}
|
||||
|
||||
func (r *Reconciler) maybeDeleteOldestViewer(t viewerV1alpha1.ViewerType) error {
|
||||
list := &viewerV1alpha1.ViewerList{}
|
||||
func (r *Reconciler) maybeDeleteOldestViewer(t viewerV1beta1.ViewerType) error {
|
||||
list := &viewerV1beta1.ViewerList{}
|
||||
|
||||
if err := r.Client.List(context.Background(), &client.ListOptions{}, list); err != nil {
|
||||
return fmt.Errorf("failed to list viewers: %v", err)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
_ "github.com/google/go-cmp/cmp/cmpopts"
|
||||
viewerV1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1alpha1"
|
||||
viewerV1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1beta1"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
|
|
@ -39,7 +39,7 @@ import (
|
|||
var viewer *Reconciler
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
viewerV1alpha1.AddToScheme(scheme.Scheme)
|
||||
viewerV1beta1.AddToScheme(scheme.Scheme)
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
|
@ -73,14 +73,14 @@ func getServices(t *testing.T, c client.Client) []*corev1.Service {
|
|||
return svcs
|
||||
}
|
||||
|
||||
func getViewers(t *testing.T, c client.Client) []*viewerV1alpha1.Viewer {
|
||||
list := &viewerV1alpha1.ViewerList{}
|
||||
func getViewers(t *testing.T, c client.Client) []*viewerV1beta1.Viewer {
|
||||
list := &viewerV1beta1.ViewerList{}
|
||||
|
||||
if err := c.List(context.Background(), &client.ListOptions{}, list); err != nil {
|
||||
t.Fatalf("Failed to list viewers with fake client: %v", err)
|
||||
}
|
||||
|
||||
var items []*viewerV1alpha1.Viewer
|
||||
var items []*viewerV1beta1.Viewer
|
||||
for _, i := range list.Items {
|
||||
i := i
|
||||
items = append(items, &i)
|
||||
|
|
@ -106,7 +106,7 @@ func serviceNames(svcs []*corev1.Service) []string {
|
|||
return ns
|
||||
}
|
||||
|
||||
func viewerNames(items []*viewerV1alpha1.Viewer) []string {
|
||||
func viewerNames(items []*viewerV1beta1.Viewer) []string {
|
||||
var ns []string
|
||||
|
||||
for _, s := range items {
|
||||
|
|
@ -120,14 +120,14 @@ func boolRef(val bool) *bool {
|
|||
}
|
||||
|
||||
func TestReconcile_EachViewerCreatesADeployment(t *testing.T) {
|
||||
viewer := &viewerV1alpha1.Viewer{
|
||||
viewer := &viewerV1beta1.Viewer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123",
|
||||
Namespace: "kubeflow",
|
||||
},
|
||||
Spec: viewerV1alpha1.ViewerSpec{
|
||||
Type: viewerV1alpha1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1alpha1.TensorboardSpec{
|
||||
Spec: viewerV1beta1.ViewerSpec{
|
||||
Type: viewerV1beta1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1beta1.TensorboardSpec{
|
||||
LogDir: "gs://tensorboard/logdir",
|
||||
},
|
||||
},
|
||||
|
|
@ -150,7 +150,7 @@ func TestReconcile_EachViewerCreatesADeployment(t *testing.T) {
|
|||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Name: "viewer-123",
|
||||
Kind: "Viewer",
|
||||
Controller: boolRef(true),
|
||||
|
|
@ -192,14 +192,14 @@ func TestReconcile_EachViewerCreatesADeployment(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestReconcile_ViewerUsesSpecifiedVolumeMountsForDeployment(t *testing.T) {
|
||||
viewer := &viewerV1alpha1.Viewer{
|
||||
viewer := &viewerV1beta1.Viewer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123",
|
||||
Namespace: "kubeflow",
|
||||
},
|
||||
Spec: viewerV1alpha1.ViewerSpec{
|
||||
Type: viewerV1alpha1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1alpha1.TensorboardSpec{
|
||||
Spec: viewerV1beta1.ViewerSpec{
|
||||
Type: viewerV1beta1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1beta1.TensorboardSpec{
|
||||
LogDir: "gs://tensorboard/logdir",
|
||||
},
|
||||
PodTemplateSpec: corev1.PodTemplateSpec{
|
||||
|
|
@ -247,7 +247,7 @@ func TestReconcile_ViewerUsesSpecifiedVolumeMountsForDeployment(t *testing.T) {
|
|||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Name: "viewer-123",
|
||||
Kind: "Viewer",
|
||||
Controller: boolRef(true),
|
||||
|
|
@ -303,14 +303,14 @@ func TestReconcile_ViewerUsesSpecifiedVolumeMountsForDeployment(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestReconcile_EachViewerCreatesAService(t *testing.T) {
|
||||
viewer := &viewerV1alpha1.Viewer{
|
||||
viewer := &viewerV1beta1.Viewer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123",
|
||||
Namespace: "kubeflow",
|
||||
},
|
||||
Spec: viewerV1alpha1.ViewerSpec{
|
||||
Type: viewerV1alpha1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1alpha1.TensorboardSpec{
|
||||
Spec: viewerV1beta1.ViewerSpec{
|
||||
Type: viewerV1beta1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1beta1.TensorboardSpec{
|
||||
LogDir: "gs://tensorboard/logdir",
|
||||
},
|
||||
},
|
||||
|
|
@ -341,7 +341,7 @@ func TestReconcile_EachViewerCreatesAService(t *testing.T) {
|
|||
"rewrite: /tensorboard/viewer-123/\n" +
|
||||
"service: viewer-123-service"},
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1alpha1",
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Kind: "Viewer",
|
||||
Name: "viewer-123",
|
||||
Controller: boolRef(true),
|
||||
|
|
@ -373,14 +373,14 @@ func TestReconcile_EachViewerCreatesAService(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestReconcile_UnknownViewerTypesAreIgnored(t *testing.T) {
|
||||
viewer := &viewerV1alpha1.Viewer{
|
||||
viewer := &viewerV1beta1.Viewer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123",
|
||||
Namespace: "kubeflow",
|
||||
},
|
||||
Spec: viewerV1alpha1.ViewerSpec{
|
||||
Spec: viewerV1beta1.ViewerSpec{
|
||||
Type: "unknownType",
|
||||
TensorboardSpec: viewerV1alpha1.TensorboardSpec{
|
||||
TensorboardSpec: viewerV1beta1.TensorboardSpec{
|
||||
LogDir: "gs://tensorboard/logdir",
|
||||
},
|
||||
},
|
||||
|
|
@ -441,16 +441,16 @@ func TestReconcile_UnknownViewerDoesNothing(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func makeViewer(id int) (*types.NamespacedName, *viewerV1alpha1.Viewer) {
|
||||
v := &viewerV1alpha1.Viewer{
|
||||
func makeViewer(id int) (*types.NamespacedName, *viewerV1beta1.Viewer) {
|
||||
v := &viewerV1beta1.Viewer{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: fmt.Sprintf("viewer-%d", id),
|
||||
Namespace: "kubeflow",
|
||||
CreationTimestamp: metav1.Time{Time: time.Unix(int64(id), 0)},
|
||||
},
|
||||
Spec: viewerV1alpha1.ViewerSpec{
|
||||
Type: viewerV1alpha1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1alpha1.TensorboardSpec{
|
||||
Spec: viewerV1beta1.ViewerSpec{
|
||||
Type: viewerV1beta1.ViewerTypeTensorboard,
|
||||
TensorboardSpec: viewerV1beta1.TensorboardSpec{
|
||||
LogDir: "gs://tensorboard/logdir",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ echo "CODEGEN_PKG is $CODEGEN_PKG"
|
|||
${CODEGEN_PKG}/generate-groups.sh "deepcopy" \
|
||||
github.com/kubeflow/pipelines/backend/src/crd/pkg/client \
|
||||
github.com/kubeflow/pipelines/backend/src/crd/pkg/apis \
|
||||
"scheduledworkflow:v1alpha1 viewer:v1alpha1" \
|
||||
"scheduledworkflow:v1beta1 viewer:v1beta1" \
|
||||
--go-header-file ${SCRIPT_ROOT}/custom-boilerplate.go.txt
|
||||
|
||||
${CODEGEN_PKG}/generate-groups.sh "client,informer,lister" \
|
||||
github.com/kubeflow/pipelines/backend/src/crd/pkg/client \
|
||||
github.com/kubeflow/pipelines/backend/src/crd/pkg/apis \
|
||||
scheduledworkflow:v1alpha1 \
|
||||
scheduledworkflow:v1beta1 \
|
||||
--go-header-file ${SCRIPT_ROOT}/custom-boilerplate.go.txt
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ metadata:
|
|||
name: scheduledworkflows.kubeflow.org
|
||||
spec:
|
||||
group: kubeflow.org
|
||||
version: v1alpha1
|
||||
version: v1beta1
|
||||
scope: Namespaced
|
||||
names:
|
||||
kind: "ScheduledWorkflow"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ metadata:
|
|||
name: viewers.kubeflow.org
|
||||
spec:
|
||||
group: kubeflow.org
|
||||
version: v1alpha1
|
||||
version: v1beta1
|
||||
scope: Namespaced
|
||||
names:
|
||||
kind: "Viewer"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ go_library(
|
|||
"types.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow:go_default_library",
|
||||
|
|
@ -14,6 +14,6 @@
|
|||
|
||||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package v1alpha1 is the v1alpha1 version of the API.
|
||||
// Package v1beta1 is the v1beta1 version of the API.
|
||||
// +groupName=scheduledworkflow.kubeflow.org
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -23,7 +23,7 @@ import (
|
|||
)
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: controller.GroupName, Version: "v1alpha1"}
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: controller.GroupName, Version: "v1beta1"}
|
||||
|
||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
||||
func Kind(kind string) schema.GroupKind {
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// limitations under the License.
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -8,7 +8,7 @@ go_library(
|
|||
"types.go",
|
||||
"zz_generated.deepcopy.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1alpha1",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/viewer:go_default_library",
|
||||
|
|
@ -14,6 +14,6 @@
|
|||
|
||||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package v1alpha1 is the v1alpha1 version of the API.
|
||||
// Package v1beta1 is the v1beta1 version of the API.
|
||||
// +groupName=viewer.kubeflow.org
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/viewer"
|
||||
|
|
@ -22,7 +22,7 @@ import (
|
|||
)
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: viewer.GroupName, Version: "v1alpha1"}
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: viewer.GroupName, Version: "v1beta1"}
|
||||
|
||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
||||
func Kind(kind string) schema.GroupKind {
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
// limitations under the License.
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -9,7 +9,7 @@ go_library(
|
|||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@io_k8s_client_go//discovery:go_default_library",
|
||||
"@io_k8s_client_go//rest:go_default_library",
|
||||
"@io_k8s_client_go//util/flowcontrol:go_default_library",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package versioned
|
||||
|
||||
import (
|
||||
scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
|
|
@ -24,27 +24,27 @@ import (
|
|||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
ScheduledworkflowV1alpha1() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface
|
||||
ScheduledworkflowV1beta1() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Scheduledworkflow() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface
|
||||
Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
scheduledworkflowV1alpha1 *scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Client
|
||||
scheduledworkflowV1beta1 *scheduledworkflowv1beta1.ScheduledworkflowV1beta1Client
|
||||
}
|
||||
|
||||
// ScheduledworkflowV1alpha1 retrieves the ScheduledworkflowV1alpha1Client
|
||||
func (c *Clientset) ScheduledworkflowV1alpha1() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface {
|
||||
return c.scheduledworkflowV1alpha1
|
||||
// ScheduledworkflowV1beta1 retrieves the ScheduledworkflowV1beta1Client
|
||||
func (c *Clientset) ScheduledworkflowV1beta1() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return c.scheduledworkflowV1beta1
|
||||
}
|
||||
|
||||
// Deprecated: Scheduledworkflow retrieves the default version of ScheduledworkflowClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface {
|
||||
return c.scheduledworkflowV1alpha1
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return c.scheduledworkflowV1beta1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
|
|
@ -63,7 +63,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.scheduledworkflowV1alpha1, err = scheduledworkflowv1alpha1.NewForConfig(&configShallowCopy)
|
||||
cs.scheduledworkflowV1beta1, err = scheduledworkflowv1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.scheduledworkflowV1alpha1 = scheduledworkflowv1alpha1.NewForConfigOrDie(c)
|
||||
cs.scheduledworkflowV1beta1 = scheduledworkflowv1beta1.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &cs
|
||||
|
|
@ -88,7 +88,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.scheduledworkflowV1alpha1 = scheduledworkflowv1alpha1.New(c)
|
||||
cs.scheduledworkflowV1beta1 = scheduledworkflowv1beta1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ go_library(
|
|||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/fake",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1/fake:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ package fake
|
|||
|
||||
import (
|
||||
clientset "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
|
||||
scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
fakescheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake"
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
fakescheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1/fake"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
|
|
@ -68,12 +68,12 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
|||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// ScheduledworkflowV1alpha1 retrieves the ScheduledworkflowV1alpha1Client
|
||||
func (c *Clientset) ScheduledworkflowV1alpha1() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface {
|
||||
return &fakescheduledworkflowv1alpha1.FakeScheduledworkflowV1alpha1{Fake: &c.Fake}
|
||||
// ScheduledworkflowV1beta1 retrieves the ScheduledworkflowV1beta1Client
|
||||
func (c *Clientset) ScheduledworkflowV1beta1() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return &fakescheduledworkflowv1beta1.FakeScheduledworkflowV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Scheduledworkflow retrieves the ScheduledworkflowV1alpha1Client
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1alpha1.ScheduledworkflowV1alpha1Interface {
|
||||
return &fakescheduledworkflowv1alpha1.FakeScheduledworkflowV1alpha1{Fake: &c.Fake}
|
||||
// Scheduledworkflow retrieves the ScheduledworkflowV1beta1Client
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return &fakescheduledworkflowv1beta1.FakeScheduledworkflowV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package fake
|
||||
|
||||
import (
|
||||
scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
@ -47,5 +47,5 @@ func init() {
|
|||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
scheduledworkflowv1alpha1.AddToScheme(scheme)
|
||||
scheduledworkflowv1beta1.AddToScheme(scheme)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ go_library(
|
|||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package scheme
|
||||
|
||||
import (
|
||||
scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
@ -47,5 +47,5 @@ func init() {
|
|||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
scheduledworkflowv1alpha1.AddToScheme(scheme)
|
||||
scheduledworkflowv1beta1.AddToScheme(scheme)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ go_library(
|
|||
"scheduledworkflow.go",
|
||||
"scheduledworkflow_client.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/scheme:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime/serializer:go_default_library",
|
||||
|
|
@ -14,4 +14,4 @@
|
|||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
|
@ -7,11 +7,11 @@ go_library(
|
|||
"fake_scheduledworkflow.go",
|
||||
"fake_scheduledworkflow_client.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1/fake",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/labels:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
@ -27,29 +27,29 @@ import (
|
|||
|
||||
// FakeScheduledWorkflows implements ScheduledWorkflowInterface
|
||||
type FakeScheduledWorkflows struct {
|
||||
Fake *FakeScheduledworkflowV1alpha1
|
||||
Fake *FakeScheduledworkflowV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var scheduledworkflowsResource = schema.GroupVersionResource{Group: "scheduledworkflow.kubeflow.org", Version: "v1alpha1", Resource: "scheduledworkflows"}
|
||||
var scheduledworkflowsResource = schema.GroupVersionResource{Group: "scheduledworkflow.kubeflow.org", Version: "v1beta1", Resource: "scheduledworkflows"}
|
||||
|
||||
var scheduledworkflowsKind = schema.GroupVersionKind{Group: "scheduledworkflow.kubeflow.org", Version: "v1alpha1", Kind: "ScheduledWorkflow"}
|
||||
var scheduledworkflowsKind = schema.GroupVersionKind{Group: "scheduledworkflow.kubeflow.org", Version: "v1beta1", Kind: "ScheduledWorkflow"}
|
||||
|
||||
// Get takes name of the scheduledWorkflow, and returns the corresponding scheduledWorkflow object, and an error if there is any.
|
||||
func (c *FakeScheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (c *FakeScheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(scheduledworkflowsResource, c.ns, name), &v1alpha1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewGetAction(scheduledworkflowsResource, c.ns, name), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScheduledWorkflow), err
|
||||
return obj.(*v1beta1.ScheduledWorkflow), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ScheduledWorkflows that match those selectors.
|
||||
func (c *FakeScheduledWorkflows) List(opts v1.ListOptions) (result *v1alpha1.ScheduledWorkflowList, err error) {
|
||||
func (c *FakeScheduledWorkflows) List(opts v1.ListOptions) (result *v1beta1.ScheduledWorkflowList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(scheduledworkflowsResource, scheduledworkflowsKind, c.ns, opts), &v1alpha1.ScheduledWorkflowList{})
|
||||
Invokes(testing.NewListAction(scheduledworkflowsResource, scheduledworkflowsKind, c.ns, opts), &v1beta1.ScheduledWorkflowList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
@ -59,8 +59,8 @@ func (c *FakeScheduledWorkflows) List(opts v1.ListOptions) (result *v1alpha1.Sch
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ScheduledWorkflowList{ListMeta: obj.(*v1alpha1.ScheduledWorkflowList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ScheduledWorkflowList).Items {
|
||||
list := &v1beta1.ScheduledWorkflowList{ListMeta: obj.(*v1beta1.ScheduledWorkflowList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.ScheduledWorkflowList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
|
@ -76,31 +76,31 @@ func (c *FakeScheduledWorkflows) Watch(opts v1.ListOptions) (watch.Interface, er
|
|||
}
|
||||
|
||||
// Create takes the representation of a scheduledWorkflow and creates it. Returns the server's representation of the scheduledWorkflow, and an error, if there is any.
|
||||
func (c *FakeScheduledWorkflows) Create(scheduledWorkflow *v1alpha1.ScheduledWorkflow) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (c *FakeScheduledWorkflows) Create(scheduledWorkflow *v1beta1.ScheduledWorkflow) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(scheduledworkflowsResource, c.ns, scheduledWorkflow), &v1alpha1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewCreateAction(scheduledworkflowsResource, c.ns, scheduledWorkflow), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScheduledWorkflow), err
|
||||
return obj.(*v1beta1.ScheduledWorkflow), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a scheduledWorkflow and updates it. Returns the server's representation of the scheduledWorkflow, and an error, if there is any.
|
||||
func (c *FakeScheduledWorkflows) Update(scheduledWorkflow *v1alpha1.ScheduledWorkflow) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (c *FakeScheduledWorkflows) Update(scheduledWorkflow *v1beta1.ScheduledWorkflow) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(scheduledworkflowsResource, c.ns, scheduledWorkflow), &v1alpha1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewUpdateAction(scheduledworkflowsResource, c.ns, scheduledWorkflow), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScheduledWorkflow), err
|
||||
return obj.(*v1beta1.ScheduledWorkflow), err
|
||||
}
|
||||
|
||||
// Delete takes name of the scheduledWorkflow and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeScheduledWorkflows) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(scheduledworkflowsResource, c.ns, name), &v1alpha1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewDeleteAction(scheduledworkflowsResource, c.ns, name), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
@ -109,17 +109,17 @@ func (c *FakeScheduledWorkflows) Delete(name string, options *v1.DeleteOptions)
|
|||
func (c *FakeScheduledWorkflows) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(scheduledworkflowsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ScheduledWorkflowList{})
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ScheduledWorkflowList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched scheduledWorkflow.
|
||||
func (c *FakeScheduledWorkflows) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (c *FakeScheduledWorkflows) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(scheduledworkflowsResource, c.ns, name, data, subresources...), &v1alpha1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewPatchSubresourceAction(scheduledworkflowsResource, c.ns, name, data, subresources...), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScheduledWorkflow), err
|
||||
return obj.(*v1beta1.ScheduledWorkflow), err
|
||||
}
|
||||
|
|
@ -16,22 +16,22 @@
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeScheduledworkflowV1alpha1 struct {
|
||||
type FakeScheduledworkflowV1beta1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeScheduledworkflowV1alpha1) ScheduledWorkflows(namespace string) v1alpha1.ScheduledWorkflowInterface {
|
||||
func (c *FakeScheduledworkflowV1beta1) ScheduledWorkflows(namespace string) v1beta1.ScheduledWorkflowInterface {
|
||||
return &FakeScheduledWorkflows{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeScheduledworkflowV1alpha1) RESTClient() rest.Interface {
|
||||
func (c *FakeScheduledworkflowV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
@ -13,6 +13,6 @@
|
|||
// limitations under the License.
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
type ScheduledWorkflowExpansion interface{}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
// limitations under the License.
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
scheme "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
|
|
@ -32,14 +32,14 @@ type ScheduledWorkflowsGetter interface {
|
|||
|
||||
// ScheduledWorkflowInterface has methods to work with ScheduledWorkflow resources.
|
||||
type ScheduledWorkflowInterface interface {
|
||||
Create(*v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error)
|
||||
Update(*v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error)
|
||||
Create(*v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error)
|
||||
Update(*v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.ScheduledWorkflow, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.ScheduledWorkflowList, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.ScheduledWorkflow, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.ScheduledWorkflowList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error)
|
||||
ScheduledWorkflowExpansion
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ type scheduledWorkflows struct {
|
|||
}
|
||||
|
||||
// newScheduledWorkflows returns a ScheduledWorkflows
|
||||
func newScheduledWorkflows(c *ScheduledworkflowV1alpha1Client, namespace string) *scheduledWorkflows {
|
||||
func newScheduledWorkflows(c *ScheduledworkflowV1beta1Client, namespace string) *scheduledWorkflows {
|
||||
return &scheduledWorkflows{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
|
|
@ -58,8 +58,8 @@ func newScheduledWorkflows(c *ScheduledworkflowV1alpha1Client, namespace string)
|
|||
}
|
||||
|
||||
// Get takes name of the scheduledWorkflow, and returns the corresponding scheduledWorkflow object, and an error if there is any.
|
||||
func (c *scheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
result = &v1alpha1.ScheduledWorkflow{}
|
||||
func (c *scheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
result = &v1beta1.ScheduledWorkflow{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
|
|
@ -71,8 +71,8 @@ func (c *scheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ScheduledWorkflows that match those selectors.
|
||||
func (c *scheduledWorkflows) List(opts v1.ListOptions) (result *v1alpha1.ScheduledWorkflowList, err error) {
|
||||
result = &v1alpha1.ScheduledWorkflowList{}
|
||||
func (c *scheduledWorkflows) List(opts v1.ListOptions) (result *v1beta1.ScheduledWorkflowList, err error) {
|
||||
result = &v1beta1.ScheduledWorkflowList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
|
|
@ -93,8 +93,8 @@ func (c *scheduledWorkflows) Watch(opts v1.ListOptions) (watch.Interface, error)
|
|||
}
|
||||
|
||||
// Create takes the representation of a scheduledWorkflow and creates it. Returns the server's representation of the scheduledWorkflow, and an error, if there is any.
|
||||
func (c *scheduledWorkflows) Create(scheduledWorkflow *v1alpha1.ScheduledWorkflow) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
result = &v1alpha1.ScheduledWorkflow{}
|
||||
func (c *scheduledWorkflows) Create(scheduledWorkflow *v1beta1.ScheduledWorkflow) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
result = &v1beta1.ScheduledWorkflow{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
|
|
@ -105,8 +105,8 @@ func (c *scheduledWorkflows) Create(scheduledWorkflow *v1alpha1.ScheduledWorkflo
|
|||
}
|
||||
|
||||
// Update takes the representation of a scheduledWorkflow and updates it. Returns the server's representation of the scheduledWorkflow, and an error, if there is any.
|
||||
func (c *scheduledWorkflows) Update(scheduledWorkflow *v1alpha1.ScheduledWorkflow) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
result = &v1alpha1.ScheduledWorkflow{}
|
||||
func (c *scheduledWorkflows) Update(scheduledWorkflow *v1beta1.ScheduledWorkflow) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
result = &v1beta1.ScheduledWorkflow{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
|
|
@ -140,8 +140,8 @@ func (c *scheduledWorkflows) DeleteCollection(options *v1.DeleteOptions, listOpt
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched scheduledWorkflow.
|
||||
func (c *scheduledWorkflows) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
|
||||
result = &v1alpha1.ScheduledWorkflow{}
|
||||
func (c *scheduledWorkflows) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
result = &v1beta1.ScheduledWorkflow{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
|
|
@ -13,31 +13,31 @@
|
|||
// limitations under the License.
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type ScheduledworkflowV1alpha1Interface interface {
|
||||
type ScheduledworkflowV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ScheduledWorkflowsGetter
|
||||
}
|
||||
|
||||
// ScheduledworkflowV1alpha1Client is used to interact with features provided by the scheduledworkflow.kubeflow.org group.
|
||||
type ScheduledworkflowV1alpha1Client struct {
|
||||
// ScheduledworkflowV1beta1Client is used to interact with features provided by the scheduledworkflow.kubeflow.org group.
|
||||
type ScheduledworkflowV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ScheduledworkflowV1alpha1Client) ScheduledWorkflows(namespace string) ScheduledWorkflowInterface {
|
||||
func (c *ScheduledworkflowV1beta1Client) ScheduledWorkflows(namespace string) ScheduledWorkflowInterface {
|
||||
return newScheduledWorkflows(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ScheduledworkflowV1alpha1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ScheduledworkflowV1alpha1Client, error) {
|
||||
// NewForConfig creates a new ScheduledworkflowV1beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ScheduledworkflowV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -46,12 +46,12 @@ func NewForConfig(c *rest.Config) (*ScheduledworkflowV1alpha1Client, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ScheduledworkflowV1alpha1Client{client}, nil
|
||||
return &ScheduledworkflowV1beta1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ScheduledworkflowV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new ScheduledworkflowV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ScheduledworkflowV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *ScheduledworkflowV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -59,13 +59,13 @@ func NewForConfigOrDie(c *rest.Config) *ScheduledworkflowV1alpha1Client {
|
|||
return client
|
||||
}
|
||||
|
||||
// New creates a new ScheduledworkflowV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ScheduledworkflowV1alpha1Client {
|
||||
return &ScheduledworkflowV1alpha1Client{c}
|
||||
// New creates a new ScheduledworkflowV1beta1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ScheduledworkflowV1beta1Client {
|
||||
return &ScheduledworkflowV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
|
|
@ -79,7 +79,7 @@ func setConfigDefaults(config *rest.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *ScheduledworkflowV1alpha1Client) RESTClient() rest.Interface {
|
||||
func (c *ScheduledworkflowV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ go_library(
|
|||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow:go_default_library",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ package externalversions
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
|
@ -49,9 +49,9 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
|||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=scheduledworkflow.kubeflow.org, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("scheduledworkflows"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduledworkflow().V1alpha1().ScheduledWorkflows().Informer()}, nil
|
||||
// Group=scheduledworkflow.kubeflow.org, Version=v1beta1
|
||||
case v1beta1.SchemeGroupVersion.WithResource("scheduledworkflows"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduledworkflow().V1beta1().ScheduledWorkflows().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1:go_default_library",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ package scheduledworkflow
|
|||
|
||||
import (
|
||||
internalinterfaces "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
|
|
@ -37,7 +37,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ go_library(
|
|||
"interface.go",
|
||||
"scheduledworkflow.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
|
||||
"//backend/src/crd/pkg/client/informers/externalversions/internalinterfaces:go_default_library",
|
||||
"//backend/src/crd/pkg/client/listers/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/client/listers/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/watch:go_default_library",
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
// limitations under the License.
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/internalinterfaces"
|
||||
|
|
@ -13,15 +13,15 @@
|
|||
// limitations under the License.
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
versioned "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/listers/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/listers/scheduledworkflow/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -32,7 +32,7 @@ import (
|
|||
// ScheduledWorkflows.
|
||||
type ScheduledWorkflowInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ScheduledWorkflowLister
|
||||
Lister() v1beta1.ScheduledWorkflowLister
|
||||
}
|
||||
|
||||
type scheduledWorkflowInformer struct {
|
||||
|
|
@ -58,16 +58,16 @@ func NewFilteredScheduledWorkflowInformer(client versioned.Interface, namespace
|
|||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace).List(options)
|
||||
return client.ScheduledworkflowV1beta1().ScheduledWorkflows(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace).Watch(options)
|
||||
return client.ScheduledworkflowV1beta1().ScheduledWorkflows(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&scheduledworkflowv1alpha1.ScheduledWorkflow{},
|
||||
&scheduledworkflowv1beta1.ScheduledWorkflow{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
|
|
@ -78,9 +78,9 @@ func (f *scheduledWorkflowInformer) defaultInformer(client versioned.Interface,
|
|||
}
|
||||
|
||||
func (f *scheduledWorkflowInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&scheduledworkflowv1alpha1.ScheduledWorkflow{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&scheduledworkflowv1beta1.ScheduledWorkflow{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *scheduledWorkflowInformer) Lister() v1alpha1.ScheduledWorkflowLister {
|
||||
return v1alpha1.NewScheduledWorkflowLister(f.Informer().GetIndexer())
|
||||
func (f *scheduledWorkflowInformer) Lister() v1beta1.ScheduledWorkflowLister {
|
||||
return v1beta1.NewScheduledWorkflowLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
|
@ -6,10 +6,10 @@ go_library(
|
|||
"expansion_generated.go",
|
||||
"scheduledworkflow.go",
|
||||
],
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/listers/scheduledworkflow/v1alpha1",
|
||||
importpath = "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/listers/scheduledworkflow/v1beta1",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
|
||||
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/api/errors:go_default_library",
|
||||
"@io_k8s_apimachinery//pkg/labels:go_default_library",
|
||||
"@io_k8s_client_go//tools/cache:go_default_library",
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
// limitations under the License.
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
// ScheduledWorkflowListerExpansion allows custom methods to be added to
|
||||
// ScheduledWorkflowLister.
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
// limitations under the License.
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
|
@ -25,7 +25,7 @@ import (
|
|||
// ScheduledWorkflowLister helps list ScheduledWorkflows.
|
||||
type ScheduledWorkflowLister interface {
|
||||
// List lists all ScheduledWorkflows in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ScheduledWorkflow, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.ScheduledWorkflow, err error)
|
||||
// ScheduledWorkflows returns an object that can list and get ScheduledWorkflows.
|
||||
ScheduledWorkflows(namespace string) ScheduledWorkflowNamespaceLister
|
||||
ScheduledWorkflowListerExpansion
|
||||
|
|
@ -42,9 +42,9 @@ func NewScheduledWorkflowLister(indexer cache.Indexer) ScheduledWorkflowLister {
|
|||
}
|
||||
|
||||
// List lists all ScheduledWorkflows in the indexer.
|
||||
func (s *scheduledWorkflowLister) List(selector labels.Selector) (ret []*v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (s *scheduledWorkflowLister) List(selector labels.Selector) (ret []*v1beta1.ScheduledWorkflow, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.ScheduledWorkflow))
|
||||
ret = append(ret, m.(*v1beta1.ScheduledWorkflow))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
|
@ -57,9 +57,9 @@ func (s *scheduledWorkflowLister) ScheduledWorkflows(namespace string) Scheduled
|
|||
// ScheduledWorkflowNamespaceLister helps list and get ScheduledWorkflows.
|
||||
type ScheduledWorkflowNamespaceLister interface {
|
||||
// List lists all ScheduledWorkflows in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.ScheduledWorkflow, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.ScheduledWorkflow, err error)
|
||||
// Get retrieves the ScheduledWorkflow from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha1.ScheduledWorkflow, error)
|
||||
Get(name string) (*v1beta1.ScheduledWorkflow, error)
|
||||
ScheduledWorkflowNamespaceListerExpansion
|
||||
}
|
||||
|
||||
|
|
@ -71,21 +71,21 @@ type scheduledWorkflowNamespaceLister struct {
|
|||
}
|
||||
|
||||
// List lists all ScheduledWorkflows in the indexer for a given namespace.
|
||||
func (s scheduledWorkflowNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ScheduledWorkflow, err error) {
|
||||
func (s scheduledWorkflowNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ScheduledWorkflow, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.ScheduledWorkflow))
|
||||
ret = append(ret, m.(*v1beta1.ScheduledWorkflow))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ScheduledWorkflow from the indexer for a given namespace and name.
|
||||
func (s scheduledWorkflowNamespaceLister) Get(name string) (*v1alpha1.ScheduledWorkflow, error) {
|
||||
func (s scheduledWorkflowNamespaceLister) Get(name string) (*v1beta1.ScheduledWorkflow, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("scheduledworkflow"), name)
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("scheduledworkflow"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.ScheduledWorkflow), nil
|
||||
return obj.(*v1beta1.ScheduledWorkflow), nil
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: concurrency
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: every-minute-cron
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: every-minute-periodic
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: invalid
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: no-history
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: "kubeflow.org/v1alpha1"
|
||||
apiVersion: "kubeflow.org/v1beta1"
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: parameterized
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: single-run
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: start-end-cron
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: kubeflow.org/v1alpha1
|
||||
apiVersion: kubeflow.org/v1beta1
|
||||
kind: ScheduledWorkflow
|
||||
metadata:
|
||||
name: start-end-periodic
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# This sample launches a viewer instance on Tensorboard, pointing to Tensorflow
|
||||
# output from training the standard MNIST model located at
|
||||
# gs://ml-pipeline-playground/mnist
|
||||
apiVersion: "kubeflow.org/v1alpha1"
|
||||
apiVersion: "kubeflow.org/v1beta1"
|
||||
kind: Viewer
|
||||
metadata:
|
||||
generateName: viewer-
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue