Skip to content

Commit

Permalink
Bump golang and kind version (#541)
Browse files Browse the repository at this point in the history
* Bump golang and kind version

* Bump k8s.io golang deps

* Fix golang-lint errors

* Bump k8s.io golang deps
  • Loading branch information
ReToCode authored Sep 19, 2023
1 parent b19edf4 commit d348f30
Show file tree
Hide file tree
Showing 471 changed files with 44,936 additions and 25,720 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
fail-fast: false # Keep running if one leg fails.
matrix:
k8s-version:
- v1.25.x
- v1.26.x
- v1.27.x
- v1.28.x
ingress:
- istio
- contour
Expand All @@ -28,10 +28,10 @@ jobs:

steps:

- name: Set up Go 1.19.x
- name: Set up Go 1.21.x
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: 1.21.x

- uses: imjasonh/setup-ko@v0.6

Expand Down
14 changes: 6 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/google/go-cmp v0.5.9
github.com/hashicorp/golang-lru v1.0.2
go.uber.org/zap v1.26.0
k8s.io/api v0.26.5
k8s.io/apimachinery v0.26.5
k8s.io/api v0.26.9
k8s.io/apimachinery v0.26.9
k8s.io/client-go v0.26.5
k8s.io/code-generator v0.26.5
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
Expand All @@ -19,8 +19,6 @@ require (
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -97,9 +95,9 @@ require (
)

replace (
k8s.io/api => k8s.io/api v0.25.4
k8s.io/apimachinery => k8s.io/apimachinery v0.25.4
k8s.io/client-go => k8s.io/client-go v0.25.4
k8s.io/code-generator => k8s.io/code-generator v0.25.4
k8s.io/api => k8s.io/api v0.26.9
k8s.io/apimachinery => k8s.io/apimachinery v0.26.9
k8s.io/client-go => k8s.io/client-go v0.26.9
k8s.io/code-generator => k8s.io/code-generator v0.26.9
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
)
20 changes: 8 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
Expand Down Expand Up @@ -669,16 +665,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs=
k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ=
k8s.io/api v0.26.9 h1:s8Y+G1u2JM55b90+Yo2RVb3PGT/hkWNVPN4idPERxJg=
k8s.io/api v0.26.9/go.mod h1:W/W4fEWRVzPD36820LlVUQfNBiSbiq0VPWRFJKwzmUg=
k8s.io/apiextensions-apiserver v0.26.5 h1:VJ946z9RjyCPn3qiz4Kus/UYjCRrdn1xUvEsJFvN5Yo=
k8s.io/apiextensions-apiserver v0.26.5/go.mod h1:Olsde7ZNWnyz9rsL13iXYXmL1h7kWujtKeC3yWVCDPo=
k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc=
k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo=
k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8=
k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw=
k8s.io/code-generator v0.25.4 h1:tjQ7/+9eN7UOiU2DP+0v4ntTI4JZLi2c1N0WllpFhTc=
k8s.io/code-generator v0.25.4/go.mod h1:9F5fuVZOMWRme7MYj2YT3L9ropPWPokd9VRhVyD3+0w=
k8s.io/apimachinery v0.26.9 h1:5yAV9cFR7Z4gIorKcAjWnx4uxtxiFsERwq4Pvmx0CCg=
k8s.io/apimachinery v0.26.9/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0=
k8s.io/client-go v0.26.9 h1:TGWi/6guEjIgT0Hg871Gsmx0qFuoGyGFjlFedrk7It0=
k8s.io/client-go v0.26.9/go.mod h1:tU1FZS0bwAmAFyPYpZycUQrQnUMzQ5MHloop7EbX6ow=
k8s.io/code-generator v0.26.9 h1:GiS9v3UE3bpE6Zp3sr9ooNJpZXwscjdyzMMVYWk6UmI=
k8s.io/code-generator v0.26.9/go.mod h1:seNkA/wYpeG1GT1REW1xHk4MCjQcVbx6FFAXKwCgdlE=
k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9 h1:iu3o/SxaHVI7tKPtkGzD3M9IzrE21j+CUKH98NQJ8Ms=
k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
Expand Down
24 changes: 12 additions & 12 deletions pkg/reconciler/ingress/ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ func TestReconcileTLS(t *testing.T) {
Name: "Happy TLS",
Key: "ns/name",
Objects: []runtime.Object{
ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName)),
ing(withBasicSpec, withGatewayAPIClass, withTLS()),
secret(secretName, nsName),
gw(defaultListener),
},
WantCreates: []runtime.Object{
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName))),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS())),
rp(secret(secretName, nsName)),
},
WantUpdates: []clientgotesting.UpdateActionImpl{{
Expand All @@ -294,7 +294,7 @@ func TestReconcileTLS(t *testing.T) {
Patch: []byte(`{"metadata":{"finalizers":["ingresses.networking.internal.knative.dev"],"resourceVersion":""}}`),
}},
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
Object: ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName), func(i *v1alpha1.Ingress) {
Object: ing(withBasicSpec, withGatewayAPIClass, withTLS(), func(i *v1alpha1.Ingress) {
i.Status.InitializeConditions()
i.Status.MarkLoadBalancerReady(
[]v1alpha1.LoadBalancerIngressStatus{{
Expand All @@ -313,17 +313,17 @@ func TestReconcileTLS(t *testing.T) {
Name: "Already Configured",
Key: "ns/name",
Objects: []runtime.Object{
ing(withBasicSpec, withFinalizer, withGatewayAPIClass, withTLS(secretName)),
ing(withBasicSpec, withFinalizer, withGatewayAPIClass, withTLS()),
secret(secretName, nsName),
gw(defaultListener, tlsListener("secure.example.com", nsName, secretName)),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName))),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS())),
rp(secret(secretName, nsName)),
},
WantUpdates: []clientgotesting.UpdateActionImpl{
// None
},
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
Object: ing(withBasicSpec, withFinalizer, withGatewayAPIClass, withTLS(secretName), func(i *v1alpha1.Ingress) {
Object: ing(withBasicSpec, withFinalizer, withGatewayAPIClass, withTLS(), func(i *v1alpha1.Ingress) {
i.Status.InitializeConditions()
i.Status.MarkLoadBalancerReady(
[]v1alpha1.LoadBalancerIngressStatus{{
Expand All @@ -342,14 +342,14 @@ func TestReconcileTLS(t *testing.T) {
Key: "ns/name",
SkipNamespaceValidation: true,
Objects: []runtime.Object{
ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName), func(i *v1alpha1.Ingress) {
ing(withBasicSpec, withGatewayAPIClass, withTLS(), func(i *v1alpha1.Ingress) {
i.DeletionTimestamp = &metav1.Time{
Time: deleteTime,
}
}),
secret(secretName, nsName),
gw(defaultListener, tlsListener("secure.example.com", nsName, secretName)),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName))),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS())),
rp(secret(secretName, nsName)),
},
WantUpdates: []clientgotesting.UpdateActionImpl{{
Expand All @@ -360,11 +360,11 @@ func TestReconcileTLS(t *testing.T) {
Key: "ns/name",
WantErr: true,
Objects: []runtime.Object{
ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName)),
ing(withBasicSpec, withGatewayAPIClass, withTLS()),
secret(secretName, nsName),
},
WantCreates: []runtime.Object{
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName))),
httpRoute(t, ing(withBasicSpec, withGatewayAPIClass, withTLS())),
rp(secret(secretName, nsName)),
},
WantUpdates: []clientgotesting.UpdateActionImpl{
Expand All @@ -378,7 +378,7 @@ func TestReconcileTLS(t *testing.T) {
Patch: []byte(`{"metadata":{"finalizers":["ingresses.networking.internal.knative.dev"],"resourceVersion":""}}`),
}},
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
Object: ing(withBasicSpec, withGatewayAPIClass, withTLS(secretName), func(i *v1alpha1.Ingress) {
Object: ing(withBasicSpec, withGatewayAPIClass, withTLS(), func(i *v1alpha1.Ingress) {
i.Status.InitializeConditions()
i.Status.MarkIngressNotReady("ReconcileIngressFailed", "Ingress reconciliation failed")
}),
Expand Down Expand Up @@ -599,7 +599,7 @@ var withFinalizer = func(i *v1alpha1.Ingress) {
i.Finalizers = append(i.Finalizers, "ingresses.networking.internal.knative.dev")
}

func withTLS(secret string) IngressOption {
func withTLS() IngressOption {
return func(i *v1alpha1.Ingress) {
i.Spec.TLS = append(i.Spec.TLS, v1alpha1.IngressTLS{
Hosts: []string{"secure.example.com"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/ingress/resources/reference_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

// Grant the resource "to" access to the resource "from"
func MakeReferenceGrant(ctx context.Context, ing *netv1alpha1.Ingress, to, from metav1.PartialObjectMetadata) *gatewayv1alpha2.ReferenceGrant {
func MakeReferenceGrant(_ context.Context, ing *netv1alpha1.Ingress, to, from metav1.PartialObjectMetadata) *gatewayv1alpha2.ReferenceGrant {
name := to.Name
if len(name)+len(from.Namespace) > 62 {
name = name[:62-len(from.Namespace)]
Expand Down
Loading

0 comments on commit d348f30

Please sign in to comment.