Skip to content

Commit

Permalink
trying to fix #625 - update go.mod to /v5
Browse files Browse the repository at this point in the history
Signed-off-by: Guy Margalit <guymguym@gmail.com>
  • Loading branch information
guymguym committed May 26, 2021
1 parent 14e5c0a commit fc0fef7
Show file tree
Hide file tree
Showing 52 changed files with 200 additions and 197 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ build-releases/
/noobaa-operator

# visual studio code intellisense configuration
.vscode/
.vscode/

*.IGNORE
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
//go:generate make gen

import (
"github.com/noobaa/noobaa-operator/v2/pkg/cli"
"github.com/noobaa/noobaa-operator/v5/pkg/cli"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/version/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/noobaa/noobaa-operator/v2/version"
"github.com/noobaa/noobaa-operator/v5/version"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/noobaa/noobaa-operator/v2
module github.com/noobaa/noobaa-operator/v5

go 1.16

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package main
//go:generate make gen

import (
"github.com/noobaa/noobaa-operator/v2/pkg/cli"
"github.com/noobaa/noobaa-operator/v5/pkg/cli"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/addtoscheme_noobaa_v1alpha1.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package apis

import (
"github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
)

func init() {
Expand Down
12 changes: 6 additions & 6 deletions pkg/backingstore/backingstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"strings"
"time"

nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/bundle"
"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/bundle"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
Expand Down
12 changes: 6 additions & 6 deletions pkg/backingstore/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"strings"
"time"

nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/bundle"
"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/bundle"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions pkg/bucket/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"log"

"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"github.com/spf13/cobra"
)
Expand Down
8 changes: 4 additions & 4 deletions pkg/bucketclass/bucketclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"log"
"time"

nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/bundle"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/bundle"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
41 changes: 21 additions & 20 deletions pkg/bucketclass/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"fmt"
"time"

nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/bundle"
"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/bundle"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -361,28 +361,29 @@ func (r *Reconciler) updateNamespaceBucketClass(bucketNames []string) error {
var readResources []nb.NamespaceResourceFullConfig
createBucketParams := &nb.CreateBucketParams{}
createBucketParams.Namespace = &nb.NamespaceBucketInfo{}

if namespacePolicyType == nbv1.NSBucketClassTypeSingle {
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Single.Resource }
createBucketParams.Namespace.ReadResources = append(readResources, nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Single.Resource })
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Single.Resource}
createBucketParams.Namespace.ReadResources = append(readResources, nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Single.Resource})

} else if namespacePolicyType == nbv1.NSBucketClassTypeMulti {
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Multi.WriteResource }
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Multi.WriteResource}

for i := range r.BucketClass.Spec.NamespacePolicy.Multi.ReadResources {
rr := r.BucketClass.Spec.NamespacePolicy.Multi.ReadResources[i]
readResources = append(readResources, nb.NamespaceResourceFullConfig{ Resource: rr }) }
readResources = append(readResources, nb.NamespaceResourceFullConfig{Resource: rr})
}

createBucketParams.Namespace.ReadResources = readResources

} else if namespacePolicyType == nbv1.NSBucketClassTypeCache {
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Cache.HubResource }
createBucketParams.Namespace.ReadResources = append(readResources, nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Cache.HubResource })
createBucketParams.Namespace.WriteResource = nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Cache.HubResource}
createBucketParams.Namespace.ReadResources = append(readResources, nb.NamespaceResourceFullConfig{
Resource: r.BucketClass.Spec.NamespacePolicy.Cache.HubResource})
createBucketParams.Namespace.Caching = &nb.CacheSpec{TTLMs: r.BucketClass.Spec.NamespacePolicy.Cache.Caching.TTL}
//cachePrefix := r.BucketClass.Spec.NamespacePolicy.Cache.Prefix
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/bundler/bundler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"regexp"
"strings"

"github.com/noobaa/noobaa-operator/v2/pkg/util"
"github.com/noobaa/noobaa-operator/v2/version"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"github.com/noobaa/noobaa-operator/v5/version"
"github.com/sirupsen/logrus"
)

Expand Down
30 changes: 15 additions & 15 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import (
"os"
"time"

"github.com/noobaa/noobaa-operator/v2/pkg/backingstore"
"github.com/noobaa/noobaa-operator/v2/pkg/bucket"
"github.com/noobaa/noobaa-operator/v2/pkg/bucketclass"
"github.com/noobaa/noobaa-operator/v2/pkg/crd"
"github.com/noobaa/noobaa-operator/v2/pkg/diagnose"
"github.com/noobaa/noobaa-operator/v2/pkg/install"
"github.com/noobaa/noobaa-operator/v2/pkg/namespacestore"
"github.com/noobaa/noobaa-operator/v2/pkg/obc"
"github.com/noobaa/noobaa-operator/v2/pkg/olm"
"github.com/noobaa/noobaa-operator/v2/pkg/operator"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/pvstore"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
"github.com/noobaa/noobaa-operator/v2/pkg/version"
"github.com/noobaa/noobaa-operator/v5/pkg/backingstore"
"github.com/noobaa/noobaa-operator/v5/pkg/bucket"
"github.com/noobaa/noobaa-operator/v5/pkg/bucketclass"
"github.com/noobaa/noobaa-operator/v5/pkg/crd"
"github.com/noobaa/noobaa-operator/v5/pkg/diagnose"
"github.com/noobaa/noobaa-operator/v5/pkg/install"
"github.com/noobaa/noobaa-operator/v5/pkg/namespacestore"
"github.com/noobaa/noobaa-operator/v5/pkg/obc"
"github.com/noobaa/noobaa-operator/v5/pkg/olm"
"github.com/noobaa/noobaa-operator/v5/pkg/operator"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/pvstore"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"github.com/noobaa/noobaa-operator/v5/pkg/version"

"github.com/spf13/cobra"
"k8s.io/kubectl/pkg/util/templates"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/noobaa/noobaa-operator/v2/version"
"github.com/noobaa/noobaa-operator/v5/version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_backingstore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controller

import (
"github.com/noobaa/noobaa-operator/v2/pkg/controller/backingstore"
"github.com/noobaa/noobaa-operator/v5/pkg/controller/backingstore"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_bucketclass.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controller

import (
"github.com/noobaa/noobaa-operator/v2/pkg/controller/bucketclass"
"github.com/noobaa/noobaa-operator/v5/pkg/controller/bucketclass"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_cephcluster.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package controller

import "github.com/noobaa/noobaa-operator/v2/pkg/controller/cephcluster"
import "github.com/noobaa/noobaa-operator/v5/pkg/controller/cephcluster"

func init() {
// AddToManagerFuncs is a list of functions to create controllers and add them to a manager.
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_namespacestore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controller

import (
"github.com/noobaa/noobaa-operator/v2/pkg/controller/namespacestore"
"github.com/noobaa/noobaa-operator/v5/pkg/controller/namespacestore"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_noobaa.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controller

import (
"github.com/noobaa/noobaa-operator/v2/pkg/controller/noobaa"
"github.com/noobaa/noobaa-operator/v5/pkg/controller/noobaa"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_obc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controller

import (
"github.com/noobaa/noobaa-operator/v2/pkg/controller/obc"
"github.com/noobaa/noobaa-operator/v5/pkg/controller/obc"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/backingstore/backingstore_controller.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package backingstore

import (
nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/backingstore"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/backingstore"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
corev1 "k8s.io/api/core/v1"

"sigs.k8s.io/controller-runtime/pkg/controller"
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/bucketclass/bucketclass_controller.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package bucketclass

import (
nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/bucketclass"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/bucketclass"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/controller"
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/cephcluster/cephcluster_controller.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package cephcluster

import (
nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
"github.com/sirupsen/logrus"

"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/event"
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/namespacestore/namespacestore_controller.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package namespacestore

import (
nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/namespacestore"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/namespacestore"
"github.com/noobaa/noobaa-operator/v5/pkg/util"

"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/event"
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/noobaa/noobaa_controller.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package noobaa

import (
nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/nb"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/system"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/nb"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/system"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"github.com/sirupsen/logrus"

appsv1 "k8s.io/api/apps/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/obc/obc_controller.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package obc

import (
"github.com/noobaa/noobaa-operator/v2/pkg/obc"
"github.com/noobaa/noobaa-operator/v5/pkg/obc"
"sigs.k8s.io/controller-runtime/pkg/manager"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/crd/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/spf13/cobra"

"github.com/noobaa/noobaa-operator/v2/pkg/bundle"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
"github.com/noobaa/noobaa-operator/v5/pkg/bundle"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"sigs.k8s.io/controller-runtime/pkg/client"

apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down
6 changes: 3 additions & 3 deletions pkg/diagnose/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"time"

nbv1 "github.com/noobaa/noobaa-operator/v2/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v2/pkg/options"
"github.com/noobaa/noobaa-operator/v2/pkg/util"
nbv1 "github.com/noobaa/noobaa-operator/v5/pkg/apis/noobaa/v1alpha1"
"github.com/noobaa/noobaa-operator/v5/pkg/options"
"github.com/noobaa/noobaa-operator/v5/pkg/util"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Loading

0 comments on commit fc0fef7

Please sign in to comment.