Skip to content

Commit

Permalink
Move to wrangler v3 (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomleb committed May 2, 2024
1 parent 8886c26 commit f3b392a
Show file tree
Hide file tree
Showing 139 changed files with 281 additions and 281 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/v2/pkg/generated/controllers/core"
"github.com/rancher/wrangler/v3/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/v2
module github.com/rancher/wrangler/v3

go 1.22.0

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/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/apply/injectors"
"github.com/rancher/wrangler/v3/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 @@ -5,10 +5,10 @@ import (
"errors"
"fmt"

"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"
"github.com/rancher/wrangler/v3/pkg/apply/injectors"
"github.com/rancher/wrangler/v3/pkg/kv"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/objectset"
"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_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/v2/pkg/gvk"
gvk2 "github.com/rancher/wrangler/v3/pkg/gvk"

"github.com/pkg/errors"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/apply/injectors"
"github.com/rancher/wrangler/v3/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/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"
data2 "github.com/rancher/wrangler/v3/pkg/data"
"github.com/rancher/wrangler/v3/pkg/data/convert"
"github.com/rancher/wrangler/v3/pkg/objectset"
patch2 "github.com/rancher/wrangler/v3/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/v2/pkg/gvk"
"github.com/rancher/wrangler/v3/pkg/gvk"

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

"github.com/pkg/errors"
namer "github.com/rancher/wrangler/v2/pkg/name"
namer "github.com/rancher/wrangler/v3/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/v2/pkg/gvk"
"github.com/rancher/wrangler/v2/pkg/merr"
"github.com/rancher/wrangler/v2/pkg/objectset"
gvk2 "github.com/rancher/wrangler/v3/pkg/gvk"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/objectset"
"github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
errors2 "k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apply/desiredset_process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/rancher/wrangler/v2/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/objectset"

"github.com/stretchr/testify/assert"
appsv1 "k8s.io/api/apps/v1"
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/v2/pkg/apply"
"github.com/rancher/wrangler/v2/pkg/apply/injectors"
"github.com/rancher/wrangler/v2/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/apply"
"github.com/rancher/wrangler/v3/pkg/apply/injectors"
"github.com/rancher/wrangler/v3/pkg/objectset"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
Expand Down
34 changes: 17 additions & 17 deletions pkg/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ import (

"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/lasso/pkg/dynamic"
"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"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io"
crdcontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io/v1"
"github.com/rancher/wrangler/v2/pkg/generated/controllers/apiregistration.k8s.io"
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"
"github.com/rancher/wrangler/v3/pkg/apply"
admissionreg "github.com/rancher/wrangler/v3/pkg/generated/controllers/admissionregistration.k8s.io"
admissionregcontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/admissionregistration.k8s.io/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/apiextensions.k8s.io"
crdcontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/apiextensions.k8s.io/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/apiregistration.k8s.io"
apicontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/apiregistration.k8s.io/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/apps"
appcontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/apps/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/batch"
batchcontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/batch/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/core"
corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac"
rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1"
"github.com/rancher/wrangler/v3/pkg/generic"
"github.com/rancher/wrangler/v3/pkg/ratelimit"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/client-go/discovery"
"k8s.io/client-go/discovery/cached/memory"
Expand Down
6 changes: 3 additions & 3 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/v2/pkg/controller-gen"
"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
controllergen "github.com/rancher/wrangler/v3/pkg/controller-gen"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
Expand All @@ -19,7 +19,7 @@ import (

func main() {
controllergen.Run(args.Options{
ImportPackage: "github.com/rancher/wrangler/v2/pkg/generated",
ImportPackage: "github.com/rancher/wrangler/v3/pkg/generated",
OutputPackage: "github.com/rancher/wrangler/pkg/generated",
Boilerplate: "scripts/boilerplate.go.txt",
Groups: map[string]args.Group{
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/v2/pkg/generic"
"github.com/rancher/wrangler/v3/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"

args "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
args "github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/v2/generator"
"k8s.io/gengo/v2/types"
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"

"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/gengo/v2/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"

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

"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/v2/generator"
"k8s.io/gengo/v2/namer"
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"

"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/v2/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 @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/gengo/v2/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"

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

args "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
args "github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/gengo/v2/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"

"github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/gengo/v2/generator"
"k8s.io/gengo/v2/namer"
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 @@ -14,12 +14,12 @@ var (
"sync",
"time",
"k8s.io/client-go/rest",
"github.com/rancher/wrangler/v2/pkg/apply",
"github.com/rancher/wrangler/v3/pkg/apply",
"github.com/rancher/lasso/pkg/controller",
"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",
"github.com/rancher/wrangler/v3/pkg/condition",
"github.com/rancher/wrangler/v3/pkg/schemes",
"github.com/rancher/wrangler/v3/pkg/generic",
"github.com/rancher/wrangler/v3/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 @@ -13,8 +13,8 @@ import (
"k8s.io/gengo/v2/generator"
"k8s.io/gengo/v2/types"

cgargs "github.com/rancher/wrangler/v2/pkg/controller-gen/args"
"github.com/rancher/wrangler/v2/pkg/controller-gen/generators"
cgargs "github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"github.com/rancher/wrangler/v3/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/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/rancher/wrangler/v3/pkg/apply"
"github.com/rancher/wrangler/v3/pkg/data/convert"
"github.com/rancher/wrangler/v3/pkg/kv"
"github.com/rancher/wrangler/v3/pkg/name"
"github.com/rancher/wrangler/v3/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 @@ -31,7 +31,7 @@ import (
"k8s.io/client-go/rest"

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

var (
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/v2/pkg/yaml"
"github.com/rancher/wrangler/v3/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/v2/pkg/data/convert"
"github.com/rancher/wrangler/v3/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.

Loading

0 comments on commit f3b392a

Please sign in to comment.