Skip to content

Commit

Permalink
bump controller-runtime and k8s deps (#6634)
Browse files Browse the repository at this point in the history
bumps controller-tools to v0.16.3
bumps k8s.io dependencies

Also Removed +required tag from ExtensionServiceReference.Name

Starting with version v0.16.0 of controller-tool, the +required tag began being processed, leading to the inclusion of new "required" entries in CRDs.

The ExtensionServiceReference is used in the AuthorizationServer as an optional field, but it is embedded as a struct rather than a pointer.
This causes it to be included in requests even when not explicitly set.

This resulted in the following error:

HTTPProxy.projectcontour.io "external-auth" is invalid:
[spec.virtualhost.authorization.extensionRef.name: Required value, <nil>:
Invalid value: "null": some validation rules were not checked because the
object was invalid; correct the existing errors to complete validation]

Ideally, HTTPProxy.Spec.VirtualHost.Authorization.ExtensionServiceRef should have been a pointer to make it truly optional.
However, changing it to a pointer now would break backward compatibility.
An alternative solution is to make ExtensionServiceReference.Name optional, which should be acceptable since the +required tag was never enforced by the CRD in the first place.

Signed-off-by: Tero Saarni <[email protected]>
  • Loading branch information
tsaarni authored Oct 21, 2024
1 parent bd5bbfd commit 6fb1a29
Show file tree
Hide file tree
Showing 9 changed files with 699 additions and 583 deletions.
1 change: 0 additions & 1 deletion apis/projectcontour/v1/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ type ExtensionServiceReference struct {
//
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
//
// +required
// +kubebuilder:validation:MinLength=1
Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"`
}
Expand Down
217 changes: 123 additions & 94 deletions examples/contour/01-crds.yaml

Large diffs are not rendered by default.

32 changes: 3 additions & 29 deletions examples/gateway-provisioner/01-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ rules:
- configmaps
- endpoints
- namespaces
- secrets
- services
verbs:
- get
- list
Expand Down Expand Up @@ -103,22 +101,6 @@ rules:
- tlsroutes/status
verbs:
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- gatewayclasses
- gateways
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
- gatewayclasses/status
- gateways/status
verbs:
- update
- apiGroups:
- networking.k8s.io
resources:
Expand Down Expand Up @@ -146,17 +128,6 @@ rules:
- list
- update
- watch
- apiGroups:
- projectcontour.io
resources:
- contourconfigurations
- extensionservices
- httpproxies
- tlscertificatedelegations
verbs:
- get
- list
- watch
- apiGroups:
- projectcontour.io
resources:
Expand All @@ -171,6 +142,9 @@ rules:
- projectcontour.io
resources:
- contourdeployments
- extensionservices
- httpproxies
- tlscertificatedelegations
verbs:
- get
- list
Expand Down
217 changes: 123 additions & 94 deletions examples/render/contour-deployment.yaml

Large diffs are not rendered by default.

249 changes: 126 additions & 123 deletions examples/render/contour-gateway-provisioner.yaml

Large diffs are not rendered by default.

217 changes: 123 additions & 94 deletions examples/render/contour-gateway.yaml

Large diffs are not rendered by default.

217 changes: 123 additions & 94 deletions examples/render/contour.yaml

Large diffs are not rendered by default.

38 changes: 20 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ require (
go.uber.org/automaxprocs v1.6.0
golang.org/x/oauth2 v0.23.0
gonum.org/v1/plot v0.14.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157
google.golang.org/grpc v1.65.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.30.3
k8s.io/apiextensions-apiserver v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/client-go v0.30.3
k8s.io/api v0.31.1
k8s.io/apiextensions-apiserver v0.31.1
k8s.io/apimachinery v0.31.1
k8s.io/client-go v0.31.1
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
sigs.k8s.io/controller-runtime v0.18.4
sigs.k8s.io/controller-tools v0.15.0
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3
sigs.k8s.io/controller-runtime v0.19.0
sigs.k8s.io/controller-tools v0.16.3
sigs.k8s.io/gateway-api v1.1.0
sigs.k8s.io/kustomize/kyaml v0.17.2
)
Expand All @@ -58,12 +58,12 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chigopher/pathlib v0.19.1 // indirect
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.6 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-fonts/liberation v0.3.1 // indirect
Expand All @@ -82,7 +82,7 @@ require (
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
Expand All @@ -99,7 +99,7 @@ require (
github.com/miekg/dns v1.1.59 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.5.0 // 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
Expand All @@ -114,17 +114,18 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/tsaarni/x500dn v1.0.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/image v0.11.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
Expand All @@ -134,13 +135,14 @@ require (
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.24.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f // indirect
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
Loading

0 comments on commit 6fb1a29

Please sign in to comment.