Skip to content

Commit

Permalink
Merge pull request #28 from digitalocean/jjames/DELI-5729-upgrade-cli…
Browse files Browse the repository at this point in the history
…ent-go

Upgrade client-go to 1.28.7
  • Loading branch information
ndombroski authored May 15, 2024
2 parents 17448ba + 82fa4c3 commit 52632a1
Show file tree
Hide file tree
Showing 1,885 changed files with 221,784 additions and 52,445 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENVTEST := digitalocean/k8s-env-test
# Digest of the currently used envtest image
ENVTEST_DIGEST := sha256:f2d8c1e431bf079f48854e2910da8e66cb5b829380a8052f5d7ecaf49a341896

K8S_VERSION := 1.25.5
K8S_VERSION := 1.28.7
ETCD_VERSION := 3.5.0
GO_VERSION := 1.19

Expand Down
2 changes: 1 addition & 1 deletion api/netbox/v1beta1/netboxip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestValidationSchema(t *testing.T) {
if err := apiextensionsv1.Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(NetBoxIPValidationSchema, &schema, nil); err != nil {
t.Errorf("converting CRD validation: %q\n", err)
}
validator, _, err := apiservervalidation.NewSchemaValidator(&schema)
validator, _, err := apiservervalidation.NewSchemaValidator(schema.OpenAPIV3Schema)
if err != nil {
t.Errorf("creating validator: %q\n", err)
}
Expand Down
13 changes: 10 additions & 3 deletions cmd/netbox-ip-controller/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

const (
Expand Down Expand Up @@ -331,11 +332,14 @@ func run(ctx context.Context, globalCfg *globalConfig, cfg *rootConfig) error {
}

mgr, err := manager.New(globalCfg.kubeConfig, manager.Options{
Scheme: scheme,
Logger: zapr.NewLogger(logger.Named("netbox-ip-controller")),
MetricsBindAddress: cfg.metricsAddr,
Scheme: scheme,
Logger: zapr.NewLogger(logger.Named("netbox-ip-controller")),
Metrics: metricsserver.Options{
BindAddress: cfg.metricsAddr,
},
HealthProbeBindAddress: cfg.readyCheckAddr,
})
client := mgr.GetClient()

if err != nil {
return fmt.Errorf("unable to set up manager: %s", err)
Expand All @@ -352,6 +356,7 @@ func run(ctx context.Context, globalCfg *globalConfig, cfg *rootConfig) error {
controllers := make(map[string]ctrl.Controller)

netboxController, err := netboxipctrl.New(
ctrl.WithKubernetesClient(client),
ctrl.WithLogger(logger),
ctrl.WithNetBoxClient(netboxClient),
)
Expand All @@ -361,6 +366,7 @@ func run(ctx context.Context, globalCfg *globalConfig, cfg *rootConfig) error {
controllers["netboxip"] = netboxController

podCtrOpts := []ctrl.Option{
ctrl.WithKubernetesClient(client),
ctrl.WithLogger(logger),
ctrl.WithTags(cfg.podTags, netboxClient),
ctrl.WithLabels(cfg.podLabels),
Expand All @@ -374,6 +380,7 @@ func run(ctx context.Context, globalCfg *globalConfig, cfg *rootConfig) error {
}
controllers["pod"] = podController
svcCtrOpts := []ctrl.Option{
ctrl.WithKubernetesClient(client),
ctrl.WithLogger(logger),
ctrl.WithTags(cfg.serviceTags, netboxClient),
ctrl.WithLabels(cfg.serviceLabels),
Expand Down
93 changes: 49 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,87 +3,92 @@ module github.com/digitalocean/netbox-ip-controller
go 1.19

require (
github.com/go-logr/zapr v1.2.3
github.com/google/go-cmp v0.5.8
github.com/go-logr/zapr v1.2.4
github.com/google/go-cmp v0.5.9
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/go-retryablehttp v0.7.1
github.com/prometheus/client_golang v1.12.2
github.com/spf13/cobra v1.4.0
github.com/prometheus/client_golang v1.16.0
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.11.0
go.uber.org/zap v1.21.0
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
k8s.io/api v0.25.5
k8s.io/apiextensions-apiserver v0.25.5
k8s.io/apimachinery v0.25.5
k8s.io/client-go v0.25.5
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
sigs.k8s.io/controller-runtime v0.13.1
go.uber.org/zap v1.25.0
golang.org/x/time v0.3.0
k8s.io/api v0.28.7
k8s.io/apiextensions-apiserver v0.28.7
k8s.io/apimachinery v0.28.7
k8s.io/client-go v0.28.7
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/controller-runtime v0.16.1
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/cel-go v0.16.1 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.25.5 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
k8s.io/apiserver v0.28.7 // indirect
k8s.io/component-base v0.28.7 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 52632a1

Please sign in to comment.