Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,32 @@ require (
github.com/onsi/ginkgo/v2 v2.28.0
github.com/onsi/gomega v1.39.1
github.com/openshift-online/ocm-api-model/clientapi v0.0.448
github.com/openshift-online/ocm-cli v1.0.10
github.com/openshift-online/ocm-cli v1.0.11
github.com/openshift-online/ocm-sdk-go v0.1.493
github.com/openshift/backplane-api v0.0.0-20251117160932-490f3091533f
github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/sirupsen/logrus v1.9.4
github.com/spf13/cobra v1.10.1
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/spf13/viper v1.21.0
github.com/trivago/tgo v1.0.7
go.uber.org/mock v0.6.0
golang.org/x/term v0.39.0
gopkg.in/AlecAivazis/survey.v1 v1.8.8
k8s.io/api v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/apimachinery v0.34.3
k8s.io/cli-runtime v0.30.3
k8s.io/client-go v0.30.3
Comment on lines 33 to 36
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat go.mod | head -50

Repository: openshift/backplane-cli

Length of output: 1949


🏁 Script executed:

rg -n "k8s\.io" go.mod

Repository: openshift/backplane-cli

Length of output: 712


🌐 Web query:

kubernetes k8s.io version compatibility requirements apimachinery api client-go alignment

💡 Result:

  • Pin k8s.io/client-go, k8s.io/apimachinery, and k8s.io/api to the same Kubernetes minor (and ideally same patch) tag. These repos are synced from Kubernetes staging/ and are intended to be consumed as a matched set; mixing minors is a common cause of scheme/serialization/type and generated-client breakage. In particular, client-go explicitly depends on companion libs (apimachinery, api) and says they must be vendored in “correspondingly matching versions”. [1][2]
  • Recommended alignment rule (Go modules): use the matching semver tags:
    • Kubernetes v1.X.Yk8s.io/client-go v0.X.Y (and typically k8s.io/api v0.X.Y, k8s.io/apimachinery v0.X.Y). client-go publishes matching tags and explains that kubernetes-1.X.Y and v0.X.Y correspond to the same staged code. [1]
  • Do not rely on cross-version API compatibility guarantees for apimachinery (or other k8s.io/* staging libs). apimachinery states there are no compatibility guarantees and that branches track Kubernetes. Treat it as “must match Kubernetes/client-go”. [3]
  • Cluster compatibility is broader than library compatibility. client-go provides a “compatibility matrix” showing “exact match” vs “skew” behavior across Kubernetes versions, and notes older clients often work with newer clusters due to Kubernetes’ backward compatibility—but that’s separate from the requirement to keep the Go modules (api/apimachinery/client-go) aligned with each other. [1]

Practical requirement: pick one Kubernetes minor X and keep all k8s.io/{client-go,api,apimachinery} at v0.X.* (same X; preferably same patch *) to avoid mismatched generated types/schemes/negotiation code. [1][3]

Sources:
[1] kubernetes/client-go README (versioning + compatibility matrix + matching tags) (github.com)
[2] “Introducing client-go version 6” (client-go requires matching api/apimachinery versions) (kubernetes.io)
[3] pkg.go.dev k8s.io/apimachinery (explicitly: no compatibility guarantees; tracks Kubernetes) (pkg.go.dev)

Citations:


Kubernetes package version mismatch: align k8s.io/apimachinery with other k8s.io packages.

k8s.io/apimachinery v0.34.3 is misaligned with k8s.io/api v0.30.3, k8s.io/cli-runtime v0.30.3, and k8s.io/client-go v0.30.3. These packages are synced from Kubernetes staging/ and must be consumed as a matched set at the same minor version. Kubernetes explicitly documents that mixing minors is a common cause of scheme, serialization, and type conflicts. Update k8s.io/apimachinery to v0.30.3 to match the others.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` around lines 33 - 36, Update the Kubernetes dependency set so all
k8s.io modules use the same minor version: change the k8s.io/apimachinery entry
from v0.34.3 to v0.30.3 to match k8s.io/api, k8s.io/cli-runtime, and
k8s.io/client-go; ensure go.mod is updated accordingly and run `go mod tidy` to
reconcile module graph and vendor files.

sigs.k8s.io/kustomize/api v0.21.0
sigs.k8s.io/yaml v1.6.0
)

require (
al.essio.dev/pkg/shellescape v1.6.0 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.5 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/jsonschema-go v0.3.0 // indirect
Expand All @@ -49,19 +51,21 @@ require (
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/openshift-online/ocm-api-model/model v0.0.448 // indirect
github.com/openshift-online/ocm-common v0.0.29 // indirect
github.com/openshift-online/ocm-common v0.0.34 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/tools v0.41.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)

require (
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.17 // indirect
Expand All @@ -76,11 +80,11 @@ require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/danieljoos/wincred v1.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dvsekhvalnov/jose2go v1.7.0 // indirect
github.com/dvsekhvalnov/jose2go v1.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/structs v1.1.0 // indirect
Expand All @@ -92,17 +96,16 @@ require (
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/godbus/dbus/v5 v5.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.5 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/imdario/mergo v0.3.13 // indirect
Expand All @@ -112,15 +115,14 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/microcosm-cc/bluemonday v1.0.25 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/mtibben/percent v0.2.1 // indirect
Expand All @@ -130,33 +132,33 @@ require (
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.19.2 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/zalando/go-keyring v0.2.3 // indirect
github.com/zalando/go-keyring v0.2.6 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.9.0 // indirect
google.golang.org/protobuf v1.36.7 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
)
Loading