Skip to content

deps: comprehensive dependency upgrade to latest versions - #306

Closed
salv-orlando wants to merge 1 commit into
vmware:mainfrom
salv-orlando:dep_upgrade
Closed

salv-orlando wants to merge 1 commit into
vmware:mainfrom
salv-orlando:dep_upgrade

Conversation

@salv-orlando

Copy link
Copy Markdown
Member

This commit modernizes all dependencies and removes obsolete packages while maintaining full API compatibility and test coverage.

Upgrades completed:

  • github.com/openshift/api: v3.9.1+incompatible -> v0.0.0-20260521125114 (latest)
  • github.com/pkg/errors: v0.9.1 -> v0.9.2-0.20260327151000 (latest commit)
  • github.com/sirupsen/logrus: v1.8.3 -> v1.9.4
  • github.com/spf13/pflag: v1.0.5 -> v1.0.10
  • github.com/stretchr/testify: v1.7.0 -> v1.11.1
  • github.com/vmware/go-vmware-nsxt: v0.0.0-20201207175959 -> v0.0.0-20230223012718
  • github.com/vmware/vsphere-automation-sdk-go/runtime: v0.7.0 -> v0.8.1-0.20250317060414
  • github.com/vmware/vsphere-automation-sdk-go/services/nsxt: v0.12.0 -> v0.12.1-0.20250317060414
  • gopkg.in/ini.v1: v1.51.0 -> v1.67.2

Kubernetes ecosystem coordinated upgrade:

  • k8s.io/api: v0.18.2 -> v0.36.1
  • k8s.io/apimachinery: v0.18.3 -> v0.36.1
  • k8s.io/client-go: v12.0.0+incompatible -> v0.36.1
  • k8s.io/kubectl: v0.17.4 -> v0.36.1
  • sigs.k8s.io/controller-runtime: v0.5.2 -> v0.24.1

Indirect dependency upgrades:

  • github.com/klauspost/compress: v1.18.1 -> v1.18.6
  • golang.org/x/net: v0.53.0 -> v0.55.0
  • golang.org/x/oauth2: v0.35.0 -> v0.36.0
  • golang.org/x/sys: v0.43.0 -> v0.45.0
  • golang.org/x/term: v0.42.0 -> v0.43.0
  • golang.org/x/text: v0.36.0 -> v0.37.0
  • golang.org/x/time: v0.14.0 -> v0.15.0

Dependencies removed:

  • github.com/ghodss/yaml v1.0.0 (replaced with sigs.k8s.io/yaml v1.6.0)
  • github.com/imdario/mergo v0.3.7 (replaced with dario.cat/mergo v1.0.2)
  • github.com/openshift/cluster-network-operator v0.0.0-20200505233431 (internalized utilities)
  • github.com/openshift/library-go v0.0.0-20200511081854 (internalized helpers)
  • github.com/operator-framework/operator-sdk v0.17.1 (no longer needed)

Dependencies added:

  • dario.cat/mergo v1.0.2 (modern replacement for imdario/mergo)
  • github.com/go-logr/zapr v1.3.1-0.20260413055308 (latest commit)
  • go.uber.org/zap v1.28.0 (structured logging)
  • k8s.io/utils v0.0.0-20260507154919 (Kubernetes utilities)
  • sigs.k8s.io/yaml v1.6.0 (modern YAML library)

Comprehensive application logic changes:

  • Removed dependency on openshift/cluster-network-operator by internalizing utilities:
    • Created pkg/util/render/render.go with custom template rendering
    • Created pkg/util/k8s/unstructured.go with ToUnstructured helper
    • Created pkg/util/k8s/v1helpers.go with status condition helpers
  • Updated import paths across all controllers to use internal utilities
  • Replaced github.com/ghodss/yaml with sigs.k8s.io/yaml throughout codebase
  • Fixed controller-runtime v0.18+ status subresource semantics in tests:
    • Configured fake clients with WithStatusSubresource()
    • Changed client.Update() to client.Status().Update() for status fields
  • Updated Go version requirement to 1.26.2
  • Modernized dependency analyzer script with enhanced pseudo-version handling
  • All unit tests pass with new dependency versions
  • Build verified with latest Kubernetes v0.36.1 APIs

This upgrade resolves version conflicts, removes 216+ obsolete transitive dependencies, and positions the project for modern Kubernetes environments.

This commit modernizes all dependencies and removes obsolete packages while
maintaining full API compatibility and test coverage.

Upgrades completed:
- github.com/openshift/api: v3.9.1+incompatible -> v0.0.0-20260521125114 (latest)
- github.com/pkg/errors: v0.9.1 -> v0.9.2-0.20260327151000 (latest commit)
- github.com/sirupsen/logrus: v1.8.3 -> v1.9.4
- github.com/spf13/pflag: v1.0.5 -> v1.0.10
- github.com/stretchr/testify: v1.7.0 -> v1.11.1
- github.com/vmware/go-vmware-nsxt: v0.0.0-20201207175959 -> v0.0.0-20230223012718
- github.com/vmware/vsphere-automation-sdk-go/runtime: v0.7.0 -> v0.8.1-0.20250317060414
- github.com/vmware/vsphere-automation-sdk-go/services/nsxt: v0.12.0 -> v0.12.1-0.20250317060414
- gopkg.in/ini.v1: v1.51.0 -> v1.67.2
- github.com/vmware/go-vmware-nsxt: v0.0.0-20230223012718-d31b8a1ca05e -> v0.0.0-20260605141659-71d9620e9c4e

Kubernetes ecosystem coordinated upgrade:
- k8s.io/api: v0.18.2 -> v0.36.1
- k8s.io/apimachinery: v0.18.3 -> v0.36.1
- k8s.io/client-go: v12.0.0+incompatible -> v0.36.1
- k8s.io/kubectl: v0.17.4 -> v0.36.1
- sigs.k8s.io/controller-runtime: v0.5.2 -> v0.24.1

Indirect dependency upgrades:
- github.com/klauspost/compress: v1.18.1 -> v1.18.6
- golang.org/x/net: v0.53.0 -> v0.55.0
- golang.org/x/oauth2: v0.35.0 -> v0.36.0
- golang.org/x/sys: v0.43.0 -> v0.45.0
- golang.org/x/term: v0.42.0 -> v0.43.0
- golang.org/x/text: v0.36.0 -> v0.37.0
- golang.org/x/time: v0.14.0 -> v0.15.0

Dependencies removed:
- github.com/ghodss/yaml v1.0.0 (replaced with sigs.k8s.io/yaml v1.6.0)
- github.com/imdario/mergo v0.3.7 (replaced with dario.cat/mergo v1.0.2)
- github.com/openshift/cluster-network-operator v0.0.0-20200505233431 (internalized utilities)
- github.com/openshift/library-go v0.0.0-20200511081854 (internalized helpers)
- github.com/operator-framework/operator-sdk v0.17.1 (no longer needed)
- github.com/antihax/optional v1.0.0 dependency (no longer needed)

Dependencies added:
- dario.cat/mergo v1.0.2 (modern replacement for imdario/mergo)
- github.com/go-logr/zapr v1.3.1-0.20260413055308 (latest commit)
- go.uber.org/zap v1.28.0 (structured logging)
- k8s.io/utils v0.0.0-20260507154919 (Kubernetes utilities)
- sigs.k8s.io/yaml v1.6.0 (modern YAML library)

Comprehensive application logic changes:
- Removed dependency on openshift/cluster-network-operator by internalizing utilities:
  * Created pkg/util/render/render.go with custom template rendering
  * Created pkg/util/k8s/unstructured.go with ToUnstructured helper
  * Created pkg/util/k8s/v1helpers.go with status condition helpers
- Updated import paths across all controllers to use internal utilities
- Replaced github.com/ghodss/yaml with sigs.k8s.io/yaml throughout codebase
- Fixed controller-runtime v0.18+ status subresource semantics in tests:
  * Configured fake clients with WithStatusSubresource()
  * Changed client.Update() to client.Status().Update() for status fields
- Updated Go version requirement to 1.26.2
- Modernized dependency analyzer script with enhanced pseudo-version handling
- All unit tests pass with new dependency versions
- Build verified with latest Kubernetes v0.36.1 APIs

This upgrade resolves version conflicts, removes multiple obsolete transitive
dependencies, and positions the project for modern Kubernetes environments.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant