Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps)!: bump k8s dependencies to 1.30 #13413

Merged
merged 12 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ endif
$(GOPATH)/bin/controller-gen:
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
endif
$(GOPATH)/bin/go-to-protobuf:
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
# TODO: currently fails on v0.30.3 with
Copy link
Member

Choose a reason for hiding this comment

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

What package is this?

Copy link
Contributor Author

@blkperl blkperl Aug 12, 2024

Choose a reason for hiding this comment

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

I'm not sure what you mean. It fails to make pre-commit -B when I bump the version for this go install

go install k8s.io/code-generator/cmd/[email protected]

# Unable to clean package k8s.io.api.core.v1: remove /home/runner/go/pkg/mod/k8s.io/[email protected]/core/v1/generated.proto: permission denied
go install k8s.io/code-generator/cmd/[email protected]
endif
$(GOPATH)/src/github.com/gogo/protobuf:
Expand Down Expand Up @@ -623,7 +625,7 @@ pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go: $(TYPES)

dist/kubernetes.swagger.json:
@mkdir -p dist
./hack/recurl.sh dist/kubernetes.swagger.json https://raw.githubusercontent.com/kubernetes/kubernetes/v1.23.3/api/openapi-spec/swagger.json
./hack/recurl.sh dist/kubernetes.swagger.json https://raw.githubusercontent.com/kubernetes/kubernetes/v1.30.3/api/openapi-spec/swagger.json

pkg/apiclient/_.secondary.swagger.json: hack/api/swagger/secondaryswaggergen.go pkg/apis/workflow/v1alpha1/openapi_generated.go dist/kubernetes.swagger.json
rm -Rf v3 vendor
Expand Down
1,011 changes: 667 additions & 344 deletions api/jsonschema/schema.json

Large diffs are not rendered by default.

1,123 changes: 762 additions & 361 deletions api/openapi-spec/swagger.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cmd/argo/commands/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

"github.com/argoproj/argo-workflows/v3/cmd/argo/commands/client"
"github.com/argoproj/argo-workflows/v3/cmd/argo/commands/common"
Expand Down Expand Up @@ -75,7 +75,7 @@ func NewLogsCommand() *cobra.Command {
}

if since > 0 {
logOptions.SinceSeconds = pointer.Int64(int64(since.Seconds()))
logOptions.SinceSeconds = ptr.To(int64(since.Seconds()))
}

if sinceTime != "" {
Expand All @@ -86,7 +86,7 @@ func NewLogsCommand() *cobra.Command {
}

if tailLines >= 0 {
logOptions.TailLines = pointer.Int64(tailLines)
logOptions.TailLines = ptr.To(tailLines)
}

// set-up
Expand Down
6 changes: 3 additions & 3 deletions config/node_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

func TestNodeEvents_IsEnabled(t *testing.T) {
assert.True(t, NodeEvents{}.IsEnabled())
assert.False(t, NodeEvents{Enabled: pointer.Bool(false)}.IsEnabled())
assert.True(t, NodeEvents{Enabled: pointer.Bool(true)}.IsEnabled())
assert.False(t, NodeEvents{Enabled: ptr.To(false)}.IsEnabled())
assert.True(t, NodeEvents{Enabled: ptr.To(true)}.IsEnabled())
}
321 changes: 244 additions & 77 deletions docs/executor_swagger.md

Large diffs are not rendered by default.

580 changes: 354 additions & 226 deletions docs/fields.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/example-golang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
wfclientset "github.com/argoproj/argo-workflows/v3/pkg/client/clientset/versioned"
Expand Down Expand Up @@ -61,7 +61,7 @@ func main() {

// wait for the workflow to complete
fieldSelector := fields.ParseSelectorOrDie(fmt.Sprintf("metadata.name=%s", createdWf.Name))
watchIf, err := wfClient.Watch(ctx, metav1.ListOptions{FieldSelector: fieldSelector.String(), TimeoutSeconds: pointer.Int64(180)})
watchIf, err := wfClient.Watch(ctx, metav1.ListOptions{FieldSelector: fieldSelector.String(), TimeoutSeconds: ptr.To(int64(180))})
errors.CheckError(err)
defer watchIf.Stop()
for next := range watchIf.ResultChan() {
Expand Down
50 changes: 24 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe
google.golang.org/grpc v1.61.0
gopkg.in/go-playground/webhooks.v5 v5.17.0
k8s.io/api v0.26.15
k8s.io/apimachinery v0.26.15
k8s.io/cli-runtime v0.26.15
k8s.io/client-go v0.26.15
k8s.io/api v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/cli-runtime v0.30.3
k8s.io/client-go v0.30.3
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d
k8s.io/klog/v2 v2.80.1
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
k8s.io/kubectl v0.26.15
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d
k8s.io/klog/v2 v2.120.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
k8s.io/kubectl v0.30.3
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/yaml v1.4.0
zombiezen.com/go/sqlite v1.2.0
)
Expand All @@ -86,11 +86,13 @@ require (
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/evilmonkeyinc/jsonpath v0.8.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gobwas/glob v0.2.4-0.20181002190808-e7a84e9525fe // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
Expand Down Expand Up @@ -120,7 +122,7 @@ require (
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
Expand All @@ -129,6 +131,7 @@ require (
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.29.1 // indirect
sigs.k8s.io/kustomize/kustomize/v5 v5.0.4-0.20230601165947-6ce0bf390ce3 // indirect
)

require (
Expand Down Expand Up @@ -185,15 +188,15 @@ require (
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fvbommel/sortorder v1.0.1 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand All @@ -203,7 +206,6 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20220719135131-f79ec2192282 // indirect
github.com/google/go-querystring v1.1.0 // indirect
Expand Down Expand Up @@ -273,12 +275,12 @@ require (
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xlab/treeprint v1.1.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
go.opencensus.io v0.24.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0
Expand All @@ -290,16 +292,12 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.26.15 // indirect
k8s.io/component-helpers v0.26.15 // indirect
k8s.io/metrics v0.26.15 // indirect
k8s.io/component-base v0.30.3 // indirect
k8s.io/component-helpers v0.30.3 // indirect
k8s.io/metrics v0.30.3 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kustomize/v4 v4.5.7 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

// Avoid CVE-2023-45288
replace golang.org/x/net => golang.org/x/net v0.23.0
Loading
Loading