Skip to content

Commit

Permalink
Merge pull request #4 from HumairAK/rename_operator
Browse files Browse the repository at this point in the history
Rename operator
  • Loading branch information
HumairAK authored Feb 8, 2023
2 parents 37685a5 + 0c1ce92 commit faed8ec
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=<some-registry>/<project-name-bundle>:<tag>)
Expand Down
6 changes: 3 additions & 3 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
```
Expand Down Expand Up @@ -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
```
8 changes: 4 additions & 4 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resources:
- bases/ds-pipelines-controller.clusterserviceversion.yaml
- bases/data-science-pipelines-operator.clusterserviceversion.yaml
- ../default
4 changes: 2 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion controllers/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion controllers/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions controllers/dspipeline_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion controllers/dspipeline_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/mlpipeline_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion controllers/persistence_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion controllers/scheduled_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion controllers/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
25 changes: 20 additions & 5 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand All @@ -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{
Expand All @@ -74,6 +88,7 @@ var _ = BeforeSuite(func() {
})

var _ = AfterSuite(func() {
cancel()
By("tearing down the test environment")
err := testEnv.Stop()
Expect(err).NotTo(HaveOccurred())
Expand Down
2 changes: 1 addition & 1 deletion controllers/viewer_crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/opendatahub-io/ds-pipelines-controller
module github.com/opendatahub-io/data-science-pipelines-operator

go 1.18

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit faed8ec

Please sign in to comment.