Skip to content

Commit

Permalink
Update module to v2 and update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rmweir committed Sep 1, 2023
1 parent b9331c2 commit a94e560
Show file tree
Hide file tree
Showing 136 changed files with 271 additions and 273 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ import (
"context"

"github.com/rancher/rancher/pkg/generated/controllers/management.cattle.io"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/core"
"k8s.io/client-go/rest"
)

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/rancher/wrangler
module github.com/rancher/wrangler/v2

go 1.19

Expand Down
4 changes: 2 additions & 2 deletions pkg/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"sync"

"github.com/rancher/wrangler/pkg/apply/injectors"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
Expand Down
8 changes: 4 additions & 4 deletions pkg/apply/desiredset.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package apply
import (
"context"

"github.com/rancher/wrangler/pkg/apply/injectors"
"github.com/rancher/wrangler/pkg/kv"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/kv"
"github.com/rancher/wrangler/v2/pkg/merr"
"github.com/rancher/wrangler/v2/pkg/objectset"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apply/desiredset_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (

"github.com/sirupsen/logrus"

gvk2 "github.com/rancher/wrangler/pkg/gvk"
gvk2 "github.com/rancher/wrangler/v2/pkg/gvk"

"github.com/pkg/errors"
"github.com/rancher/wrangler/pkg/apply/injectors"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
8 changes: 4 additions & 4 deletions pkg/apply/desiredset_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors"
data2 "github.com/rancher/wrangler/pkg/data"
"github.com/rancher/wrangler/pkg/data/convert"
"github.com/rancher/wrangler/pkg/objectset"
patch2 "github.com/rancher/wrangler/pkg/patch"
data2 "github.com/rancher/wrangler/v2/pkg/data"
"github.com/rancher/wrangler/v2/pkg/data/convert"
"github.com/rancher/wrangler/v2/pkg/objectset"
patch2 "github.com/rancher/wrangler/v2/pkg/patch"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/api/meta"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apply/desiredset_owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"fmt"
"strings"

"github.com/rancher/wrangler/pkg/gvk"
"github.com/rancher/wrangler/v2/pkg/gvk"

"github.com/rancher/wrangler/pkg/kv"
"github.com/rancher/wrangler/v2/pkg/kv"

"github.com/pkg/errors"
namer "github.com/rancher/wrangler/pkg/name"
namer "github.com/rancher/wrangler/v2/pkg/name"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apply/desiredset_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"

"github.com/pkg/errors"
gvk2 "github.com/rancher/wrangler/pkg/gvk"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/pkg/objectset"
gvk2 "github.com/rancher/wrangler/v2/pkg/gvk"
"github.com/rancher/wrangler/v2/pkg/merr"
"github.com/rancher/wrangler/v2/pkg/objectset"
"github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
errors2 "k8s.io/apimachinery/pkg/api/errors"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apply/fake/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package fake
import (
"context"

"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/apply/injectors"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v2/pkg/apply"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
Expand Down
32 changes: 15 additions & 17 deletions pkg/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@ import (

"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/lasso/pkg/dynamic"
"github.com/rancher/wrangler/pkg/apply"
admissionreg "github.com/rancher/wrangler/pkg/generated/controllers/admissionregistration.k8s.io"
admissionregcontrollers "github.com/rancher/wrangler/pkg/generated/controllers/admissionregistration.k8s.io/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/apiextensions.k8s.io"
crdcontrollers "github.com/rancher/wrangler/pkg/generated/controllers/apiextensions.k8s.io/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/apiregistration.k8s.io"
apicontrollers "github.com/rancher/wrangler/pkg/generated/controllers/apiregistration.k8s.io/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/apps"
appcontrollers "github.com/rancher/wrangler/pkg/generated/controllers/apps/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/batch"
batchcontrollers "github.com/rancher/wrangler/pkg/generated/controllers/batch/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
corecontrollers "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/rbac"
rbaccontrollers "github.com/rancher/wrangler/pkg/generated/controllers/rbac/v1"
"github.com/rancher/wrangler/pkg/generic"
"github.com/rancher/wrangler/pkg/ratelimit"
"github.com/rancher/wrangler/v2/pkg/apply"
admissionreg "github.com/rancher/wrangler/v2/pkg/generated/controllers/admissionregistration.k8s.io"
admissionregcontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/admissionregistration.k8s.io/v1"
crdcontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io/v1"
apicontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiregistration.k8s.io/v1"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/apps"
appcontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/apps/v1"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/batch"
batchcontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/batch/v1"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/core"
corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac"
rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1"
"github.com/rancher/wrangler/v2/pkg/generic"
"github.com/rancher/wrangler/v2/pkg/ratelimit"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/client-go/discovery"
"k8s.io/client-go/discovery/cached/memory"
Expand Down
4 changes: 2 additions & 2 deletions pkg/codegen/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
controllergen "github.com/rancher/wrangler/pkg/controller-gen"
"github.com/rancher/wrangler/pkg/controller-gen/args"
controllergen "github.com/rancher/wrangler/v2/pkg/controller-gen"
"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/condition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"time"

"github.com/rancher/wrangler/pkg/generic"
"github.com/rancher/wrangler/v2/pkg/generic"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/client_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"strings"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/factory_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/group_interface_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
"k8s.io/gengo/namer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"strings"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/list_type_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package generators
import (
"io"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/register_group_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package generators
import (
"fmt"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller-gen/generators/register_group_version_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"io"
"strings"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
"github.com/rancher/wrangler/pkg/name"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v2/pkg/name"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller-gen/generators/type_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"strings"

args2 "github.com/rancher/wrangler/pkg/controller-gen/args"
args2 "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller-gen/generators/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ var (
"context",
"time",
"k8s.io/client-go/rest",
"github.com/rancher/wrangler/pkg/apply",
"github.com/rancher/wrangler/v2/pkg/apply",
"github.com/rancher/lasso/pkg/controller",
"github.com/rancher/wrangler/pkg/condition",
"github.com/rancher/wrangler/pkg/schemes",
"github.com/rancher/wrangler/pkg/generic",
"github.com/rancher/wrangler/pkg/kv",
"github.com/rancher/wrangler/v2/pkg/condition",
"github.com/rancher/wrangler/v2/pkg/schemes",
"github.com/rancher/wrangler/v2/pkg/generic",
"github.com/rancher/wrangler/v2/pkg/kv",
"k8s.io/apimachinery/pkg/api/equality",
"k8s.io/apimachinery/pkg/api/errors",
"metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"",
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"k8s.io/gengo/generator"

cgargs "github.com/rancher/wrangler/pkg/controller-gen/args"
"github.com/rancher/wrangler/pkg/controller-gen/generators"
cgargs "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v2/pkg/controller-gen/generators"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/runtime/schema"
csargs "k8s.io/code-generator/cmd/client-gen/args"
Expand Down
12 changes: 6 additions & 6 deletions pkg/crd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"sync"
"time"

"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/data/convert"
"github.com/rancher/wrangler/pkg/kv"
"github.com/rancher/wrangler/pkg/name"
"github.com/rancher/wrangler/pkg/schemas/openapi"
"github.com/rancher/wrangler/v2/pkg/apply"
"github.com/rancher/wrangler/v2/pkg/data/convert"
"github.com/rancher/wrangler/v2/pkg/kv"
"github.com/rancher/wrangler/v2/pkg/name"
"github.com/rancher/wrangler/v2/pkg/schemas/openapi"
"github.com/sirupsen/logrus"
apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand All @@ -30,7 +30,7 @@ import (
"k8s.io/client-go/rest"

// Ensure the gvks are loaded so that apply works correctly
_ "github.com/rancher/wrangler/pkg/generated/controllers/apiextensions.k8s.io/v1"
_ "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io/v1"
)

const CRDKind = "CustomResourceDefinition"
Expand Down
2 changes: 1 addition & 1 deletion pkg/crd/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path/filepath"

"github.com/rancher/wrangler/pkg/yaml"
"github.com/rancher/wrangler/v2/pkg/yaml"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/rest"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/data/data.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package data

import (
"github.com/rancher/wrangler/pkg/data/convert"
"github.com/rancher/wrangler/v2/pkg/data/convert"
)

type List []map[string]interface{}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/generated/controllers/apiextensions.k8s.io/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a94e560

Please sign in to comment.