diff --git a/Makefile b/Makefile index 211d0b218..a5b1af21f 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # This variable is used to construct full image tags for bundle and catalog images. # # For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both -# opendatahub.io/ds-pipelines-controller-bundle:$VERSION and opendatahub.io/ds-pipelines-controller-catalog:$VERSION. -IMAGE_TAG_BASE ?= opendatahub.io/ds-pipelines-controller +# opendatahub.io/data-science-pipelines-operator-bundle:$VERSION and opendatahub.io/data-science-pipelines-operator-catalog:$VERSION. +IMAGE_TAG_BASE ?= opendatahub.io/data-science-pipelines-operator # BUNDLE_IMG defines the image:tag used for the bundle. # You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) diff --git a/PROJECT b/PROJECT index bd66fda9f..d8a04d5a5 100644 --- a/PROJECT +++ b/PROJECT @@ -4,8 +4,8 @@ layout: plugins: manifests.sdk.operatorframework.io/v2: {} scorecard.sdk.operatorframework.io/v2: {} -projectName: ds-pipelines-controller -repo: github.com/opendatahub-io/ds-pipelines-controller +projectName: data-science-pipelines-operator +repo: github.com/opendatahub-io/data-science-pipelines-operator resources: - api: crdVersion: v1 @@ -14,6 +14,6 @@ resources: domain: opendatahub.io group: dspipelines kind: DSPipeline - path: github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1 + path: github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1 version: v1alpha1 version: "3" diff --git a/README.md b/README.md index 0195ca229..6277607b7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ An operator that allows users to provision namespaced installations of DSP withi Deploy the operator ```bash -oc new-project ds-pipelines-controller +oc new-project data-science-pipelines-operator cd ${REPO}/config/default kustomize build . | oc apply -f - ``` @@ -39,5 +39,5 @@ oc delete project ${DSP_Namespace_2} cd ${REPO}/config/default kustomize build . | oc delete -f - -oc delete project ds-pipelines-controller +oc delete project data-science-pipelines-operator ``` diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index cb4690e5a..09a2e75ed 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,5 +1,5 @@ -namespace: ds-pipelines-controller -namePrefix: ds-pipelines-controller- +namespace: data-science-pipelines-operator +namePrefix: data-science-pipelines-operator- resources: - ../crd - ../rbac @@ -8,5 +8,5 @@ resources: images: - name: controller # TODO: This should be updated to point to proper upstream repository - newName: quay.io/hukhan/dspipelines-controller - newTag: v0.0.4 + newName: quay.io/opendatahub/data-science-pipelines-operator + newTag: latest diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 8dcb1175b..c553d9b2f 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -8,8 +8,8 @@ metadata: app.kubernetes.io/name: deployment app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: manager - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator spec: selector: matchLabels: diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 0ed1ce121..4128014f1 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,3 +1,3 @@ resources: -- bases/ds-pipelines-controller.clusterserviceversion.yaml +- bases/data-science-pipelines-operator.clusterserviceversion.yaml - ../default diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 28f4b512b..9513eef98 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -7,8 +7,8 @@ metadata: app.kubernetes.io/name: servicemonitor app.kubernetes.io/instance: controller-manager-metrics-monitor app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator name: controller-manager-metrics-monitor namespace: dspipelines-controller spec: diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index e466fa3ef..4e306bfee 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/instance: leader-election-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator name: leader-election-role rules: - apiGroups: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 0050fd7c4..0450c9a85 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: rolebinding app.kubernetes.io/instance: leader-election-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator name: leader-election-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 5253b4c68..7847efebe 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: manager-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator name: manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index fcec3dcf0..19af97798 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/name: serviceaccount app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: ds-pipelines-controller - app.kubernetes.io/part-of: ds-pipelines-controller + app.kubernetes.io/created-by: data-science-pipelines-operator + app.kubernetes.io/part-of: data-science-pipelines-operator name: controller-manager namespace: dspipelines-controller diff --git a/controllers/apiserver.go b/controllers/apiserver.go index 2cf9b35c3..377f13e39 100644 --- a/controllers/apiserver.go +++ b/controllers/apiserver.go @@ -17,7 +17,7 @@ package controllers import ( "context" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" v1 "k8s.io/api/core/v1" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/controllers/database.go b/controllers/database.go index 233df5de8..9816acd9a 100644 --- a/controllers/database.go +++ b/controllers/database.go @@ -17,7 +17,7 @@ package controllers import ( "context" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" v1 "k8s.io/api/core/v1" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/controllers/dspipeline_controller.go b/controllers/dspipeline_controller.go index 575c86dd8..f3fc2e109 100644 --- a/controllers/dspipeline_controller.go +++ b/controllers/dspipeline_controller.go @@ -21,8 +21,8 @@ import ( "fmt" "github.com/go-logr/logr" mf "github.com/manifestival/manifestival" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" - "github.com/opendatahub-io/ds-pipelines-controller/controllers/config" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" + "github.com/opendatahub-io/data-science-pipelines-operator/controllers/config" routev1 "github.com/openshift/api/route/v1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/controllers/dspipeline_params.go b/controllers/dspipeline_params.go index a685effb1..b3f63bad9 100644 --- a/controllers/dspipeline_params.go +++ b/controllers/dspipeline_params.go @@ -19,7 +19,7 @@ package controllers import ( "fmt" mf "github.com/manifestival/manifestival" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" "math/rand" "time" ) diff --git a/controllers/mlpipeline_ui.go b/controllers/mlpipeline_ui.go index f664424b3..61b0edb1b 100644 --- a/controllers/mlpipeline_ui.go +++ b/controllers/mlpipeline_ui.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" ) var mlPipelineUITemplates = []string{ diff --git a/controllers/persistence_agent.go b/controllers/persistence_agent.go index 43661811d..70e1910ad 100644 --- a/controllers/persistence_agent.go +++ b/controllers/persistence_agent.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" ) var persistenceAgentTemplates = []string{ diff --git a/controllers/scheduled_workflow.go b/controllers/scheduled_workflow.go index 275cdeb3c..5ce1c409c 100644 --- a/controllers/scheduled_workflow.go +++ b/controllers/scheduled_workflow.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" ) var scheduledWorkflowTemplates = []string{ diff --git a/controllers/storage.go b/controllers/storage.go index 5f4850691..932242c40 100644 --- a/controllers/storage.go +++ b/controllers/storage.go @@ -18,7 +18,7 @@ package controllers import ( "context" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" v1 "k8s.io/api/core/v1" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index a87a0d386..e396f695e 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -17,8 +17,11 @@ limitations under the License. package controllers import ( + "context" + "go.uber.org/zap/zapcore" "path/filepath" "testing" + "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -30,16 +33,20 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" //+kubebuilder:scaffold:imports ) // These tests use Ginkgo (BDD-style Go testing framework). Refer to // http://onsi.github.io/ginkgo/ to learn more about Ginkgo. -var cfg *rest.Config -var k8sClient client.Client -var testEnv *envtest.Environment +var ( + cfg *rest.Config + k8sClient client.Client + testEnv *envtest.Environment + ctx context.Context + cancel context.CancelFunc +) func TestAPIs(t *testing.T) { RegisterFailHandler(Fail) @@ -48,7 +55,14 @@ func TestAPIs(t *testing.T) { } var _ = BeforeSuite(func() { - logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + ctx, cancel = context.WithCancel(context.TODO()) + + // Initialize logger + opts := zap.Options{ + Development: true, + TimeEncoder: zapcore.TimeEncoderOfLayout(time.RFC3339), + } + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseFlagOptions(&opts))) By("bootstrapping test environment") testEnv = &envtest.Environment{ @@ -74,6 +88,7 @@ var _ = BeforeSuite(func() { }) var _ = AfterSuite(func() { + cancel() By("tearing down the test environment") err := testEnv.Stop() Expect(err).NotTo(HaveOccurred()) diff --git a/controllers/viewer_crd.go b/controllers/viewer_crd.go index 6c05570a0..dff29a209 100644 --- a/controllers/viewer_crd.go +++ b/controllers/viewer_crd.go @@ -17,7 +17,7 @@ limitations under the License. package controllers import ( - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" ) var viewerCRDTemplates = []string{ diff --git a/go.mod b/go.mod index 8164eeaa1..624864a57 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/opendatahub-io/ds-pipelines-controller +module github.com/opendatahub-io/data-science-pipelines-operator go 1.18 @@ -9,6 +9,7 @@ require ( github.com/onsi/ginkgo/v2 v2.1.4 github.com/onsi/gomega v1.19.0 github.com/openshift/api v3.9.0+incompatible + go.uber.org/zap v1.21.0 k8s.io/api v0.25.0 k8s.io/apimachinery v0.25.0 k8s.io/client-go v0.25.0 @@ -60,7 +61,6 @@ require ( github.com/spf13/pflag v1.0.5 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect diff --git a/main.go b/main.go index 71f2a1172..b710af1e4 100644 --- a/main.go +++ b/main.go @@ -26,8 +26,8 @@ import ( // to ensure that exec-entrypoint and run can make use of them. _ "k8s.io/client-go/plugin/pkg/client/auth" - dspipelinesiov1alpha1 "github.com/opendatahub-io/ds-pipelines-controller/api/v1alpha1" - "github.com/opendatahub-io/ds-pipelines-controller/controllers" + dspipelinesiov1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1" + "github.com/opendatahub-io/data-science-pipelines-operator/controllers" routev1 "github.com/openshift/api/route/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime"