From 8aeb0e3c85aeb9dbca2692fcffd455209f53b152 Mon Sep 17 00:00:00 2001 From: Pascal Vicaire <25757005+vicaire@users.noreply.github.com> Date: Tue, 10 Jul 2018 20:20:10 -0700 Subject: [PATCH] Adding the scheduledworkflow CRD to the pipeline repository. --- .gitignore | 11 - Dockerfile | 15 - Gopkg.lock | 539 ------------------ Gopkg.toml | 35 -- Makefile | 7 - OWNERS | 6 - README.md | 22 +- .../scheduledworkflow/client/kube_client.go | 3 +- .../scheduledworkflow/client/swf_client.go | 6 +- .../client/workflow_client.go | 7 +- .../client/workflow_client_test.go | 9 +- .../scheduledworkflow/controller.go | 17 +- .../scheduledworkflow/main.go | 11 +- .../scheduledworkflow/util/constants.go | 12 +- .../scheduledworkflow/util/convert.go | 0 .../scheduledworkflow/util/cron_schedule.go | 7 +- .../util/cron_schedule_test.go | 7 +- .../scheduledworkflow/util/error.go | 0 .../scheduledworkflow/util/error_test.go | 0 .../scheduledworkflow/util/label.go | 0 .../scheduledworkflow/util/label_test.go | 0 .../util/parameter_formatter.go | 0 .../util/parameter_formatter_test.go | 0 .../util/periodic_schedule.go | 5 +- .../util/periodic_schedule_test.go | 7 +- .../util/scheduled_workflow.go | 9 +- .../util/scheduled_workflow_test.go | 15 +- .../scheduledworkflow/util/time_interface.go | 0 .../scheduledworkflow/util/workflow.go | 4 +- .../scheduledworkflow/util/workflow_test.go | 5 +- hack/custom-boilerplate.go.txt | 4 +- hack/update-codegen.sh | 8 +- .../v1alpha1/zz_generated.deepcopy.go | 96 +--- pkg/client/clientset/versioned/clientset.go | 6 +- pkg/client/clientset/versioned/doc.go | 4 +- .../versioned/fake/clientset_generated.go | 10 +- pkg/client/clientset/versioned/fake/doc.go | 4 +- .../clientset/versioned/fake/register.go | 22 +- pkg/client/clientset/versioned/scheme/doc.go | 4 +- .../clientset/versioned/scheme/register.go | 22 +- .../typed/scheduledworkflow/v1alpha1/doc.go | 4 +- .../scheduledworkflow/v1alpha1/fake/doc.go | 4 +- .../v1alpha1/fake/fake_scheduledworkflow.go | 6 +- .../fake/fake_scheduledworkflow_client.go | 6 +- .../v1alpha1/generated_expansion.go | 4 +- .../v1alpha1/scheduledworkflow.go | 8 +- .../v1alpha1/scheduledworkflow_client.go | 8 +- .../informers/externalversions/factory.go | 10 +- .../informers/externalversions/generic.go | 6 +- .../internalinterfaces/factory_interfaces.go | 6 +- .../scheduledworkflow/interface.go | 8 +- .../scheduledworkflow/v1alpha1/interface.go | 6 +- .../v1alpha1/scheduledworkflow.go | 16 +- .../v1alpha1/expansion_generated.go | 4 +- .../v1alpha1/scheduledworkflow.go | 6 +- prow_config.yaml | 1 - .../scheduledworkflow}/concurrency.yaml | 0 .../scheduledworkflow}/every-minute-cron.yaml | 0 .../every-minute-periodic.yaml | 0 .../scheduledworkflow}/invalid.yaml | 0 .../scheduledworkflow}/no-history.yaml | 0 .../scheduledworkflow}/parameterized.yaml | 0 .../scheduledworkflow}/single-run.yaml | 0 .../scheduledworkflow}/start-end-cron.yaml | 0 .../start-end-periodic.yaml | 0 65 files changed, 202 insertions(+), 840 deletions(-) delete mode 100644 .gitignore delete mode 100644 Dockerfile delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml delete mode 100644 Makefile delete mode 100644 OWNERS rename {resources => controller}/scheduledworkflow/client/kube_client.go (96%) rename {resources => controller}/scheduledworkflow/client/swf_client.go (89%) rename {resources => controller}/scheduledworkflow/client/workflow_client.go (97%) rename {resources => controller}/scheduledworkflow/client/workflow_client_test.go (97%) rename {resources => controller}/scheduledworkflow/controller.go (97%) rename {resources => controller}/scheduledworkflow/main.go (90%) rename {resources => controller}/scheduledworkflow/util/constants.go (78%) rename {resources => controller}/scheduledworkflow/util/convert.go (100%) rename {resources => controller}/scheduledworkflow/util/cron_schedule.go (96%) rename {resources => controller}/scheduledworkflow/util/cron_schedule_test.go (97%) rename {resources => controller}/scheduledworkflow/util/error.go (100%) rename {resources => controller}/scheduledworkflow/util/error_test.go (100%) rename {resources => controller}/scheduledworkflow/util/label.go (100%) rename {resources => controller}/scheduledworkflow/util/label_test.go (100%) rename {resources => controller}/scheduledworkflow/util/parameter_formatter.go (100%) rename {resources => controller}/scheduledworkflow/util/parameter_formatter_test.go (100%) rename {resources => controller}/scheduledworkflow/util/periodic_schedule.go (96%) rename {resources => controller}/scheduledworkflow/util/periodic_schedule_test.go (97%) rename {resources => controller}/scheduledworkflow/util/scheduled_workflow.go (99%) rename {resources => controller}/scheduledworkflow/util/scheduled_workflow_test.go (98%) rename {resources => controller}/scheduledworkflow/util/time_interface.go (100%) rename {resources => controller}/scheduledworkflow/util/workflow.go (94%) rename {resources => controller}/scheduledworkflow/util/workflow_test.go (98%) delete mode 100644 prow_config.yaml rename {example => samples/scheduledworkflow}/concurrency.yaml (100%) rename {example => samples/scheduledworkflow}/every-minute-cron.yaml (100%) rename {example => samples/scheduledworkflow}/every-minute-periodic.yaml (100%) rename {example => samples/scheduledworkflow}/invalid.yaml (100%) rename {example => samples/scheduledworkflow}/no-history.yaml (100%) rename {example => samples/scheduledworkflow}/parameterized.yaml (100%) rename {example => samples/scheduledworkflow}/single-run.yaml (100%) rename {example => samples/scheduledworkflow}/start-end-cron.yaml (100%) rename {example => samples/scheduledworkflow}/start-end-periodic.yaml (100%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4cb9b3e62c2..00000000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# IDE -.idea/ - -# Vendor -vendor/ - -# Merge files -*.orig - -# Bin -bin/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ea65160986e..00000000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM golang:1.10.2-alpine3.7 AS builder - -RUN apk add --no-cache git -RUN go get github.com/golang/dep/cmd/dep - -WORKDIR /go/src/github.com/kubeflow/pipelines/ -COPY . . - -RUN dep ensure -vendor-only -v -RUN go build -o /bin/controller ./resources/scheduledworkflow/*.go - -FROM alpine:3.7 -COPY --from=builder /bin/controller /bin/controller - -CMD ["/bin/controller"] diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 0655c35024e..00000000000 --- a/Gopkg.lock +++ /dev/null @@ -1,539 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "cloud.google.com/go" - packages = ["compute/metadata"] - revision = "0fd7230b2a7505833d5f69b75cbd6c9582401479" - version = "v0.23.0" - -[[projects]] - name = "github.com/PuerkitoBio/purell" - packages = ["."] - revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/PuerkitoBio/urlesc" - packages = ["."] - revision = "de5bf2ad457846296e2031421a34e2568e304e35" - -[[projects]] - name = "github.com/argoproj/argo" - packages = [ - "errors", - "pkg/apis/workflow", - "pkg/apis/workflow/v1alpha1", - "pkg/client/clientset/versioned", - "pkg/client/clientset/versioned/scheme", - "pkg/client/clientset/versioned/typed/workflow/v1alpha1", - "pkg/client/informers/externalversions", - "pkg/client/informers/externalversions/internalinterfaces", - "pkg/client/informers/externalversions/workflow", - "pkg/client/informers/externalversions/workflow/v1alpha1", - "pkg/client/listers/workflow/v1alpha1", - "util/retry", - "workflow/common" - ] - revision = "9379638189cc194f1b34ff7295f0832eac1c1651" - version = "v2.1.0" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/docker/spdystream" - packages = [ - ".", - "spdy" - ] - revision = "bc6354cbbc295e925e4c611ffe90c1f287ee54db" - -[[projects]] - name = "github.com/emicklei/go-restful" - packages = [ - ".", - "log" - ] - revision = "3658237ded108b4134956c1b3050349d93e7b895" - version = "v2.7.1" - -[[projects]] - name = "github.com/ghodss/yaml" - packages = ["."] - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/jsonpointer" - packages = ["."] - revision = "3a0015ad55fa9873f41605d3e8f28cd279c32ab2" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/jsonreference" - packages = ["."] - revision = "3fb327e6747da3043567ee86abd02bb6376b6be2" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/spec" - packages = ["."] - revision = "bcff419492eeeb01f76e77d2ebc714dc97b607f5" - -[[projects]] - branch = "master" - name = "github.com/go-openapi/swag" - packages = ["."] - revision = "811b1089cde9dad18d4d0c2d09fbdbf28dbd27a5" - -[[projects]] - name = "github.com/gogo/protobuf" - packages = [ - "proto", - "sortkeys" - ] - revision = "1adfc126b41513cc696b209667c8656ea7aac67c" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/golang/glog" - packages = ["."] - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - branch = "master" - name = "github.com/golang/groupcache" - packages = ["lru"] - revision = "24b0969c4cb722950103eed87108c8d291a8df00" - -[[projects]] - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp" - ] - revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/google/btree" - packages = ["."] - revision = "e89373fe6b4a7413d7acd6da1725b83ef713e6e4" - -[[projects]] - branch = "master" - name = "github.com/google/gofuzz" - packages = ["."] - revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" - -[[projects]] - name = "github.com/googleapis/gnostic" - packages = [ - "OpenAPIv2", - "compiler", - "extensions" - ] - revision = "7c663266750e7d82587642f65e60bc4083f1f84e" - version = "v0.2.0" - -[[projects]] - branch = "master" - name = "github.com/gregjones/httpcache" - packages = [ - ".", - "diskcache" - ] - revision = "9cad4c3443a7200dd6400aef47183728de563a38" - -[[projects]] - branch = "master" - name = "github.com/hashicorp/golang-lru" - packages = [ - ".", - "simplelru" - ] - revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3" - -[[projects]] - branch = "master" - name = "github.com/howeyc/gopass" - packages = ["."] - revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" - -[[projects]] - name = "github.com/imdario/mergo" - packages = ["."] - revision = "9d5f1277e9a8ed20c3684bda8fde67c05628518c" - version = "v0.3.4" - -[[projects]] - name = "github.com/json-iterator/go" - packages = ["."] - revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4" - version = "1.1.3" - -[[projects]] - name = "github.com/juju/ratelimit" - packages = ["."] - revision = "59fac5042749a5afb9af70e813da1dd5474f0167" - version = "1.0.1" - -[[projects]] - branch = "master" - name = "github.com/mailru/easyjson" - packages = [ - "buffer", - "jlexer", - "jwriter" - ] - revision = "9825584555aa620c53c265d4a09ace0df1346fd9" - -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - name = "github.com/modern-go/reflect2" - packages = ["."] - revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" - version = "1.0.0" - -[[projects]] - branch = "master" - name = "github.com/petar/GoLLRB" - packages = ["llrb"] - revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" - -[[projects]] - name = "github.com/peterbourgon/diskv" - packages = ["."] - revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" - version = "v2.0.1" - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/robfig/cron" - packages = ["."] - revision = "b41be1df696709bb6395fe435af20370037c0b4c" - version = "v1.1" - -[[projects]] - name = "github.com/sirupsen/logrus" - packages = ["."] - revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc" - version = "v1.0.5" - -[[projects]] - name = "github.com/spf13/pflag" - packages = ["."] - revision = "583c0c0531f06d5278b7d917446061adc344b5cd" - version = "v1.0.1" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" - -[[projects]] - branch = "master" - name = "github.com/valyala/bytebufferpool" - packages = ["."] - revision = "e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7" - -[[projects]] - branch = "master" - name = "github.com/valyala/fasttemplate" - packages = ["."] - revision = "dcecefd839c4193db0d35b88ec65b4c12d360ab0" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - revision = "b47b1587369238182299fe4dad77d05b8b461e06" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - "http/httpguts", - "http2", - "http2/hpack", - "idna" - ] - revision = "1e491301e022f8f977054da4c2d852decd59571f" - -[[projects]] - branch = "master" - name = "golang.org/x/oauth2" - packages = [ - ".", - "google", - "internal", - "jws", - "jwt" - ] - revision = "1e0a3fa8ba9a5c9eb35c271780101fdaf1b205d7" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows" - ] - revision = "c11f84a56e43e20a78cee75a7c034031ecf57d1f" - -[[projects]] - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - "width" - ] - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - name = "google.golang.org/appengine" - packages = [ - ".", - "internal", - "internal/app_identity", - "internal/base", - "internal/datastore", - "internal/log", - "internal/modules", - "internal/remote_api", - "internal/urlfetch", - "urlfetch" - ] - revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" - version = "v1.0.0" - -[[projects]] - name = "gopkg.in/inf.v0" - packages = ["."] - revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" - version = "v0.9.1" - -[[projects]] - name = "gopkg.in/yaml.v2" - packages = ["."] - revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" - version = "v2.2.1" - -[[projects]] - branch = "release-1.9" - name = "k8s.io/api" - packages = [ - "admissionregistration/v1alpha1", - "admissionregistration/v1beta1", - "apps/v1", - "apps/v1beta1", - "apps/v1beta2", - "authentication/v1", - "authentication/v1beta1", - "authorization/v1", - "authorization/v1beta1", - "autoscaling/v1", - "autoscaling/v2beta1", - "batch/v1", - "batch/v1beta1", - "batch/v2alpha1", - "certificates/v1beta1", - "core/v1", - "events/v1beta1", - "extensions/v1beta1", - "networking/v1", - "policy/v1beta1", - "rbac/v1", - "rbac/v1alpha1", - "rbac/v1beta1", - "scheduling/v1alpha1", - "settings/v1alpha1", - "storage/v1", - "storage/v1alpha1", - "storage/v1beta1" - ] - revision = "9273ee02527c608cecc74969b3e489f5dba686da" - -[[projects]] - branch = "release-1.9" - name = "k8s.io/apimachinery" - packages = [ - "pkg/api/errors", - "pkg/api/meta", - "pkg/api/resource", - "pkg/apis/meta/internalversion", - "pkg/apis/meta/v1", - "pkg/apis/meta/v1/unstructured", - "pkg/apis/meta/v1alpha1", - "pkg/conversion", - "pkg/conversion/queryparams", - "pkg/fields", - "pkg/labels", - "pkg/runtime", - "pkg/runtime/schema", - "pkg/runtime/serializer", - "pkg/runtime/serializer/json", - "pkg/runtime/serializer/protobuf", - "pkg/runtime/serializer/recognizer", - "pkg/runtime/serializer/streaming", - "pkg/runtime/serializer/versioning", - "pkg/selection", - "pkg/types", - "pkg/util/cache", - "pkg/util/clock", - "pkg/util/diff", - "pkg/util/errors", - "pkg/util/framer", - "pkg/util/httpstream", - "pkg/util/httpstream/spdy", - "pkg/util/intstr", - "pkg/util/json", - "pkg/util/mergepatch", - "pkg/util/net", - "pkg/util/remotecommand", - "pkg/util/runtime", - "pkg/util/sets", - "pkg/util/strategicpatch", - "pkg/util/validation", - "pkg/util/validation/field", - "pkg/util/wait", - "pkg/util/yaml", - "pkg/version", - "pkg/watch", - "third_party/forked/golang/json", - "third_party/forked/golang/netutil", - "third_party/forked/golang/reflect" - ] - revision = "21efb2924c7cf1920f76af05b1fd6a325bf46dfc" - -[[projects]] - branch = "release-6.0" - name = "k8s.io/client-go" - packages = [ - "discovery", - "discovery/fake", - "kubernetes", - "kubernetes/scheme", - "kubernetes/typed/admissionregistration/v1alpha1", - "kubernetes/typed/admissionregistration/v1beta1", - "kubernetes/typed/apps/v1", - "kubernetes/typed/apps/v1beta1", - "kubernetes/typed/apps/v1beta2", - "kubernetes/typed/authentication/v1", - "kubernetes/typed/authentication/v1beta1", - "kubernetes/typed/authorization/v1", - "kubernetes/typed/authorization/v1beta1", - "kubernetes/typed/autoscaling/v1", - "kubernetes/typed/autoscaling/v2beta1", - "kubernetes/typed/batch/v1", - "kubernetes/typed/batch/v1beta1", - "kubernetes/typed/batch/v2alpha1", - "kubernetes/typed/certificates/v1beta1", - "kubernetes/typed/core/v1", - "kubernetes/typed/events/v1beta1", - "kubernetes/typed/extensions/v1beta1", - "kubernetes/typed/networking/v1", - "kubernetes/typed/policy/v1beta1", - "kubernetes/typed/rbac/v1", - "kubernetes/typed/rbac/v1alpha1", - "kubernetes/typed/rbac/v1beta1", - "kubernetes/typed/scheduling/v1alpha1", - "kubernetes/typed/settings/v1alpha1", - "kubernetes/typed/storage/v1", - "kubernetes/typed/storage/v1alpha1", - "kubernetes/typed/storage/v1beta1", - "pkg/version", - "plugin/pkg/client/auth/gcp", - "rest", - "rest/watch", - "testing", - "third_party/forked/golang/template", - "tools/auth", - "tools/cache", - "tools/clientcmd", - "tools/clientcmd/api", - "tools/clientcmd/api/latest", - "tools/clientcmd/api/v1", - "tools/metrics", - "tools/pager", - "tools/record", - "tools/reference", - "tools/remotecommand", - "transport", - "transport/spdy", - "util/buffer", - "util/cert", - "util/exec", - "util/flowcontrol", - "util/homedir", - "util/integer", - "util/jsonpath", - "util/workqueue" - ] - revision = "1692bdde78a61f6316cfb6988015bd460067b238" - -[[projects]] - branch = "master" - name = "k8s.io/kube-openapi" - packages = [ - "pkg/common", - "pkg/util/proto" - ] - revision = "8a9b82f00b3a86eac24681da3f9fe6c34c01cea2" - -[[projects]] - name = "k8s.io/kubernetes" - packages = ["pkg/apis/core"] - revision = "2bba0127d85d5a46ab4b778548be28623b32d0b0" - version = "v1.10.3" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "4cd7d782592a9a5abbf214589c767e7ccca736c733215bcd2d0efe222b5e29ce" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 9e6824437db..00000000000 --- a/Gopkg.toml +++ /dev/null @@ -1,35 +0,0 @@ -[[constraint]] - name = "github.com/argoproj/argo" - version = "2.1.0" - -[[constraint]] - name = "github.com/pkg/errors" - version = "0.8.0" - -[[constraint]] - name = "github.com/robfig/cron" - version = "1.1.0" - -[[constraint]] - name = "github.com/sirupsen/logrus" - version = "1.0.5" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.1" - -[[constraint]] - branch = "release-1.9" - name = "k8s.io/api" - -[[constraint]] - branch = "release-1.9" - name = "k8s.io/apimachinery" - -[[constraint]] - branch = "release-6.0" - name = "k8s.io/client-go" - -[[constraint]] - name = "k8s.io/kubernetes" - version = "1.10.3" diff --git a/Makefile b/Makefile deleted file mode 100644 index 0c0de20a3d5..00000000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY: build-controller -build-controller: - go build -o ./bin/controller ./resources/scheduledworkflow - -.PHONY: build-controller-image -build-controller-image: - docker build -t pipelines/scheduledworkflow-controller . diff --git a/OWNERS b/OWNERS deleted file mode 100644 index 9edbc4fc81f..00000000000 --- a/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -approvers: - - vicaire - - jlewi -reviewers: - - vicaire - - jlewi \ No newline at end of file diff --git a/README.md b/README.md index d939bced2ad..cd8b57aa6fa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,20 @@ -# Pipelines +## Scheduled Workflow CRD/controller -This repository provides Custom Resource Definitions and tools for ML pipeline orchestration. +### How to generate the API client code from the API specification? -## Scheduled Workflow CRD/controller +Get the dependencies: + +``` +go get -u ./... +go get -u k8s.io/client-go/... +go get -u k8s.io/code-generator/... +``` + +Generate the API client code from the API specification: + +``` +./hack/update-codegen.sh +``` ### How to run the ScheduledWorkflow controller from the command line? @@ -24,7 +36,7 @@ To run the controller locally, execute: configuration file ``` -go run ./resources/scheduledworkflow/*.go -kubeconfig=$HOME/.kube/config -alsologtostderr=true +go run ./controller/scheduledworkflow/*.go -kubeconfig=$HOME/.kube/config -alsologtostderr=true ``` Output: @@ -38,7 +50,7 @@ Wait for shut down To run a sample workflow on a schedule, execute: ``` -kubectl create -f ./example/every-minute-cron.yaml +kubectl create -f ./samples/scheduledworkflow/every-minute-cron.yaml ``` Output: diff --git a/resources/scheduledworkflow/client/kube_client.go b/controller/scheduledworkflow/client/kube_client.go similarity index 96% rename from resources/scheduledworkflow/client/kube_client.go rename to controller/scheduledworkflow/client/kube_client.go index b29aba7e5ec..6faf105a298 100644 --- a/resources/scheduledworkflow/client/kube_client.go +++ b/controller/scheduledworkflow/client/kube_client.go @@ -16,7 +16,8 @@ package client import ( "fmt" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" diff --git a/resources/scheduledworkflow/client/swf_client.go b/controller/scheduledworkflow/client/swf_client.go similarity index 89% rename from resources/scheduledworkflow/client/swf_client.go rename to controller/scheduledworkflow/client/swf_client.go index 70bf5cca239..14566e072b1 100644 --- a/resources/scheduledworkflow/client/swf_client.go +++ b/controller/scheduledworkflow/client/swf_client.go @@ -15,9 +15,9 @@ package client import ( - swfclientset "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/util" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/util" + swfclientset "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/tools/cache" ) diff --git a/resources/scheduledworkflow/client/workflow_client.go b/controller/scheduledworkflow/client/workflow_client.go similarity index 97% rename from resources/scheduledworkflow/client/workflow_client.go rename to controller/scheduledworkflow/client/workflow_client.go index 5ce1f6d43ee..7e70caa65ed 100644 --- a/resources/scheduledworkflow/client/workflow_client.go +++ b/controller/scheduledworkflow/client/workflow_client.go @@ -15,17 +15,18 @@ package client import ( + "time" + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" workflowclientset "github.com/argoproj/argo/pkg/client/clientset/versioned" "github.com/argoproj/argo/pkg/client/informers/externalversions/workflow/v1alpha1" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/util" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/util" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" wraperror "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/tools/cache" - "time" ) // WorkflowClient is a client to call the Workflow API. diff --git a/resources/scheduledworkflow/client/workflow_client_test.go b/controller/scheduledworkflow/client/workflow_client_test.go similarity index 97% rename from resources/scheduledworkflow/client/workflow_client_test.go rename to controller/scheduledworkflow/client/workflow_client_test.go index 475ea8d18d3..14e3d2d2c3a 100644 --- a/resources/scheduledworkflow/client/workflow_client_test.go +++ b/controller/scheduledworkflow/client/workflow_client_test.go @@ -15,16 +15,17 @@ package client import ( + "testing" + "time" + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" workflowcommon "github.com/argoproj/argo/workflow/common" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/util" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/util" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" - "testing" - "time" ) func TestToWorkflowStatuses(t *testing.T) { diff --git a/resources/scheduledworkflow/controller.go b/controller/scheduledworkflow/controller.go similarity index 97% rename from resources/scheduledworkflow/controller.go rename to controller/scheduledworkflow/controller.go index d780a4c62ba..ca4d2cc0269 100644 --- a/resources/scheduledworkflow/controller.go +++ b/controller/scheduledworkflow/controller.go @@ -16,16 +16,18 @@ package main import ( "fmt" + "time" + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" workflowclientset "github.com/argoproj/argo/pkg/client/clientset/versioned" workflowinformers "github.com/argoproj/argo/pkg/client/informers/externalversions" - swfregister "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - swfclientset "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - swfScheme "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/scheme" - swfinformers "github.com/kubeflow/pipelines/pkg/client/informers/externalversions" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/client" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/util" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/client" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/util" + swfregister "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + swfclientset "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + swfScheme "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/scheme" + swfinformers "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions" wraperror "github.com/pkg/errors" log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" @@ -39,7 +41,6 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" - "time" ) const ( diff --git a/resources/scheduledworkflow/main.go b/controller/scheduledworkflow/main.go similarity index 90% rename from resources/scheduledworkflow/main.go rename to controller/scheduledworkflow/main.go index 41579254a8c..84bf775bf63 100644 --- a/resources/scheduledworkflow/main.go +++ b/controller/scheduledworkflow/main.go @@ -16,17 +16,18 @@ package main import ( "flag" + "time" + workflowclientSet "github.com/argoproj/argo/pkg/client/clientset/versioned" workflowinformers "github.com/argoproj/argo/pkg/client/informers/externalversions" - swfclientset "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - swfinformers "github.com/kubeflow/pipelines/pkg/client/informers/externalversions" - "github.com/kubeflow/pipelines/pkg/signals" - "github.com/kubeflow/pipelines/resources/scheduledworkflow/util" + "github.com/googleprivate/ml/crd/controller/scheduledworkflow/util" + swfclientset "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + swfinformers "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions" + "github.com/googleprivate/ml/crd/pkg/signals" log "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/tools/clientcmd" - "time" ) var ( diff --git a/resources/scheduledworkflow/util/constants.go b/controller/scheduledworkflow/util/constants.go similarity index 78% rename from resources/scheduledworkflow/util/constants.go rename to controller/scheduledworkflow/util/constants.go index a927f10f0ce..55cc1eede13 100644 --- a/resources/scheduledworkflow/util/constants.go +++ b/controller/scheduledworkflow/util/constants.go @@ -15,19 +15,19 @@ package util import ( - constants "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow" + constants "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow" ) const ( // ControllerAgentName is the name of the controller. - ControllerAgentName = "scheduled-workflow-controller" + ControllerAgentName = "scheduled-workflow-controller" // LabelKeyWorkflowEpoch is a label on a Workflow. // It captures the epoch at which the workflow was scheduled. - LabelKeyWorkflowEpoch = constants.FullName + "/workflowEpoch" + LabelKeyWorkflowEpoch = constants.FullName + "/workflowEpoch" // LabelKeyWorkflowIndex is a label on a Workflow. // It captures the index of creation the workflow by the ScheduledWorkflow. - LabelKeyWorkflowIndex = constants.FullName + "/workflowIndex" + LabelKeyWorkflowIndex = constants.FullName + "/workflowIndex" // LabelKeyWorkflowIsOwnedByScheduledWorkflow is a label on a Workflow. // It captures whether the workflow is owned by a ScheduledWorkflow. LabelKeyWorkflowIsOwnedByScheduledWorkflow = constants.FullName + "/isOwnedByScheduledWorkflow" @@ -37,8 +37,8 @@ const ( // LabelKeyScheduledWorkflowEnabled is a label on a ScheduledWorkflow. // It captures whether the ScheduledWorkflow is enabled. - LabelKeyScheduledWorkflowEnabled = constants.FullName + "/enabled" + LabelKeyScheduledWorkflowEnabled = constants.FullName + "/enabled" // LabelKeyScheduledWorkflowStatus is a label on a ScheduledWorkflow. // It captures the status of the scheduled workflow. - LabelKeyScheduledWorkflowStatus = constants.FullName + "/status" + LabelKeyScheduledWorkflowStatus = constants.FullName + "/status" ) diff --git a/resources/scheduledworkflow/util/convert.go b/controller/scheduledworkflow/util/convert.go similarity index 100% rename from resources/scheduledworkflow/util/convert.go rename to controller/scheduledworkflow/util/convert.go diff --git a/resources/scheduledworkflow/util/cron_schedule.go b/controller/scheduledworkflow/util/cron_schedule.go similarity index 96% rename from resources/scheduledworkflow/util/cron_schedule.go rename to controller/scheduledworkflow/util/cron_schedule.go index 9bd43be1d1b..5a65c9ee789 100644 --- a/resources/scheduledworkflow/util/cron_schedule.go +++ b/controller/scheduledworkflow/util/cron_schedule.go @@ -15,12 +15,13 @@ package util import ( - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + "math" + "time" + + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" wraperror "github.com/pkg/errors" "github.com/robfig/cron" log "github.com/sirupsen/logrus" - "math" - "time" ) // CronSchedule is a type to help manipulate CronSchedule objects. diff --git a/resources/scheduledworkflow/util/cron_schedule_test.go b/controller/scheduledworkflow/util/cron_schedule_test.go similarity index 97% rename from resources/scheduledworkflow/util/cron_schedule_test.go rename to controller/scheduledworkflow/util/cron_schedule_test.go index 7e7b107b969..db7dd1bac41 100644 --- a/resources/scheduledworkflow/util/cron_schedule_test.go +++ b/controller/scheduledworkflow/util/cron_schedule_test.go @@ -15,12 +15,13 @@ package util import ( - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/apis/meta/v1" "math" "testing" "time" + + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/apis/meta/v1" ) const ( diff --git a/resources/scheduledworkflow/util/error.go b/controller/scheduledworkflow/util/error.go similarity index 100% rename from resources/scheduledworkflow/util/error.go rename to controller/scheduledworkflow/util/error.go diff --git a/resources/scheduledworkflow/util/error_test.go b/controller/scheduledworkflow/util/error_test.go similarity index 100% rename from resources/scheduledworkflow/util/error_test.go rename to controller/scheduledworkflow/util/error_test.go diff --git a/resources/scheduledworkflow/util/label.go b/controller/scheduledworkflow/util/label.go similarity index 100% rename from resources/scheduledworkflow/util/label.go rename to controller/scheduledworkflow/util/label.go diff --git a/resources/scheduledworkflow/util/label_test.go b/controller/scheduledworkflow/util/label_test.go similarity index 100% rename from resources/scheduledworkflow/util/label_test.go rename to controller/scheduledworkflow/util/label_test.go diff --git a/resources/scheduledworkflow/util/parameter_formatter.go b/controller/scheduledworkflow/util/parameter_formatter.go similarity index 100% rename from resources/scheduledworkflow/util/parameter_formatter.go rename to controller/scheduledworkflow/util/parameter_formatter.go diff --git a/resources/scheduledworkflow/util/parameter_formatter_test.go b/controller/scheduledworkflow/util/parameter_formatter_test.go similarity index 100% rename from resources/scheduledworkflow/util/parameter_formatter_test.go rename to controller/scheduledworkflow/util/parameter_formatter_test.go diff --git a/resources/scheduledworkflow/util/periodic_schedule.go b/controller/scheduledworkflow/util/periodic_schedule.go similarity index 96% rename from resources/scheduledworkflow/util/periodic_schedule.go rename to controller/scheduledworkflow/util/periodic_schedule.go index 13b99f3423e..e983c5f5a61 100644 --- a/resources/scheduledworkflow/util/periodic_schedule.go +++ b/controller/scheduledworkflow/util/periodic_schedule.go @@ -15,9 +15,10 @@ package util import ( - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - log "github.com/sirupsen/logrus" "math" + + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + log "github.com/sirupsen/logrus" ) // PeriodicSchedule is a type to help manipulate PeriodicSchedule objects. diff --git a/resources/scheduledworkflow/util/periodic_schedule_test.go b/controller/scheduledworkflow/util/periodic_schedule_test.go similarity index 97% rename from resources/scheduledworkflow/util/periodic_schedule_test.go rename to controller/scheduledworkflow/util/periodic_schedule_test.go index 4399616b514..9e911ca0c0f 100644 --- a/resources/scheduledworkflow/util/periodic_schedule_test.go +++ b/controller/scheduledworkflow/util/periodic_schedule_test.go @@ -15,12 +15,13 @@ package util import ( - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/apis/meta/v1" "math" "testing" "time" + + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestPeriodicSchedule_getNextScheduledEpoch_StartDate_EndDate(t *testing.T) { diff --git a/resources/scheduledworkflow/util/scheduled_workflow.go b/controller/scheduledworkflow/util/scheduled_workflow.go similarity index 99% rename from resources/scheduledworkflow/util/scheduled_workflow.go rename to controller/scheduledworkflow/util/scheduled_workflow.go index ebd97069766..87376a35594 100644 --- a/resources/scheduledworkflow/util/scheduled_workflow.go +++ b/controller/scheduledworkflow/util/scheduled_workflow.go @@ -16,15 +16,16 @@ package util import ( "fmt" - workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" "hash/fnv" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/apis/core" "math" "sort" "strconv" "time" + + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/apis/core" ) const ( diff --git a/resources/scheduledworkflow/util/scheduled_workflow_test.go b/controller/scheduledworkflow/util/scheduled_workflow_test.go similarity index 98% rename from resources/scheduledworkflow/util/scheduled_workflow_test.go rename to controller/scheduledworkflow/util/scheduled_workflow_test.go index e41a4111268..545132ef3d7 100644 --- a/resources/scheduledworkflow/util/scheduled_workflow_test.go +++ b/controller/scheduledworkflow/util/scheduled_workflow_test.go @@ -15,15 +15,16 @@ package util import ( - workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/apis/core" "math" "strconv" "testing" "time" + + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/apis/core" ) func TestScheduledWorkflow_maxConcurrency(t *testing.T) { @@ -577,7 +578,7 @@ func TestScheduledWorkflow_NewWorkflow(t *testing.T) { Labels: map[string]string{ "scheduledworkflows.kubeflow.org/isOwnedByScheduledWorkflow": "true", "scheduledworkflows.kubeflow.org/scheduledWorkflowName": "SCHEDULE1", - "scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)), + "scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)), "scheduledworkflows.kubeflow.org/workflowIndex": "1"}, OwnerReferences: []metav1.OwnerReference{{ APIVersion: "kubeflow.org/v1alpha1", @@ -650,7 +651,7 @@ func TestScheduledWorkflow_NewWorkflow_Parameterized(t *testing.T) { Labels: map[string]string{ "scheduledworkflows.kubeflow.org/isOwnedByScheduledWorkflow": "true", "scheduledworkflows.kubeflow.org/scheduledWorkflowName": "SCHEDULE1", - "scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)), + "scheduledworkflows.kubeflow.org/workflowEpoch": strconv.Itoa(int(scheduledEpoch)), "scheduledworkflows.kubeflow.org/workflowIndex": "1"}, OwnerReferences: []metav1.OwnerReference{{ APIVersion: "kubeflow.org/v1alpha1", diff --git a/resources/scheduledworkflow/util/time_interface.go b/controller/scheduledworkflow/util/time_interface.go similarity index 100% rename from resources/scheduledworkflow/util/time_interface.go rename to controller/scheduledworkflow/util/time_interface.go diff --git a/resources/scheduledworkflow/util/workflow.go b/controller/scheduledworkflow/util/workflow.go similarity index 94% rename from resources/scheduledworkflow/util/workflow.go rename to controller/scheduledworkflow/util/workflow.go index c2bbb8f6efd..4b12ba0d3fa 100644 --- a/resources/scheduledworkflow/util/workflow.go +++ b/controller/scheduledworkflow/util/workflow.go @@ -16,8 +16,8 @@ package util import ( workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" - swfregister "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + swfregister "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/resources/scheduledworkflow/util/workflow_test.go b/controller/scheduledworkflow/util/workflow_test.go similarity index 98% rename from resources/scheduledworkflow/util/workflow_test.go rename to controller/scheduledworkflow/util/workflow_test.go index 0b5d64b728a..9bb2bfb23ec 100644 --- a/resources/scheduledworkflow/util/workflow_test.go +++ b/controller/scheduledworkflow/util/workflow_test.go @@ -15,11 +15,12 @@ package util import ( + "testing" + workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" - swfapi "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + swfapi "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "testing" ) func TestWorkflow_OverrideName(t *testing.T) { diff --git a/hack/custom-boilerplate.go.txt b/hack/custom-boilerplate.go.txt index adcfb4f1395..d2f27c371ef 100644 --- a/hack/custom-boilerplate.go.txt +++ b/hack/custom-boilerplate.go.txt @@ -1,10 +1,10 @@ -// Copyright YEAR The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index ad4944151cc..d893baf7def 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -1,12 +1,12 @@ #!/bin/bash -# Copyright 2017 The Kubernetes Authors. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -23,10 +23,10 @@ set -o pipefail SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. echo "SCRIPT_ROOT is $SCRIPT_ROOT" -CODEGEN_PKG=${SCRIPT_ROOT}/../../../k8s.io/code-generator +CODEGEN_PKG=${SCRIPT_ROOT}/../../../../k8s.io/code-generator echo "CODEGEN_PKG is $CODEGEN_PKG" ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ - github.com/kubeflow/pipelines/pkg/client github.com/kubeflow/pipelines/pkg/apis \ + github.com/googleprivate/ml/crd/pkg/client github.com/googleprivate/ml/crd/pkg/apis \ scheduledworkflow:v1alpha1 \ --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt diff --git a/pkg/apis/scheduledworkflow/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/scheduledworkflow/v1alpha1/zz_generated.deepcopy.go index 026f511ff47..7c8d082f089 100644 --- a/pkg/apis/scheduledworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/scheduledworkflow/v1alpha1/zz_generated.deepcopy.go @@ -1,12 +1,12 @@ // +build !ignore_autogenerated -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -27,19 +27,11 @@ func (in *CronSchedule) DeepCopyInto(out *CronSchedule) { *out = *in if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } if in.EndTime != nil { in, out := &in.EndTime, &out.EndTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } return } @@ -75,19 +67,11 @@ func (in *PeriodicSchedule) DeepCopyInto(out *PeriodicSchedule) { *out = *in if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } if in.EndTime != nil { in, out := &in.EndTime, &out.EndTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } return } @@ -186,31 +170,19 @@ func (in *ScheduledWorkflowSpec) DeepCopyInto(out *ScheduledWorkflowSpec) { *out = *in if in.MaxConcurrency != nil { in, out := &in.MaxConcurrency, &out.MaxConcurrency - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.MaxHistory != nil { in, out := &in.MaxHistory, &out.MaxHistory - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } in.Trigger.DeepCopyInto(&out.Trigger) if in.Workflow != nil { in, out := &in.Workflow, &out.Workflow - if *in == nil { - *out = nil - } else { - *out = new(WorkflowResource) - (*in).DeepCopyInto(*out) - } + *out = new(WorkflowResource) + (*in).DeepCopyInto(*out) } return } @@ -238,12 +210,8 @@ func (in *ScheduledWorkflowStatus) DeepCopyInto(out *ScheduledWorkflowStatus) { in.Trigger.DeepCopyInto(&out.Trigger) if in.WorkflowHistory != nil { in, out := &in.WorkflowHistory, &out.WorkflowHistory - if *in == nil { - *out = nil - } else { - *out = new(WorkflowHistory) - (*in).DeepCopyInto(*out) - } + *out = new(WorkflowHistory) + (*in).DeepCopyInto(*out) } return } @@ -263,21 +231,13 @@ func (in *Trigger) DeepCopyInto(out *Trigger) { *out = *in if in.CronSchedule != nil { in, out := &in.CronSchedule, &out.CronSchedule - if *in == nil { - *out = nil - } else { - *out = new(CronSchedule) - (*in).DeepCopyInto(*out) - } + *out = new(CronSchedule) + (*in).DeepCopyInto(*out) } if in.PeriodicSchedule != nil { in, out := &in.PeriodicSchedule, &out.PeriodicSchedule - if *in == nil { - *out = nil - } else { - *out = new(PeriodicSchedule) - (*in).DeepCopyInto(*out) - } + *out = new(PeriodicSchedule) + (*in).DeepCopyInto(*out) } return } @@ -297,28 +257,16 @@ func (in *TriggerStatus) DeepCopyInto(out *TriggerStatus) { *out = *in if in.LastTriggeredTime != nil { in, out := &in.LastTriggeredTime, &out.LastTriggeredTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } if in.NextTriggeredTime != nil { in, out := &in.NextTriggeredTime, &out.NextTriggeredTime - if *in == nil { - *out = nil - } else { - *out = (*in).DeepCopy() - } + *out = (*in).DeepCopy() } if in.LastIndex != nil { in, out := &in.LastIndex, &out.LastIndex - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } return } diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 11311ab0d51..7a878dc553e 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,7 @@ package versioned import ( - scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" + scheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" diff --git a/pkg/client/clientset/versioned/doc.go b/pkg/client/clientset/versioned/doc.go index bce96cb6a1f..c10318ed28b 100644 --- a/pkg/client/clientset/versioned/doc.go +++ b/pkg/client/clientset/versioned/doc.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 2e325337605..af881a8478d 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +17,9 @@ package fake import ( - clientset "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" - fakescheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake" + clientset "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + scheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" + fakescheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" diff --git a/pkg/client/clientset/versioned/fake/doc.go b/pkg/client/clientset/versioned/fake/doc.go index ed08b811440..56410584dfe 100644 --- a/pkg/client/clientset/versioned/fake/doc.go +++ b/pkg/client/clientset/versioned/fake/doc.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index a020cce62d7..22f3d30c5dd 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,20 +17,19 @@ package fake import ( - scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + scheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + scheduledworkflowv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,10 +42,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - scheduledworkflowv1alpha1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/pkg/client/clientset/versioned/scheme/doc.go b/pkg/client/clientset/versioned/scheme/doc.go index a9e70c54909..d50f8087d0b 100644 --- a/pkg/client/clientset/versioned/scheme/doc.go +++ b/pkg/client/clientset/versioned/scheme/doc.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 6bb8aee8cd7..db83174d08a 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,20 +17,19 @@ package scheme import ( - scheduledworkflowv1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + scheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + scheduledworkflowv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,10 +42,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - scheduledworkflowv1alpha1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/doc.go index 7c6f02e5302..d4e28563b4b 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/doc.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/doc.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/doc.go index c3f1566b39f..37b292eb906 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/doc.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/doc.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow.go index a905035f5d4..777ca956aa5 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,7 @@ package fake import ( - v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow_client.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow_client.go index 33698639dda..cfc04508c09 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow_client.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/fake/fake_scheduledworkflow_client.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,7 @@ package fake import ( - v1alpha1 "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/generated_expansion.go index cab82287301..e56cb14ed43 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/generated_expansion.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow.go index ae886112f1d..a09c47d09a7 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,8 +17,8 @@ package v1alpha1 import ( - v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - scheme "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/scheme" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + scheme "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow_client.go b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow_client.go index f83104ad1fa..ccc2e57eb13 100644 --- a/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow_client.go +++ b/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1/scheduledworkflow_client.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,8 +17,8 @@ package v1alpha1 import ( - v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - "github.com/kubeflow/pipelines/pkg/client/clientset/versioned/scheme" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned/scheme" serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 7f0f6ec6c0d..fcf545054ec 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -21,9 +21,9 @@ import ( sync "sync" time "time" - versioned "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/internalinterfaces" - scheduledworkflow "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/scheduledworkflow" + versioned "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + internalinterfaces "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/internalinterfaces" + scheduledworkflow "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/scheduledworkflow" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 71fc73f2d60..420c036ceff 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -19,7 +19,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) diff --git a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index 74b01203081..dfa53094213 100644 --- a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -19,7 +19,7 @@ package internalinterfaces import ( time "time" - versioned "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" + versioned "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" diff --git a/pkg/client/informers/externalversions/scheduledworkflow/interface.go b/pkg/client/informers/externalversions/scheduledworkflow/interface.go index d5e344f95c4..a229c6973db 100644 --- a/pkg/client/informers/externalversions/scheduledworkflow/interface.go +++ b/pkg/client/informers/externalversions/scheduledworkflow/interface.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,8 +17,8 @@ package scheduledworkflow import ( - internalinterfaces "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1" + internalinterfaces "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1" ) // Interface provides access to each of this group's versions. diff --git a/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/interface.go b/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/interface.go index 4a5f2ac98e5..79015b370ec 100644 --- a/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/interface.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,7 @@ package v1alpha1 import ( - internalinterfaces "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/scheduledworkflow.go b/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/scheduledworkflow.go index 837e2898548..d5f935c6043 100644 --- a/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/scheduledworkflow.go +++ b/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1/scheduledworkflow.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -19,10 +19,10 @@ package v1alpha1 import ( time "time" - scheduledworkflow_v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" - versioned "github.com/kubeflow/pipelines/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeflow/pipelines/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kubeflow/pipelines/pkg/client/listers/scheduledworkflow/v1alpha1" + scheduledworkflowv1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" + versioned "github.com/googleprivate/ml/crd/pkg/client/clientset/versioned" + internalinterfaces "github.com/googleprivate/ml/crd/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/client/listers/scheduledworkflow/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -68,7 +68,7 @@ func NewFilteredScheduledWorkflowInformer(client versioned.Interface, namespace return client.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace).Watch(options) }, }, - &scheduledworkflow_v1alpha1.ScheduledWorkflow{}, + &scheduledworkflowv1alpha1.ScheduledWorkflow{}, resyncPeriod, indexers, ) @@ -79,7 +79,7 @@ func (f *scheduledWorkflowInformer) defaultInformer(client versioned.Interface, } func (f *scheduledWorkflowInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&scheduledworkflow_v1alpha1.ScheduledWorkflow{}, f.defaultInformer) + return f.factory.InformerFor(&scheduledworkflowv1alpha1.ScheduledWorkflow{}, f.defaultInformer) } func (f *scheduledWorkflowInformer) Lister() v1alpha1.ScheduledWorkflowLister { diff --git a/pkg/client/listers/scheduledworkflow/v1alpha1/expansion_generated.go b/pkg/client/listers/scheduledworkflow/v1alpha1/expansion_generated.go index 52e8db5820e..641adb5f7be 100644 --- a/pkg/client/listers/scheduledworkflow/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/scheduledworkflow/v1alpha1/expansion_generated.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/pkg/client/listers/scheduledworkflow/v1alpha1/scheduledworkflow.go b/pkg/client/listers/scheduledworkflow/v1alpha1/scheduledworkflow.go index 200c7fa53c3..9f8ed19adff 100644 --- a/pkg/client/listers/scheduledworkflow/v1alpha1/scheduledworkflow.go +++ b/pkg/client/listers/scheduledworkflow/v1alpha1/scheduledworkflow.go @@ -1,10 +1,10 @@ -// Copyright 2018 The Kubeflow Authors +// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,7 @@ package v1alpha1 import ( - v1alpha1 "github.com/kubeflow/pipelines/pkg/apis/scheduledworkflow/v1alpha1" + v1alpha1 "github.com/googleprivate/ml/crd/pkg/apis/scheduledworkflow/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/prow_config.yaml b/prow_config.yaml deleted file mode 100644 index 9051669a55d..00000000000 --- a/prow_config.yaml +++ /dev/null @@ -1 +0,0 @@ -workflows: [] \ No newline at end of file diff --git a/example/concurrency.yaml b/samples/scheduledworkflow/concurrency.yaml similarity index 100% rename from example/concurrency.yaml rename to samples/scheduledworkflow/concurrency.yaml diff --git a/example/every-minute-cron.yaml b/samples/scheduledworkflow/every-minute-cron.yaml similarity index 100% rename from example/every-minute-cron.yaml rename to samples/scheduledworkflow/every-minute-cron.yaml diff --git a/example/every-minute-periodic.yaml b/samples/scheduledworkflow/every-minute-periodic.yaml similarity index 100% rename from example/every-minute-periodic.yaml rename to samples/scheduledworkflow/every-minute-periodic.yaml diff --git a/example/invalid.yaml b/samples/scheduledworkflow/invalid.yaml similarity index 100% rename from example/invalid.yaml rename to samples/scheduledworkflow/invalid.yaml diff --git a/example/no-history.yaml b/samples/scheduledworkflow/no-history.yaml similarity index 100% rename from example/no-history.yaml rename to samples/scheduledworkflow/no-history.yaml diff --git a/example/parameterized.yaml b/samples/scheduledworkflow/parameterized.yaml similarity index 100% rename from example/parameterized.yaml rename to samples/scheduledworkflow/parameterized.yaml diff --git a/example/single-run.yaml b/samples/scheduledworkflow/single-run.yaml similarity index 100% rename from example/single-run.yaml rename to samples/scheduledworkflow/single-run.yaml diff --git a/example/start-end-cron.yaml b/samples/scheduledworkflow/start-end-cron.yaml similarity index 100% rename from example/start-end-cron.yaml rename to samples/scheduledworkflow/start-end-cron.yaml diff --git a/example/start-end-periodic.yaml b/samples/scheduledworkflow/start-end-periodic.yaml similarity index 100% rename from example/start-end-periodic.yaml rename to samples/scheduledworkflow/start-end-periodic.yaml