From 44d2ad9abd390c0d6d62e7f15d497391ce0b8020 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Tue, 17 Oct 2023 13:44:53 -0700 Subject: [PATCH] bump gateway api to v1.0.0-rc1 * update all YAML resources from `v1beta1` to `v1` * update all go imports from `v1beta1` to `v1` Release details in https://github.com/kubernetes-sigs/gateway-api/releases/tag/v1.0.0-rc1 Signed-off-by: Arko Dasgupta --- api/v1alpha1/clienttrafficpolicy_types.go | 6 +- api/v1alpha1/envoygateway_types.go | 8 +- api/v1alpha1/zz_generated.deepcopy.go | 1952 ---------------- charts/gateway-helm/crds/gatewayapi-crds.yaml | 2043 +++++++++++------ .../accesslog/disable-accesslog.yaml | 2 +- .../kubernetes/accesslog/json-accesslog.yaml | 2 +- .../kubernetes/accesslog/multi-sinks.yaml | 2 +- .../kubernetes/accesslog/otel-accesslog.yaml | 2 +- .../kubernetes/accesslog/text-accesslog.yaml | 2 +- examples/kubernetes/authn/jwt.yaml | 2 +- examples/kubernetes/envoy-proxy-config.yaml | 2 +- examples/kubernetes/grpc-routing.yaml | 4 +- examples/kubernetes/http-routing.yaml | 10 +- examples/kubernetes/metric/otel-sink.yaml | 2 +- examples/kubernetes/metric/prometheus.yaml | 2 +- examples/kubernetes/multicluster-service.yaml | 8 +- examples/kubernetes/quickstart.yaml | 6 +- examples/kubernetes/tcp-routing.yaml | 4 +- examples/kubernetes/tls-termination.yaml | 4 +- examples/kubernetes/tracing/default.yaml | 2 +- go.mod | 2 +- go.sum | 4 +- ...uthn-single-route-single-match-to-xds.yaml | 6 +- .../translate/in/default-resources.yaml | 6 +- .../translate/in/echo-gateway-api.yaml | 6 +- .../translate/in/envoy-patch-policy.yaml | 6 +- .../translate/in/from-gateway-api-to-xds.yaml | 6 +- .../translate/in/invalid-envoyproxy.yaml | 6 +- .../testdata/translate/in/multiple-xds.yaml | 10 +- .../in/no-gateway-class-resources.yaml | 4 +- .../testdata/translate/in/quickstart.yaml | 6 +- ...lter-single-route-single-match-to-xds.yaml | 6 +- .../translate/in/rejected-http-route.yaml | 6 +- .../translate/in/valid-envoyproxy.yaml | 6 +- internal/cmd/egctl/translate.go | 58 +- internal/envoygateway/config/config.go | 4 +- internal/envoygateway/config/config_test.go | 18 +- internal/envoygateway/config/decoder_test.go | 4 +- internal/envoygateway/scheme.go | 4 +- .../extension/registry/extension_manager.go | 6 +- internal/extension/testutils/manager.go | 6 +- internal/extension/types/manager.go | 4 +- internal/gatewayapi/address.go | 4 +- internal/gatewayapi/clienttrafficpolicy.go | 2 +- internal/gatewayapi/contexts.go | 84 +- internal/gatewayapi/contexts_test.go | 38 +- internal/gatewayapi/envoypatchpolicy.go | 2 +- internal/gatewayapi/filters.go | 162 +- internal/gatewayapi/helpers.go | 84 +- internal/gatewayapi/helpers_test.go | 96 +- internal/gatewayapi/helpers_v1alpha2.go | 34 +- internal/gatewayapi/listener.go | 40 +- internal/gatewayapi/listener_test.go | 6 +- internal/gatewayapi/resource.go | 30 +- internal/gatewayapi/route.go | 172 +- internal/gatewayapi/runner/runner.go | 4 +- internal/gatewayapi/sort.go | 2 +- ...enttrafficpolicy-status-conditions.in.yaml | 4 +- ...nttrafficpolicy-status-conditions.out.yaml | 4 +- .../clienttrafficpolicy-tcp-keepalive.in.yaml | 2 +- ...clienttrafficpolicy-tcp-keepalive.out.yaml | 2 +- .../testdata/disable-accesslog.in.yaml | 2 +- .../testdata/disable-accesslog.out.yaml | 2 +- .../envoypatchpolicy-cross-ns-target.in.yaml | 2 +- .../envoypatchpolicy-cross-ns-target.out.yaml | 2 +- ...voypatchpolicy-invalid-target-kind.in.yaml | 2 +- ...oypatchpolicy-invalid-target-kind.out.yaml | 2 +- .../testdata/envoypatchpolicy-valid.in.yaml | 2 +- .../testdata/envoypatchpolicy-valid.out.yaml | 2 +- ...roxy-accesslog-file-json-no-format.in.yaml | 2 +- ...oxy-accesslog-file-json-no-format.out.yaml | 2 +- .../envoyproxy-accesslog-file-json.in.yaml | 2 +- .../envoyproxy-accesslog-file-json.out.yaml | 2 +- ...nvoyproxy-accesslog-with-bad-sinks.in.yaml | 2 +- ...voyproxy-accesslog-with-bad-sinks.out.yaml | 2 +- .../testdata/envoyproxy-accesslog.in.yaml | 2 +- .../testdata/envoyproxy-accesslog.out.yaml | 2 +- .../testdata/envoyproxy-valid.in.yaml | 2 +- .../testdata/envoyproxy-valid.out.yaml | 2 +- ...ith-extension-filter-invalid-group.in.yaml | 4 +- ...th-extension-filter-invalid-group.out.yaml | 4 +- ...with-non-matching-extension-filter.in.yaml | 4 +- ...ith-non-matching-extension-filter.out.yaml | 4 +- ...-with-unsupported-extension-filter.in.yaml | 4 +- ...with-unsupported-extension-filter.out.yaml | 4 +- ...proute-with-valid-extension-filter.in.yaml | 4 +- ...route-with-valid-extension-filter.out.yaml | 4 +- ...e-namespace-with-allowed-httproute.in.yaml | 4 +- ...-namespace-with-allowed-httproute.out.yaml | 4 +- ...amespace-with-disallowed-httproute.in.yaml | 4 +- ...mespace-with-disallowed-httproute.out.yaml | 4 +- ...eway-with-addresses-with-ipaddress.in.yaml | 2 +- ...way-with-addresses-with-ipaddress.out.yaml | 2 +- ...nvalid-allowed-namespaces-selector.in.yaml | 4 +- ...valid-allowed-namespaces-selector.out.yaml | 4 +- ...-with-invalid-allowed-routes-group.in.yaml | 4 +- ...with-invalid-allowed-routes-group.out.yaml | 4 +- ...-allowed-routes-kind-and-supported.in.yaml | 4 +- ...allowed-routes-kind-and-supported.out.yaml | 4 +- ...r-with-invalid-allowed-routes-kind.in.yaml | 4 +- ...-with-invalid-allowed-routes-kind.out.yaml | 4 +- ...ith-invalid-allowed-tls-route-kind.in.yaml | 2 +- ...th-invalid-allowed-tls-route-kind.out.yaml | 2 +- ...invalid-multiple-tls-configuration.in.yaml | 4 +- ...nvalid-multiple-tls-configuration.out.yaml | 4 +- ...lid-tls-configuration-invalid-mode.in.yaml | 4 +- ...id-tls-configuration-invalid-mode.out.yaml | 4 +- ...-configuration-no-certificate-refs.in.yaml | 4 +- ...configuration-no-certificate-refs.out.yaml | 4 +- ...tion-no-valid-certificate-for-fqdn.in.yaml | 4 +- ...ion-no-valid-certificate-for-fqdn.out.yaml | 4 +- ...onfiguration-secret-does-not-exist.in.yaml | 4 +- ...nfiguration-secret-does-not-exist.out.yaml | 4 +- ...guration-secret-in-other-namespace.in.yaml | 4 +- ...uration-secret-in-other-namespace.out.yaml | 4 +- ...-configuration-secret-is-not-valid.in.yaml | 4 +- ...configuration-secret-is-not-valid.out.yaml | 4 +- ...issing-allowed-namespaces-selector.in.yaml | 4 +- ...ssing-allowed-namespaces-selector.out.yaml | 4 +- ...th-listener-with-tcp-with-hostname.in.yaml | 2 +- ...h-listener-with-tcp-with-hostname.out.yaml | 2 +- ...proute-with-mismatch-port-protocol.in.yaml | 2 +- ...route-with-mismatch-port-protocol.out.yaml | 2 +- ...th-tcproute-with-multiple-backends.in.yaml | 2 +- ...h-tcproute-with-multiple-backends.out.yaml | 2 +- ...-with-tcproute-with-multiple-rules.in.yaml | 2 +- ...with-tcproute-with-multiple-rules.out.yaml | 2 +- ...ther-namespace-allowed-by-refgrant.in.yaml | 4 +- ...her-namespace-allowed-by-refgrant.out.yaml | 4 +- ...with-tls-terminate-and-passthrough.in.yaml | 4 +- ...ith-tls-terminate-and-passthrough.out.yaml | 4 +- ...th-listener-with-udp-with-hostname.in.yaml | 2 +- ...h-listener-with-udp-with-hostname.out.yaml | 2 +- ...proute-with-mismatch-port-protocol.in.yaml | 2 +- ...route-with-mismatch-port-protocol.out.yaml | 2 +- ...th-udproute-with-multiple-backends.in.yaml | 2 +- ...h-udproute-with-multiple-backends.out.yaml | 2 +- ...-with-udproute-with-multiple-rules.in.yaml | 2 +- ...with-udproute-with-multiple-rules.out.yaml | 2 +- ...h-listener-with-unmatched-tcproute.in.yaml | 2 +- ...-listener-with-unmatched-tcproute.out.yaml | 2 +- ...h-listener-with-unmatched-udproute.in.yaml | 2 +- ...-listener-with-unmatched-udproute.out.yaml | 2 +- ...listener-with-unsupported-protocol.in.yaml | 4 +- ...istener-with-unsupported-protocol.out.yaml | 4 +- ...with-same-algorithm-different-fqdn.in.yaml | 4 +- ...ith-same-algorithm-different-fqdn.out.yaml | 4 +- ...h-valid-multiple-tls-configuration.in.yaml | 4 +- ...-valid-multiple-tls-configuration.out.yaml | 4 +- ...tener-with-valid-tls-configuration.in.yaml | 4 +- ...ener-with-valid-tls-configuration.out.yaml | 4 +- ...-with-preexisting-status-condition.in.yaml | 4 +- ...with-preexisting-status-condition.out.yaml | 4 +- ...e-listener-with-multiple-tcproutes.in.yaml | 2 +- ...-listener-with-multiple-tcproutes.out.yaml | 2 +- ...e-listener-with-multiple-udproutes.in.yaml | 2 +- ...-listener-with-multiple-udproutes.out.yaml | 2 +- ...ateway-with-stale-status-condition.in.yaml | 4 +- ...teway-with-stale-status-condition.out.yaml | 4 +- ...-listeners-on-same-tcp-or-tls-port.in.yaml | 2 +- ...listeners-on-same-tcp-or-tls-port.out.yaml | 2 +- ...ith-two-listeners-on-same-udp-port.in.yaml | 2 +- ...th-two-listeners-on-same-udp-port.out.yaml | 2 +- ...nd-tlsroute-same-hostname-and-port.in.yaml | 4 +- ...d-tlsroute-same-hostname-and-port.out.yaml | 4 +- ...listeners-with-multiple-httproutes.in.yaml | 6 +- ...isteners-with-multiple-httproutes.out.yaml | 6 +- ...teners-with-same-port-and-hostname.in.yaml | 4 +- ...eners-with-same-port-and-hostname.out.yaml | 4 +- ...ame-port-and-incompatible-protocol.in.yaml | 4 +- ...me-port-and-incompatible-protocol.out.yaml | 4 +- ...s-with-same-port-http-tcp-protocol.in.yaml | 4 +- ...-with-same-port-http-tcp-protocol.out.yaml | 4 +- ...s-with-same-port-http-udp-protocol.in.yaml | 4 +- ...-with-same-port-http-udp-protocol.out.yaml | 4 +- ...rs-with-tcproutes-with-sectionname.in.yaml | 2 +- ...s-with-tcproutes-with-sectionname.out.yaml | 2 +- ...with-tcproutes-without-sectionname.in.yaml | 2 +- ...ith-tcproutes-without-sectionname.out.yaml | 2 +- ...rs-with-udproutes-with-sectionname.in.yaml | 2 +- ...s-with-udproutes-with-sectionname.out.yaml | 2 +- ...with-udproutes-without-sectionname.in.yaml | 2 +- ...ith-udproutes-without-sectionname.out.yaml | 2 +- .../grpcroute-with-header-match.in.yaml | 2 +- .../grpcroute-with-header-match.out.yaml | 2 +- ...oute-with-method-and-service-match.in.yaml | 2 +- ...ute-with-method-and-service-match.out.yaml | 2 +- .../grpcroute-with-method-match.in.yaml | 2 +- .../grpcroute-with-method-match.out.yaml | 2 +- ...route-with-request-header-modifier.in.yaml | 2 +- ...oute-with-request-header-modifier.out.yaml | 2 +- .../grpcroute-with-service-match.in.yaml | 2 +- .../grpcroute-with-service-match.out.yaml | 2 +- .../grpcroute-with-valid-authenfilter.in.yaml | 2 +- ...grpcroute-with-valid-authenfilter.out.yaml | 2 +- ...pcroute-with-valid-ratelimitfilter.in.yaml | 2 +- ...croute-with-valid-ratelimitfilter.out.yaml | 2 +- ...eway-with-more-different-listeners.in.yaml | 4 +- ...way-with-more-different-listeners.out.yaml | 4 +- ...ing-to-gateway-with-more-listeners.in.yaml | 4 +- ...ng-to-gateway-with-more-listeners.out.yaml | 4 +- ...two-listeners-with-different-ports.in.yaml | 4 +- ...wo-listeners-with-different-ports.out.yaml | 4 +- ...hing-to-gateway-with-two-listeners.in.yaml | 4 +- ...ing-to-gateway-with-two-listeners.out.yaml | 4 +- .../httproute-attaching-to-gateway.in.yaml | 4 +- .../httproute-attaching-to-gateway.out.yaml | 4 +- ...ttaching-to-listener-matching-port.in.yaml | 4 +- ...taching-to-listener-matching-port.out.yaml | 4 +- ...ener-on-gateway-with-two-listeners.in.yaml | 4 +- ...ner-on-gateway-with-two-listeners.out.yaml | 4 +- ...ener-with-serviceimport-backendref.in.yaml | 4 +- ...ner-with-serviceimport-backendref.out.yaml | 4 +- .../httproute-attaching-to-listener.in.yaml | 4 +- .../httproute-attaching-to-listener.out.yaml | 4 +- .../httproute-backend-request-timeout.in.yaml | 4 +- ...httproute-backend-request-timeout.out.yaml | 4 +- ...hing-to-listener-non-matching-port.in.yaml | 4 +- ...ing-to-listener-non-matching-port.out.yaml | 4 +- .../httproute-request-timeout.in.yaml | 4 +- .../httproute-request-timeout.out.yaml | 4 +- ...h-multiple-backends-and-no-weights.in.yaml | 4 +- ...-multiple-backends-and-no-weights.out.yaml | 4 +- ...with-multiple-backends-and-weights.in.yaml | 4 +- ...ith-multiple-backends-and-weights.out.yaml | 4 +- ...ther-namespace-allowed-by-refgrant.in.yaml | 4 +- ...her-namespace-allowed-by-refgrant.out.yaml | 4 +- ...ther-namespace-allowed-by-refgrant.in.yaml | 4 +- ...her-namespace-allowed-by-refgrant.out.yaml | 4 +- ...with-distinct-sourcecidr-ratelimit.in.yaml | 4 +- ...ith-distinct-sourcecidr-ratelimit.out.yaml | 4 +- .../httproute-with-empty-matches.in.yaml | 4 +- .../httproute-with-empty-matches.out.yaml | 4 +- ...ter-duplicate-add-multiple-filters.in.yaml | 4 +- ...er-duplicate-add-multiple-filters.out.yaml | 4 +- ...-with-header-filter-duplicate-adds.in.yaml | 4 +- ...with-header-filter-duplicate-adds.out.yaml | 4 +- ...-duplicate-remove-multiple-filters.in.yaml | 4 +- ...duplicate-remove-multiple-filters.out.yaml | 4 +- ...th-header-filter-duplicate-removes.in.yaml | 4 +- ...h-header-filter-duplicate-removes.out.yaml | 4 +- ...-header-filter-empty-header-values.in.yaml | 4 +- ...header-filter-empty-header-values.out.yaml | 4 +- ...e-with-header-filter-empty-headers.in.yaml | 4 +- ...-with-header-filter-empty-headers.out.yaml | 4 +- ...with-header-filter-invalid-headers.in.yaml | 4 +- ...ith-header-filter-invalid-headers.out.yaml | 4 +- ...oute-with-header-filter-no-headers.in.yaml | 4 +- ...ute-with-header-filter-no-headers.out.yaml | 4 +- ...ith-header-filter-no-valid-headers.in.yaml | 4 +- ...th-header-filter-no-valid-headers.out.yaml | 4 +- ...ttproute-with-header-filter-remove.in.yaml | 4 +- ...tproute-with-header-filter-remove.out.yaml | 4 +- ...-with-invalid-backend-ref-bad-port.in.yaml | 4 +- ...with-invalid-backend-ref-bad-port.out.yaml | 4 +- ...-invalid-backend-ref-invalid-group.in.yaml | 4 +- ...invalid-backend-ref-invalid-group.out.yaml | 4 +- ...h-invalid-backend-ref-invalid-kind.in.yaml | 4 +- ...-invalid-backend-ref-invalid-kind.out.yaml | 4 +- ...e-with-invalid-backend-ref-no-port.in.yaml | 4 +- ...-with-invalid-backend-ref-no-port.out.yaml | 4 +- ...alid-backend-ref-no-service.import.in.yaml | 4 +- ...lid-backend-ref-no-service.import.out.yaml | 4 +- ...ith-invalid-backend-ref-no-service.in.yaml | 4 +- ...th-invalid-backend-ref-no-service.out.yaml | 4 +- ...alid-backendref-in-other-namespace.in.yaml | 4 +- ...lid-backendref-in-other-namespace.out.yaml | 4 +- ...route-with-invalid-ratelimitfilter.in.yaml | 4 +- ...oute-with-invalid-ratelimitfilter.out.yaml | 4 +- ...oute-with-mirror-filter-duplicates.in.yaml | 4 +- ...ute-with-mirror-filter-duplicates.out.yaml | 4 +- ...proute-with-mirror-filter-multiple.in.yaml | 4 +- ...route-with-mirror-filter-multiple.out.yaml | 4 +- ...with-mirror-filter-service-no-port.in.yaml | 4 +- ...ith-mirror-filter-service-no-port.out.yaml | 4 +- ...th-mirror-filter-service-not-found.in.yaml | 4 +- ...h-mirror-filter-service-not-found.out.yaml | 4 +- .../httproute-with-mirror-filter.in.yaml | 4 +- .../httproute-with-mirror-filter.out.yaml | 4 +- ...with-non-existent-authenfilter-ref.in.yaml | 4 +- ...ith-non-existent-authenfilter-ref.out.yaml | 4 +- ...with-non-matching-authenfilter-ref.in.yaml | 4 +- ...ith-non-matching-authenfilter-ref.out.yaml | 4 +- ...-to-gateway-with-wildcard-hostname.in.yaml | 4 +- ...to-gateway-with-wildcard-hostname.out.yaml | 4 +- ...ect-filter-full-path-replace-https.in.yaml | 4 +- ...ct-filter-full-path-replace-https.out.yaml | 4 +- ...oute-with-redirect-filter-hostname.in.yaml | 4 +- ...ute-with-redirect-filter-hostname.out.yaml | 4 +- ...edirect-filter-invalid-filter-type.in.yaml | 4 +- ...direct-filter-invalid-filter-type.out.yaml | 4 +- ...ith-redirect-filter-invalid-scheme.in.yaml | 4 +- ...th-redirect-filter-invalid-scheme.out.yaml | 4 +- ...ith-redirect-filter-invalid-status.in.yaml | 4 +- ...th-redirect-filter-invalid-status.out.yaml | 4 +- ...lter-prefix-replace-with-port-http.in.yaml | 4 +- ...ter-prefix-replace-with-port-http.out.yaml | 4 +- ...e-with-response-header-filter-adds.in.yaml | 4 +- ...-with-response-header-filter-adds.out.yaml | 4 +- ...ter-duplicate-add-multiple-filters.in.yaml | 4 +- ...er-duplicate-add-multiple-filters.out.yaml | 4 +- ...ponse-header-filter-duplicate-adds.in.yaml | 4 +- ...onse-header-filter-duplicate-adds.out.yaml | 4 +- ...-duplicate-remove-multiple-filters.in.yaml | 4 +- ...duplicate-remove-multiple-filters.out.yaml | 4 +- ...se-header-filter-duplicate-removes.in.yaml | 4 +- ...e-header-filter-duplicate-removes.out.yaml | 4 +- ...-header-filter-empty-header-values.in.yaml | 4 +- ...header-filter-empty-header-values.out.yaml | 4 +- ...sponse-header-filter-empty-headers.in.yaml | 4 +- ...ponse-header-filter-empty-headers.out.yaml | 4 +- ...onse-header-filter-invalid-headers.in.yaml | 4 +- ...nse-header-filter-invalid-headers.out.yaml | 4 +- ...-response-header-filter-no-headers.in.yaml | 4 +- ...response-header-filter-no-headers.out.yaml | 4 +- ...nse-header-filter-no-valid-headers.in.yaml | 4 +- ...se-header-filter-no-valid-headers.out.yaml | 4 +- ...with-response-header-filter-remove.in.yaml | 4 +- ...ith-response-header-filter-remove.out.yaml | 4 +- ...-single-rule-with-exact-path-match.in.yaml | 4 +- ...single-rule-with-exact-path-match.out.yaml | 4 +- ...single-rule-with-http-method-match.in.yaml | 4 +- ...ingle-rule-with-http-method-match.out.yaml | 4 +- ...th-single-rule-with-multiple-rules.in.yaml | 4 +- ...h-single-rule-with-multiple-rules.out.yaml | 4 +- ...th-prefix-and-exact-header-matches.in.yaml | 4 +- ...h-prefix-and-exact-header-matches.out.yaml | 4 +- ...me-invalid-backend-refs-no-service.in.yaml | 4 +- ...e-invalid-backend-refs-no-service.out.yaml | 4 +- ...ttproute-with-sourcecidr-ratelimit.in.yaml | 4 +- ...tproute-with-sourcecidr-ratelimit.out.yaml | 4 +- ...-to-gateway-with-wildcard-hostname.in.yaml | 4 +- ...to-gateway-with-wildcard-hostname.out.yaml | 4 +- ...-to-gateway-with-wildcard-hostname.in.yaml | 4 +- ...to-gateway-with-wildcard-hostname.out.yaml | 4 +- ...rite-filter-full-path-replace-http.in.yaml | 4 +- ...ite-filter-full-path-replace-http.out.yaml | 4 +- ...ite-filter-hostname-prefix-replace.in.yaml | 4 +- ...te-filter-hostname-prefix-replace.out.yaml | 4 +- ...te-with-urlrewrite-filter-hostname.in.yaml | 4 +- ...e-with-urlrewrite-filter-hostname.out.yaml | 4 +- ...rewrite-filter-invalid-filter-type.in.yaml | 4 +- ...ewrite-filter-invalid-filter-type.out.yaml | 4 +- ...urlrewrite-filter-invalid-hostname.in.yaml | 4 +- ...rlrewrite-filter-invalid-hostname.out.yaml | 4 +- ...te-filter-invalid-multiple-filters.in.yaml | 4 +- ...e-filter-invalid-multiple-filters.out.yaml | 4 +- ...rlrewrite-filter-invalid-path-type.in.yaml | 4 +- ...lrewrite-filter-invalid-path-type.out.yaml | 4 +- ...ith-urlrewrite-filter-invalid-path.in.yaml | 4 +- ...th-urlrewrite-filter-invalid-path.out.yaml | 4 +- ...ith-urlrewrite-filter-missing-path.in.yaml | 4 +- ...th-urlrewrite-filter-missing-path.out.yaml | 4 +- ...rewrite-filter-prefix-replace-http.in.yaml | 4 +- ...ewrite-filter-prefix-replace-http.out.yaml | 4 +- .../httproute-with-valid-authenfilter.in.yaml | 4 +- ...httproute-with-valid-authenfilter.out.yaml | 4 +- ...ith-valid-multi-match-authenfilter.in.yaml | 4 +- ...th-valid-multi-match-authenfilter.out.yaml | 4 +- ...lid-multi-match-multi-authenfilter.in.yaml | 4 +- ...id-multi-match-multi-authenfilter.out.yaml | 4 +- ...tproute-with-valid-ratelimitfilter.in.yaml | 4 +- ...proute-with-valid-ratelimitfilter.out.yaml | 4 +- ...ing-to-gateway-with-unset-hostname.in.yaml | 4 +- ...ng-to-gateway-with-unset-hostname.out.yaml | 4 +- .../httproutes-with-multiple-matches.in.yaml | 14 +- .../httproutes-with-multiple-matches.out.yaml | 14 +- ...ateway-with-listener-tls-terminate.in.yaml | 2 +- ...teway-with-listener-tls-terminate.out.yaml | 2 +- .../tlsroute-attaching-to-gateway.in.yaml | 2 +- .../tlsroute-attaching-to-gateway.out.yaml | 2 +- .../testdata/tlsroute-multiple.in.yaml | 2 +- .../testdata/tlsroute-multiple.out.yaml | 2 +- ...-attaching-to-gateway-with-no-mode.in.yaml | 2 +- ...attaching-to-gateway-with-no-mode.out.yaml | 2 +- ...ther-namespace-allowed-by-refgrant.in.yaml | 2 +- ...her-namespace-allowed-by-refgrant.out.yaml | 2 +- .../tlsroute-with-empty-hostname.in.yaml | 2 +- .../tlsroute-with-empty-hostname.out.yaml | 2 +- ...route-with-empty-listener-hostname.in.yaml | 2 +- ...oute-with-empty-listener-hostname.out.yaml | 2 +- ...ner-both-passthrough-and-cert-data.in.yaml | 2 +- ...er-both-passthrough-and-cert-data.out.yaml | 2 +- internal/gatewayapi/tls.go | 6 +- internal/gatewayapi/tls_test.go | 4 +- internal/gatewayapi/translator.go | 8 +- internal/gatewayapi/validate.go | 204 +- internal/gatewayapi/zz_generated.deepcopy.go | 229 -- .../kubernetes/proxy_infra_test.go | 4 +- .../ratelimit/resource_provider_test.go | 8 +- internal/ir/zz_generated.deepcopy.go | 1151 ---------- internal/kubernetes/secret.go | 4 +- internal/message/types.go | 6 +- internal/provider/kubernetes/controller.go | 86 +- .../provider/kubernetes/controller_test.go | 136 +- internal/provider/kubernetes/helpers.go | 62 +- internal/provider/kubernetes/helpers_test.go | 214 +- .../provider/kubernetes/kubernetes_test.go | 556 ++--- internal/provider/kubernetes/predicates.go | 28 +- .../provider/kubernetes/predicates_test.go | 8 +- internal/provider/kubernetes/routes.go | 26 +- internal/provider/kubernetes/routes_test.go | 384 ++-- internal/provider/kubernetes/test/utils.go | 74 +- internal/status/conditions.go | 34 +- internal/status/conditions_test.go | 48 +- internal/status/gateway.go | 16 +- internal/status/gateway_test.go | 28 +- internal/status/gatewayclass.go | 4 +- internal/status/status.go | 14 +- site/content/en/latest/design/watching.md | 6 +- test/config/gatewayclass.yaml | 2 +- test/conformance/conformance_test.go | 4 +- .../experimental_conformance_test.go | 4 +- test/e2e/base/manifests.yaml | 6 +- test/e2e/e2e_test.go | 4 +- test/e2e/testdata/accesslog-file.yaml | 2 +- test/e2e/testdata/accesslog-otel.yaml | 2 +- test/e2e/testdata/envoy-patch-policy.yaml | 2 +- test/e2e/testdata/metric.yaml | 2 +- .../testdata/ratelimit-based-jwt-claims.yaml | 2 +- .../e2e/testdata/ratelimit-block-all-ips.yaml | 2 +- test/e2e/testdata/tracing-otel.yaml | 2 +- tools/crd-ref-docs/config.yaml | 16 - 423 files changed, 3456 insertions(+), 6099 deletions(-) delete mode 100644 api/v1alpha1/zz_generated.deepcopy.go delete mode 100644 internal/gatewayapi/zz_generated.deepcopy.go delete mode 100644 internal/ir/zz_generated.deepcopy.go diff --git a/api/v1alpha1/clienttrafficpolicy_types.go b/api/v1alpha1/clienttrafficpolicy_types.go index 24a82ce1140..fe516b9d185 100644 --- a/api/v1alpha1/clienttrafficpolicy_types.go +++ b/api/v1alpha1/clienttrafficpolicy_types.go @@ -7,8 +7,8 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" ) const ( @@ -64,12 +64,12 @@ type TCPKeepalive struct { // Defaults to `7200s`. // // +optional - IdleTime *gwapiv1b1.Duration `json:"idleTime,omitempty"` + IdleTime *gwapiv1.Duration `json:"idleTime,omitempty"` // The duration between keep-alive probes. // Defaults to `75s`. // // +optional - Interval *gwapiv1b1.Duration `json:"interval,omitempty"` + Interval *gwapiv1.Duration `json:"interval,omitempty"` } // ClientTrafficPolicyStatus defines the state of ClientTrafficPolicy diff --git a/api/v1alpha1/envoygateway_types.go b/api/v1alpha1/envoygateway_types.go index 25398389944..efdf826eae5 100644 --- a/api/v1alpha1/envoygateway_types.go +++ b/api/v1alpha1/envoygateway_types.go @@ -7,7 +7,7 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" ) const ( @@ -123,7 +123,7 @@ type Gateway struct { // ControllerName defines the name of the Gateway API controller. If unspecified, // defaults to "gateway.envoyproxy.io/gatewayclass-controller". See the following // for additional details: - // https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass + // https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1.GatewayClass // // +optional ControllerName string `json:"controllerName,omitempty"` @@ -341,7 +341,7 @@ type RedisTLSSettings struct { // CertificateRef defines the client certificate reference for TLS connections. // Currently only a Kubernetes Secret of type TLS is supported. // +optional - CertificateRef *gwapiv1b1.SecretObjectReference `json:"certificateRef,omitempty"` + CertificateRef *gwapiv1.SecretObjectReference `json:"certificateRef,omitempty"` } // RateLimitRedisSettings defines the configuration for connecting to redis database. @@ -415,7 +415,7 @@ type ExtensionTLS struct { // CertificateRef can only reference a Kubernetes Secret at this time. // // +kubebuilder:validation:Required - CertificateRef gwapiv1b1.SecretObjectReference `json:"certificateRef"` + CertificateRef gwapiv1.SecretObjectReference `json:"certificateRef"` } // EnvoyGatewayAdmin defines the Envoy Gateway Admin configuration. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 3b5f079e2e2..00000000000 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1952 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/gateway-api/apis/v1beta1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationFilter) DeepCopyInto(out *AuthenticationFilter) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationFilter. -func (in *AuthenticationFilter) DeepCopy() *AuthenticationFilter { - if in == nil { - return nil - } - out := new(AuthenticationFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthenticationFilter) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationFilterList) DeepCopyInto(out *AuthenticationFilterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AuthenticationFilter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationFilterList. -func (in *AuthenticationFilterList) DeepCopy() *AuthenticationFilterList { - if in == nil { - return nil - } - out := new(AuthenticationFilterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthenticationFilterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationFilterSpec) DeepCopyInto(out *AuthenticationFilterSpec) { - *out = *in - if in.JwtProviders != nil { - in, out := &in.JwtProviders, &out.JwtProviders - *out = make([]JwtAuthenticationFilterProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationFilterSpec. -func (in *AuthenticationFilterSpec) DeepCopy() *AuthenticationFilterSpec { - if in == nil { - return nil - } - out := new(AuthenticationFilterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClaimToHeader) DeepCopyInto(out *ClaimToHeader) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimToHeader. -func (in *ClaimToHeader) DeepCopy() *ClaimToHeader { - if in == nil { - return nil - } - out := new(ClaimToHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientTrafficPolicy) DeepCopyInto(out *ClientTrafficPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTrafficPolicy. -func (in *ClientTrafficPolicy) DeepCopy() *ClientTrafficPolicy { - if in == nil { - return nil - } - out := new(ClientTrafficPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClientTrafficPolicy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientTrafficPolicyList) DeepCopyInto(out *ClientTrafficPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClientTrafficPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTrafficPolicyList. -func (in *ClientTrafficPolicyList) DeepCopy() *ClientTrafficPolicyList { - if in == nil { - return nil - } - out := new(ClientTrafficPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClientTrafficPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientTrafficPolicySpec) DeepCopyInto(out *ClientTrafficPolicySpec) { - *out = *in - in.TargetRef.DeepCopyInto(&out.TargetRef) - if in.TCPKeepalive != nil { - in, out := &in.TCPKeepalive, &out.TCPKeepalive - *out = new(TCPKeepalive) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTrafficPolicySpec. -func (in *ClientTrafficPolicySpec) DeepCopy() *ClientTrafficPolicySpec { - if in == nil { - return nil - } - out := new(ClientTrafficPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientTrafficPolicyStatus) DeepCopyInto(out *ClientTrafficPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTrafficPolicyStatus. -func (in *ClientTrafficPolicyStatus) DeepCopy() *ClientTrafficPolicyStatus { - if in == nil { - return nil - } - out := new(ClientTrafficPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomTag) DeepCopyInto(out *CustomTag) { - *out = *in - if in.Literal != nil { - in, out := &in.Literal, &out.Literal - *out = new(LiteralCustomTag) - **out = **in - } - if in.Environment != nil { - in, out := &in.Environment, &out.Environment - *out = new(EnvironmentCustomTag) - (*in).DeepCopyInto(*out) - } - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader - *out = new(RequestHeaderCustomTag) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTag. -func (in *CustomTag) DeepCopy() *CustomTag { - if in == nil { - return nil - } - out := new(CustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentCustomTag) DeepCopyInto(out *EnvironmentCustomTag) { - *out = *in - if in.DefaultValue != nil { - in, out := &in.DefaultValue, &out.DefaultValue - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentCustomTag. -func (in *EnvironmentCustomTag) DeepCopy() *EnvironmentCustomTag { - if in == nil { - return nil - } - out := new(EnvironmentCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGateway) DeepCopyInto(out *EnvoyGateway) { - *out = *in - out.TypeMeta = in.TypeMeta - in.EnvoyGatewaySpec.DeepCopyInto(&out.EnvoyGatewaySpec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGateway. -func (in *EnvoyGateway) DeepCopy() *EnvoyGateway { - if in == nil { - return nil - } - out := new(EnvoyGateway) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyGateway) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayAdmin) DeepCopyInto(out *EnvoyGatewayAdmin) { - *out = *in - if in.Address != nil { - in, out := &in.Address, &out.Address - *out = new(EnvoyGatewayAdminAddress) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdmin. -func (in *EnvoyGatewayAdmin) DeepCopy() *EnvoyGatewayAdmin { - if in == nil { - return nil - } - out := new(EnvoyGatewayAdmin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayAdminAddress) DeepCopyInto(out *EnvoyGatewayAdminAddress) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdminAddress. -func (in *EnvoyGatewayAdminAddress) DeepCopy() *EnvoyGatewayAdminAddress { - if in == nil { - return nil - } - out := new(EnvoyGatewayAdminAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayCustomProvider) DeepCopyInto(out *EnvoyGatewayCustomProvider) { - *out = *in - in.Resource.DeepCopyInto(&out.Resource) - in.Infrastructure.DeepCopyInto(&out.Infrastructure) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayCustomProvider. -func (in *EnvoyGatewayCustomProvider) DeepCopy() *EnvoyGatewayCustomProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayCustomProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayFileResourceProvider) DeepCopyInto(out *EnvoyGatewayFileResourceProvider) { - *out = *in - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayFileResourceProvider. -func (in *EnvoyGatewayFileResourceProvider) DeepCopy() *EnvoyGatewayFileResourceProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayFileResourceProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayHostInfrastructureProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayHostInfrastructureProvider. -func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopy() *EnvoyGatewayHostInfrastructureProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayHostInfrastructureProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayInfrastructureProvider) { - *out = *in - if in.Host != nil { - in, out := &in.Host, &out.Host - *out = new(EnvoyGatewayHostInfrastructureProvider) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayInfrastructureProvider. -func (in *EnvoyGatewayInfrastructureProvider) DeepCopy() *EnvoyGatewayInfrastructureProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayInfrastructureProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayKubernetesProvider) DeepCopyInto(out *EnvoyGatewayKubernetesProvider) { - *out = *in - if in.RateLimitDeployment != nil { - in, out := &in.RateLimitDeployment, &out.RateLimitDeployment - *out = new(KubernetesDeploymentSpec) - (*in).DeepCopyInto(*out) - } - if in.Watch != nil { - in, out := &in.Watch, &out.Watch - *out = new(KubernetesWatchMode) - (*in).DeepCopyInto(*out) - } - if in.Deploy != nil { - in, out := &in.Deploy, &out.Deploy - *out = new(KubernetesDeployMode) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayKubernetesProvider. -func (in *EnvoyGatewayKubernetesProvider) DeepCopy() *EnvoyGatewayKubernetesProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayKubernetesProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayLogging) DeepCopyInto(out *EnvoyGatewayLogging) { - *out = *in - if in.Level != nil { - in, out := &in.Level, &out.Level - *out = make(map[EnvoyGatewayLogComponent]LogLevel, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayLogging. -func (in *EnvoyGatewayLogging) DeepCopy() *EnvoyGatewayLogging { - if in == nil { - return nil - } - out := new(EnvoyGatewayLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayProvider) DeepCopyInto(out *EnvoyGatewayProvider) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(EnvoyGatewayKubernetesProvider) - (*in).DeepCopyInto(*out) - } - if in.Custom != nil { - in, out := &in.Custom, &out.Custom - *out = new(EnvoyGatewayCustomProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayProvider. -func (in *EnvoyGatewayProvider) DeepCopy() *EnvoyGatewayProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayResourceProvider) DeepCopyInto(out *EnvoyGatewayResourceProvider) { - *out = *in - if in.File != nil { - in, out := &in.File, &out.File - *out = new(EnvoyGatewayFileResourceProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayResourceProvider. -func (in *EnvoyGatewayResourceProvider) DeepCopy() *EnvoyGatewayResourceProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayResourceProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewaySpec) DeepCopyInto(out *EnvoyGatewaySpec) { - *out = *in - if in.Gateway != nil { - in, out := &in.Gateway, &out.Gateway - *out = new(Gateway) - **out = **in - } - if in.Provider != nil { - in, out := &in.Provider, &out.Provider - *out = new(EnvoyGatewayProvider) - (*in).DeepCopyInto(*out) - } - if in.Logging != nil { - in, out := &in.Logging, &out.Logging - *out = new(EnvoyGatewayLogging) - (*in).DeepCopyInto(*out) - } - if in.Admin != nil { - in, out := &in.Admin, &out.Admin - *out = new(EnvoyGatewayAdmin) - (*in).DeepCopyInto(*out) - } - if in.RateLimit != nil { - in, out := &in.RateLimit, &out.RateLimit - *out = new(RateLimit) - (*in).DeepCopyInto(*out) - } - if in.ExtensionManager != nil { - in, out := &in.ExtensionManager, &out.ExtensionManager - *out = new(ExtensionManager) - (*in).DeepCopyInto(*out) - } - if in.ExtensionAPIs != nil { - in, out := &in.ExtensionAPIs, &out.ExtensionAPIs - *out = new(ExtensionAPISettings) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewaySpec. -func (in *EnvoyGatewaySpec) DeepCopy() *EnvoyGatewaySpec { - if in == nil { - return nil - } - out := new(EnvoyGatewaySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyJSONPatchConfig) DeepCopyInto(out *EnvoyJSONPatchConfig) { - *out = *in - in.Operation.DeepCopyInto(&out.Operation) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyJSONPatchConfig. -func (in *EnvoyJSONPatchConfig) DeepCopy() *EnvoyJSONPatchConfig { - if in == nil { - return nil - } - out := new(EnvoyJSONPatchConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicy) DeepCopyInto(out *EnvoyPatchPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicy. -func (in *EnvoyPatchPolicy) DeepCopy() *EnvoyPatchPolicy { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyPatchPolicy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicyList) DeepCopyInto(out *EnvoyPatchPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EnvoyPatchPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyList. -func (in *EnvoyPatchPolicyList) DeepCopy() *EnvoyPatchPolicyList { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyPatchPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicySpec) DeepCopyInto(out *EnvoyPatchPolicySpec) { - *out = *in - if in.JSONPatches != nil { - in, out := &in.JSONPatches, &out.JSONPatches - *out = make([]EnvoyJSONPatchConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.TargetRef.DeepCopyInto(&out.TargetRef) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicySpec. -func (in *EnvoyPatchPolicySpec) DeepCopy() *EnvoyPatchPolicySpec { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicyStatus) DeepCopyInto(out *EnvoyPatchPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyStatus. -func (in *EnvoyPatchPolicyStatus) DeepCopy() *EnvoyPatchPolicyStatus { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxy) DeepCopyInto(out *EnvoyProxy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxy. -func (in *EnvoyProxy) DeepCopy() *EnvoyProxy { - if in == nil { - return nil - } - out := new(EnvoyProxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyProxy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyKubernetesProvider) DeepCopyInto(out *EnvoyProxyKubernetesProvider) { - *out = *in - if in.EnvoyDeployment != nil { - in, out := &in.EnvoyDeployment, &out.EnvoyDeployment - *out = new(KubernetesDeploymentSpec) - (*in).DeepCopyInto(*out) - } - if in.EnvoyService != nil { - in, out := &in.EnvoyService, &out.EnvoyService - *out = new(KubernetesServiceSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyKubernetesProvider. -func (in *EnvoyProxyKubernetesProvider) DeepCopy() *EnvoyProxyKubernetesProvider { - if in == nil { - return nil - } - out := new(EnvoyProxyKubernetesProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyList) DeepCopyInto(out *EnvoyProxyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EnvoyProxy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyList. -func (in *EnvoyProxyList) DeepCopy() *EnvoyProxyList { - if in == nil { - return nil - } - out := new(EnvoyProxyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyProxyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyProvider) DeepCopyInto(out *EnvoyProxyProvider) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(EnvoyProxyKubernetesProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyProvider. -func (in *EnvoyProxyProvider) DeepCopy() *EnvoyProxyProvider { - if in == nil { - return nil - } - out := new(EnvoyProxyProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxySpec) DeepCopyInto(out *EnvoyProxySpec) { - *out = *in - if in.Provider != nil { - in, out := &in.Provider, &out.Provider - *out = new(EnvoyProxyProvider) - (*in).DeepCopyInto(*out) - } - in.Logging.DeepCopyInto(&out.Logging) - in.Telemetry.DeepCopyInto(&out.Telemetry) - if in.Bootstrap != nil { - in, out := &in.Bootstrap, &out.Bootstrap - *out = new(ProxyBootstrap) - (*in).DeepCopyInto(*out) - } - if in.Concurrency != nil { - in, out := &in.Concurrency, &out.Concurrency - *out = new(int32) - **out = **in - } - if in.MergeGateways != nil { - in, out := &in.MergeGateways, &out.MergeGateways - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxySpec. -func (in *EnvoyProxySpec) DeepCopy() *EnvoyProxySpec { - if in == nil { - return nil - } - out := new(EnvoyProxySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyStatus) DeepCopyInto(out *EnvoyProxyStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyStatus. -func (in *EnvoyProxyStatus) DeepCopy() *EnvoyProxyStatus { - if in == nil { - return nil - } - out := new(EnvoyProxyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionAPISettings) DeepCopyInto(out *ExtensionAPISettings) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionAPISettings. -func (in *ExtensionAPISettings) DeepCopy() *ExtensionAPISettings { - if in == nil { - return nil - } - out := new(ExtensionAPISettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionHooks) DeepCopyInto(out *ExtensionHooks) { - *out = *in - if in.XDSTranslator != nil { - in, out := &in.XDSTranslator, &out.XDSTranslator - *out = new(XDSTranslatorHooks) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionHooks. -func (in *ExtensionHooks) DeepCopy() *ExtensionHooks { - if in == nil { - return nil - } - out := new(ExtensionHooks) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionManager) DeepCopyInto(out *ExtensionManager) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]GroupVersionKind, len(*in)) - copy(*out, *in) - } - if in.Hooks != nil { - in, out := &in.Hooks, &out.Hooks - *out = new(ExtensionHooks) - (*in).DeepCopyInto(*out) - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ExtensionService) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionManager. -func (in *ExtensionManager) DeepCopy() *ExtensionManager { - if in == nil { - return nil - } - out := new(ExtensionManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionService) DeepCopyInto(out *ExtensionService) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(ExtensionTLS) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionService. -func (in *ExtensionService) DeepCopy() *ExtensionService { - if in == nil { - return nil - } - out := new(ExtensionService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionTLS) DeepCopyInto(out *ExtensionTLS) { - *out = *in - in.CertificateRef.DeepCopyInto(&out.CertificateRef) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionTLS. -func (in *ExtensionTLS) DeepCopy() *ExtensionTLS { - if in == nil { - return nil - } - out := new(ExtensionTLS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FileEnvoyProxyAccessLog) DeepCopyInto(out *FileEnvoyProxyAccessLog) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileEnvoyProxyAccessLog. -func (in *FileEnvoyProxyAccessLog) DeepCopy() *FileEnvoyProxyAccessLog { - if in == nil { - return nil - } - out := new(FileEnvoyProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Gateway) DeepCopyInto(out *Gateway) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway. -func (in *Gateway) DeepCopy() *Gateway { - if in == nil { - return nil - } - out := new(Gateway) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRateLimit) DeepCopyInto(out *GlobalRateLimit) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]RateLimitRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. -func (in *GlobalRateLimit) DeepCopy() *GlobalRateLimit { - if in == nil { - return nil - } - out := new(GlobalRateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind. -func (in *GroupVersionKind) DeepCopy() *GroupVersionKind { - if in == nil { - return nil - } - out := new(GroupVersionKind) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HeaderMatch) DeepCopyInto(out *HeaderMatch) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(HeaderMatchType) - **out = **in - } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. -func (in *HeaderMatch) DeepCopy() *HeaderMatch { - if in == nil { - return nil - } - out := new(HeaderMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONPatchOperation) DeepCopyInto(out *JSONPatchOperation) { - *out = *in - in.Value.DeepCopyInto(&out.Value) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatchOperation. -func (in *JSONPatchOperation) DeepCopy() *JSONPatchOperation { - if in == nil { - return nil - } - out := new(JSONPatchOperation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JwtAuthenticationFilterProvider) DeepCopyInto(out *JwtAuthenticationFilterProvider) { - *out = *in - if in.Audiences != nil { - in, out := &in.Audiences, &out.Audiences - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.RemoteJWKS = in.RemoteJWKS - if in.ClaimToHeaders != nil { - in, out := &in.ClaimToHeaders, &out.ClaimToHeaders - *out = make([]ClaimToHeader, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JwtAuthenticationFilterProvider. -func (in *JwtAuthenticationFilterProvider) DeepCopy() *JwtAuthenticationFilterProvider { - if in == nil { - return nil - } - out := new(JwtAuthenticationFilterProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesContainerSpec) DeepCopyInto(out *KubernetesContainerSpec) { - *out = *in - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(string) - **out = **in - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]corev1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesContainerSpec. -func (in *KubernetesContainerSpec) DeepCopy() *KubernetesContainerSpec { - if in == nil { - return nil - } - out := new(KubernetesContainerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesDeployMode) DeepCopyInto(out *KubernetesDeployMode) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeployMode. -func (in *KubernetesDeployMode) DeepCopy() *KubernetesDeployMode { - if in == nil { - return nil - } - out := new(KubernetesDeployMode) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesDeploymentSpec) DeepCopyInto(out *KubernetesDeploymentSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Strategy != nil { - in, out := &in.Strategy, &out.Strategy - *out = new(appsv1.DeploymentStrategy) - (*in).DeepCopyInto(*out) - } - if in.Pod != nil { - in, out := &in.Pod, &out.Pod - *out = new(KubernetesPodSpec) - (*in).DeepCopyInto(*out) - } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(KubernetesContainerSpec) - (*in).DeepCopyInto(*out) - } - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]corev1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeploymentSpec. -func (in *KubernetesDeploymentSpec) DeepCopy() *KubernetesDeploymentSpec { - if in == nil { - return nil - } - out := new(KubernetesDeploymentSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesPodSpec) DeepCopyInto(out *KubernetesPodSpec) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]corev1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesPodSpec. -func (in *KubernetesPodSpec) DeepCopy() *KubernetesPodSpec { - if in == nil { - return nil - } - out := new(KubernetesPodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesServiceSpec) DeepCopyInto(out *KubernetesServiceSpec) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(ServiceType) - **out = **in - } - if in.LoadBalancerClass != nil { - in, out := &in.LoadBalancerClass, &out.LoadBalancerClass - *out = new(string) - **out = **in - } - if in.AllocateLoadBalancerNodePorts != nil { - in, out := &in.AllocateLoadBalancerNodePorts, &out.AllocateLoadBalancerNodePorts - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesServiceSpec. -func (in *KubernetesServiceSpec) DeepCopy() *KubernetesServiceSpec { - if in == nil { - return nil - } - out := new(KubernetesServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesWatchMode) DeepCopyInto(out *KubernetesWatchMode) { - *out = *in - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespaceSelectors != nil { - in, out := &in.NamespaceSelectors, &out.NamespaceSelectors - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesWatchMode. -func (in *KubernetesWatchMode) DeepCopy() *KubernetesWatchMode { - if in == nil { - return nil - } - out := new(KubernetesWatchMode) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LiteralCustomTag) DeepCopyInto(out *LiteralCustomTag) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiteralCustomTag. -func (in *LiteralCustomTag) DeepCopy() *LiteralCustomTag { - if in == nil { - return nil - } - out := new(LiteralCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Match) DeepCopyInto(out *Match) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match. -func (in *Match) DeepCopy() *Match { - if in == nil { - return nil - } - out := new(Match) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetricSink) DeepCopyInto(out *MetricSink) { - *out = *in - if in.OpenTelemetry != nil { - in, out := &in.OpenTelemetry, &out.OpenTelemetry - *out = new(OpenTelemetrySink) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSink. -func (in *MetricSink) DeepCopy() *MetricSink { - if in == nil { - return nil - } - out := new(MetricSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopyInto(out *OpenTelemetryEnvoyProxyAccessLog) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryEnvoyProxyAccessLog. -func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopy() *OpenTelemetryEnvoyProxyAccessLog { - if in == nil { - return nil - } - out := new(OpenTelemetryEnvoyProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetrySink) DeepCopyInto(out *OpenTelemetrySink) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetrySink. -func (in *OpenTelemetrySink) DeepCopy() *OpenTelemetrySink { - if in == nil { - return nil - } - out := new(OpenTelemetrySink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusProvider) DeepCopyInto(out *PrometheusProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusProvider. -func (in *PrometheusProvider) DeepCopy() *PrometheusProvider { - if in == nil { - return nil - } - out := new(PrometheusProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLog) DeepCopyInto(out *ProxyAccessLog) { - *out = *in - if in.Settings != nil { - in, out := &in.Settings, &out.Settings - *out = make([]ProxyAccessLogSetting, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLog. -func (in *ProxyAccessLog) DeepCopy() *ProxyAccessLog { - if in == nil { - return nil - } - out := new(ProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogFormat) DeepCopyInto(out *ProxyAccessLogFormat) { - *out = *in - if in.Text != nil { - in, out := &in.Text, &out.Text - *out = new(string) - **out = **in - } - if in.JSON != nil { - in, out := &in.JSON, &out.JSON - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogFormat. -func (in *ProxyAccessLogFormat) DeepCopy() *ProxyAccessLogFormat { - if in == nil { - return nil - } - out := new(ProxyAccessLogFormat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogSetting) DeepCopyInto(out *ProxyAccessLogSetting) { - *out = *in - in.Format.DeepCopyInto(&out.Format) - if in.Sinks != nil { - in, out := &in.Sinks, &out.Sinks - *out = make([]ProxyAccessLogSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSetting. -func (in *ProxyAccessLogSetting) DeepCopy() *ProxyAccessLogSetting { - if in == nil { - return nil - } - out := new(ProxyAccessLogSetting) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogSink) DeepCopyInto(out *ProxyAccessLogSink) { - *out = *in - if in.File != nil { - in, out := &in.File, &out.File - *out = new(FileEnvoyProxyAccessLog) - **out = **in - } - if in.OpenTelemetry != nil { - in, out := &in.OpenTelemetry, &out.OpenTelemetry - *out = new(OpenTelemetryEnvoyProxyAccessLog) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSink. -func (in *ProxyAccessLogSink) DeepCopy() *ProxyAccessLogSink { - if in == nil { - return nil - } - out := new(ProxyAccessLogSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyBootstrap) DeepCopyInto(out *ProxyBootstrap) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(BootstrapType) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyBootstrap. -func (in *ProxyBootstrap) DeepCopy() *ProxyBootstrap { - if in == nil { - return nil - } - out := new(ProxyBootstrap) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyLogging) DeepCopyInto(out *ProxyLogging) { - *out = *in - if in.Level != nil { - in, out := &in.Level, &out.Level - *out = make(map[ProxyLogComponent]LogLevel, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyLogging. -func (in *ProxyLogging) DeepCopy() *ProxyLogging { - if in == nil { - return nil - } - out := new(ProxyLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyMetrics) DeepCopyInto(out *ProxyMetrics) { - *out = *in - if in.Prometheus != nil { - in, out := &in.Prometheus, &out.Prometheus - *out = new(PrometheusProvider) - **out = **in - } - if in.Sinks != nil { - in, out := &in.Sinks, &out.Sinks - *out = make([]MetricSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Matches != nil { - in, out := &in.Matches, &out.Matches - *out = make([]Match, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyMetrics. -func (in *ProxyMetrics) DeepCopy() *ProxyMetrics { - if in == nil { - return nil - } - out := new(ProxyMetrics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyTelemetry) DeepCopyInto(out *ProxyTelemetry) { - *out = *in - if in.AccessLog != nil { - in, out := &in.AccessLog, &out.AccessLog - *out = new(ProxyAccessLog) - (*in).DeepCopyInto(*out) - } - if in.Tracing != nil { - in, out := &in.Tracing, &out.Tracing - *out = new(ProxyTracing) - (*in).DeepCopyInto(*out) - } - if in.Metrics != nil { - in, out := &in.Metrics, &out.Metrics - *out = new(ProxyMetrics) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTelemetry. -func (in *ProxyTelemetry) DeepCopy() *ProxyTelemetry { - if in == nil { - return nil - } - out := new(ProxyTelemetry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyTracing) DeepCopyInto(out *ProxyTracing) { - *out = *in - if in.SamplingRate != nil { - in, out := &in.SamplingRate, &out.SamplingRate - *out = new(uint32) - **out = **in - } - if in.CustomTags != nil { - in, out := &in.CustomTags, &out.CustomTags - *out = make(map[string]CustomTag, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - out.Provider = in.Provider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTracing. -func (in *ProxyTracing) DeepCopy() *ProxyTracing { - if in == nil { - return nil - } - out := new(ProxyTracing) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimit) DeepCopyInto(out *RateLimit) { - *out = *in - in.Backend.DeepCopyInto(&out.Backend) - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimit. -func (in *RateLimit) DeepCopy() *RateLimit { - if in == nil { - return nil - } - out := new(RateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitDatabaseBackend) DeepCopyInto(out *RateLimitDatabaseBackend) { - *out = *in - if in.Redis != nil { - in, out := &in.Redis, &out.Redis - *out = new(RateLimitRedisSettings) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitDatabaseBackend. -func (in *RateLimitDatabaseBackend) DeepCopy() *RateLimitDatabaseBackend { - if in == nil { - return nil - } - out := new(RateLimitDatabaseBackend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitFilter) DeepCopyInto(out *RateLimitFilter) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitFilter. -func (in *RateLimitFilter) DeepCopy() *RateLimitFilter { - if in == nil { - return nil - } - out := new(RateLimitFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RateLimitFilter) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitFilterList) DeepCopyInto(out *RateLimitFilterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RateLimitFilter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitFilterList. -func (in *RateLimitFilterList) DeepCopy() *RateLimitFilterList { - if in == nil { - return nil - } - out := new(RateLimitFilterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RateLimitFilterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitFilterSpec) DeepCopyInto(out *RateLimitFilterSpec) { - *out = *in - if in.Global != nil { - in, out := &in.Global, &out.Global - *out = new(GlobalRateLimit) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitFilterSpec. -func (in *RateLimitFilterSpec) DeepCopy() *RateLimitFilterSpec { - if in == nil { - return nil - } - out := new(RateLimitFilterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitRedisSettings) DeepCopyInto(out *RateLimitRedisSettings) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(RedisTLSSettings) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitRedisSettings. -func (in *RateLimitRedisSettings) DeepCopy() *RateLimitRedisSettings { - if in == nil { - return nil - } - out := new(RateLimitRedisSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitRule) DeepCopyInto(out *RateLimitRule) { - *out = *in - if in.ClientSelectors != nil { - in, out := &in.ClientSelectors, &out.ClientSelectors - *out = make([]RateLimitSelectCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Limit = in.Limit -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitRule. -func (in *RateLimitRule) DeepCopy() *RateLimitRule { - if in == nil { - return nil - } - out := new(RateLimitRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitSelectCondition) DeepCopyInto(out *RateLimitSelectCondition) { - *out = *in - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]HeaderMatch, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SourceCIDR != nil { - in, out := &in.SourceCIDR, &out.SourceCIDR - *out = new(SourceMatch) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitSelectCondition. -func (in *RateLimitSelectCondition) DeepCopy() *RateLimitSelectCondition { - if in == nil { - return nil - } - out := new(RateLimitSelectCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitValue) DeepCopyInto(out *RateLimitValue) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitValue. -func (in *RateLimitValue) DeepCopy() *RateLimitValue { - if in == nil { - return nil - } - out := new(RateLimitValue) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisTLSSettings) DeepCopyInto(out *RedisTLSSettings) { - *out = *in - if in.CertificateRef != nil { - in, out := &in.CertificateRef, &out.CertificateRef - *out = new(v1beta1.SecretObjectReference) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisTLSSettings. -func (in *RedisTLSSettings) DeepCopy() *RedisTLSSettings { - if in == nil { - return nil - } - out := new(RedisTLSSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoteJWKS) DeepCopyInto(out *RemoteJWKS) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteJWKS. -func (in *RemoteJWKS) DeepCopy() *RemoteJWKS { - if in == nil { - return nil - } - out := new(RemoteJWKS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderCustomTag) DeepCopyInto(out *RequestHeaderCustomTag) { - *out = *in - if in.DefaultValue != nil { - in, out := &in.DefaultValue, &out.DefaultValue - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderCustomTag. -func (in *RequestHeaderCustomTag) DeepCopy() *RequestHeaderCustomTag { - if in == nil { - return nil - } - out := new(RequestHeaderCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceMatch) DeepCopyInto(out *SourceMatch) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(SourceMatchType) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceMatch. -func (in *SourceMatch) DeepCopy() *SourceMatch { - if in == nil { - return nil - } - out := new(SourceMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TCPKeepalive) DeepCopyInto(out *TCPKeepalive) { - *out = *in - if in.Probes != nil { - in, out := &in.Probes, &out.Probes - *out = new(uint32) - **out = **in - } - if in.IdleTime != nil { - in, out := &in.IdleTime, &out.IdleTime - *out = new(v1beta1.Duration) - **out = **in - } - if in.Interval != nil { - in, out := &in.Interval, &out.Interval - *out = new(v1beta1.Duration) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPKeepalive. -func (in *TCPKeepalive) DeepCopy() *TCPKeepalive { - if in == nil { - return nil - } - out := new(TCPKeepalive) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TracingProvider) DeepCopyInto(out *TracingProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TracingProvider. -func (in *TracingProvider) DeepCopy() *TracingProvider { - if in == nil { - return nil - } - out := new(TracingProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XDSTranslatorHooks) DeepCopyInto(out *XDSTranslatorHooks) { - *out = *in - if in.Pre != nil { - in, out := &in.Pre, &out.Pre - *out = make([]XDSTranslatorHook, len(*in)) - copy(*out, *in) - } - if in.Post != nil { - in, out := &in.Post, &out.Post - *out = make([]XDSTranslatorHook, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDSTranslatorHooks. -func (in *XDSTranslatorHooks) DeepCopy() *XDSTranslatorHooks { - if in == nil { - return nil - } - out := new(XDSTranslatorHooks) - in.DeepCopyInto(out) - return out -} diff --git a/charts/gateway-helm/crds/gatewayapi-crds.yaml b/charts/gateway-helm/crds/gatewayapi-crds.yaml index 2de13927474..a9b5b4c77ac 100644 --- a/charts/gateway-helm/crds/gatewayapi-crds.yaml +++ b/charts/gateway-helm/crds/gatewayapi-crds.yaml @@ -17,14 +17,499 @@ # --- # +# config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml +# +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 + gateway.networking.k8s.io/channel: experimental + creationTimestamp: null + labels: + gateway.networking.k8s.io/policy: Direct + name: backendtlspolicies.gateway.networking.k8s.io +spec: + group: gateway.networking.k8s.io + names: + categories: + - gateway-api + kind: BackendTLSPolicy + listKind: BackendTLSPolicyList + plural: backendtlspolicies + shortNames: + - btlspolicy + singular: backendtlspolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: BackendTLSPolicy provides a way to configure how a Gateway connects + to a Backend via TLS. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines the desired state of BackendTLSPolicy. + properties: + targetRef: + description: "TargetRef identifies an API object to apply the policy + to. Only Services have Extended support. Implementations MAY support + additional objects, with Implementation Specific support. Note that + this config applies to the entire referenced resource by default, + but this default may change in the future to provide a more granular + application of the policy. \n Support: Extended for Kubernetes Service + \n Support: Implementation-specific for any other resource" + properties: + group: + description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. When + unspecified, the local namespace is inferred. Even when policy + targets a resource in a different namespace, it MUST only apply + to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sectionName: + description: "SectionName is the name of a section within the + target resource. When unspecified, this targetRef targets the + entire resource. In the following resources, SectionName is + interpreted as the following: \n * Gateway: Listener Name * + Service: Port Name \n If a SectionName is specified, but does + not exist on the targeted object, the Policy must fail to attach, + and the policy implementation should record a `ResolvedRefs` + or similar Condition in the Policy's status." + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - group + - kind + - name + type: object + tls: + description: TLS contains backend TLS policy configuration. + properties: + caCertRefs: + description: "CACertRefs contains one or more references to Kubernetes + objects that contain a PEM-encoded TLS CA certificate bundle, + which is used to validate a TLS handshake between the Gateway + and backend Pod. \n If CACertRefs is empty or unspecified, then + WellKnownCACerts must be specified. Only one of CACertRefs or + WellKnownCACerts may be specified, not both. If CACertRefs is + empty or unspecified, the configuration for WellKnownCACerts + MUST be honored instead. \n References to a resource in a different + namespace are invalid for the moment, although we will revisit + this in the future. \n A single CACertRef to a Kubernetes ConfigMap + kind has \"Core\" support. Implementations MAY choose to support + attaching multiple certificates to a backend, but this behavior + is implementation-specific. \n Support: Core - An optional single + reference to a Kubernetes ConfigMap, with the CA certificate + in a key named `ca.crt`. \n Support: Implementation-specific + (More than one reference, or other kinds of resources)." + items: + description: "LocalObjectReference identifies an API object + within the namespace of the referrer. The API object must + be valid in the cluster; the Group and Kind must be registered + in the cluster for this reference to be valid. \n References + to objects with invalid Group and Kind are not valid, and + must be rejected by the implementation, with appropriate Conditions + set on the containing object." + properties: + group: + description: Group is the group of the referent. For example, + "gateway.networking.k8s.io". When unspecified or empty + string, core API group is inferred. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the referent. For example "HTTPRoute" + or "Service". + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the referent. + maxLength: 253 + minLength: 1 + type: string + required: + - group + - kind + - name + type: object + maxItems: 8 + type: array + hostname: + description: "Hostname is used for two purposes in the connection + between Gateways and backends: \n 1. Hostname MUST be used as + the SNI to connect to the backend (RFC 6066). 2. Hostname MUST + be used for authentication and MUST match the certificate served + by the matching backend. \n Support: Core" + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + wellKnownCACerts: + description: "WellKnownCACerts specifies whether system CA certificates + may be used in the TLS handshake between the gateway and backend + pod. \n If WellKnownCACerts is unspecified or empty (\"\"), + then CACertRefs must be specified with at least one entry for + a valid configuration. Only one of CACertRefs or WellKnownCACerts + may be specified, not both. \n Support: Core for \"System\"" + enum: + - System + type: string + required: + - hostname + type: object + x-kubernetes-validations: + - message: must not contain both CertRefs and WellKnownCACerts + rule: (has(self.caCertRefs) && size(self.caCertRefs) > 0 && has(self.wellKnownCACerts) + && self.wellKnownCACerts != "") + - message: must specify either CertRefs or WellKnownCACerts + rule: '!(has(self.caCertRefs) && size(self.caCertRefs) > 0 || has(self.wellKnownCACerts) + && self.wellKnownCACerts != "")' + required: + - targetRef + - tls + type: object + status: + description: Status defines the current state of BackendTLSPolicy. + properties: + ancestors: + description: "Ancestors is a list of ancestor resources (usually Gateways) + that are associated with the policy, and the status of the policy + with respect to each ancestor. When this policy attaches to a parent, + the controller that manages the parent and the ancestors MUST add + an entry to this list when the controller first sees the policy + and SHOULD update the entry as appropriate when the relevant ancestor + is modified. \n Note that choosing the relevant ancestor is left + to the Policy designers; an important part of Policy design is designing + the right object level at which to namespace this status. \n Note + also that implementations MUST ONLY populate ancestor status for + the Ancestor resources they are responsible for. Implementations + MUST use the ControllerName field to uniquely identify the entries + in this list that they are responsible for. \n Note that to achieve + this, the list of PolicyAncestorStatus structs MUST be treated as + a map with a composite key, made up of the AncestorRef and ControllerName + fields combined. \n A maximum of 16 ancestors will be represented + in this list. An empty list means the Policy is not relevant for + any ancestors. \n If this slice is full, implementations MUST NOT + add further entries. Instead they MUST consider the policy unimplementable + and signal that on any related resources such as the ancestor that + would be referenced here. For example, if this list was full on + BackendTLSPolicy, no additional Gateways would be able to reference + the Service targeted by the BackendTLSPolicy." + items: + description: "PolicyAncestorStatus describes the status of a route + with respect to an associated Ancestor. \n Ancestors refer to + objects that are either the Target of a policy or above it in + terms of object hierarchy. For example, if a policy targets a + Service, the Policy's Ancestors are, in order, the Service, the + HTTPRoute, the Gateway, and the GatewayClass. Almost always, in + this hierarchy, the Gateway will be the most useful object to + place Policy status on, so we recommend that implementations SHOULD + use Gateway as the PolicyAncestorStatus object unless the designers + have a _very_ good reason otherwise. \n In the context of policy + attachment, the Ancestor is used to distinguish which resource + results in a distinct application of this policy. For example, + if a policy targets a Service, it may have a distinct result per + attached Gateway. \n Policies targeting the same resource may + have different effects depending on the ancestors of those resources. + For example, different Gateways targeting the same Service may + have different capabilities, especially if they have different + underlying implementations. \n For example, in BackendTLSPolicy, + the Policy attaches to a Service that is used as a backend in + a HTTPRoute that is itself attached to a Gateway. In this case, + the relevant object for status is the Gateway, and that is the + ancestor object referred to in this status. \n Note that a parent + is also an ancestor, so for objects where the parent is the relevant + object for status, this struct SHOULD still be used. \n This struct + is intended to be used in a slice that's effectively a map, with + a composite key made up of the AncestorRef and the ControllerName." + properties: + ancestorRef: + description: AncestorRef corresponds with a ParentRef in the + spec that this PolicyAncestorStatus struct describes the status + of. + properties: + group: + default: gateway.networking.k8s.io + description: "Group is the group of the referent. When unspecified, + \"gateway.networking.k8s.io\" is inferred. To set the + core API group (such as for a \"Service\" kind referent), + Group must be explicitly set to \"\" (empty string). \n + Support: Core" + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + default: Gateway + description: "Kind is kind of the referent. \n There are + two kinds of parent resources with \"Core\" support: \n + * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services + only) \n Support for other resources is Implementation-Specific." + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: "Name is the name of the referent. \n Support: + Core" + maxLength: 253 + minLength: 1 + type: string + namespace: + description: "Namespace is the namespace of the referent. + When unspecified, this refers to the local namespace of + the Route. \n Note that there are specific rules for ParentRefs + which cross namespace boundaries. Cross-namespace references + are only valid if they are explicitly allowed by something + in the namespace they are referring to. For example: Gateway + has the AllowedRoutes field, and ReferenceGrant provides + a generic way to enable any other kind of cross-namespace + reference. \n ParentRefs from a Route to a Service in + the same namespace are \"producer\" routes, which apply + default routing rules to inbound connections from any + namespace to the Service. \n ParentRefs from a Route to + a Service in a different namespace are \"consumer\" routes, + and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for + which the intended destination of the connections are + a Service targeted as a ParentRef of the Route. \n Support: + Core" + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + port: + description: "Port is the network port this Route targets. + It can be interpreted differently based on the type of + parent resource. \n When the parent resource is a Gateway, + this targets all listeners listening on the specified + port that also support this kind of Route(and select this + Route). It's not recommended to set `Port` unless the + networking behaviors specified in a Route must apply to + a specific port as opposed to a listener(s) whose port(s) + may be changed. When both Port and SectionName are specified, + the name and port of the selected listener must match + both specified values. \n When the parent resource is + a Service, this targets a specific port in the Service + spec. When both Port (experimental) and SectionName are + specified, the name and port of the selected port must + match both specified values. \n Implementations MAY choose + to support other parent resources. Implementations supporting + other types of parent resources MUST clearly document + how/if Port is interpreted. \n For the purpose of status, + an attachment is considered successful as long as the + parent resource accepts it partially. For example, Gateway + listeners can restrict which Routes can attach to them + by Route kind, namespace, or hostname. If 1 of 2 Gateway + listeners accept attachment from the referencing Route, + the Route MUST be considered successfully attached. If + no Gateway listeners accept attachment from this Route, + the Route MUST be considered detached from the Gateway. + \n Support: Extended \n " + format: int32 + maximum: 65535 + minimum: 1 + type: integer + sectionName: + description: "SectionName is the name of a section within + the target resource. In the following resources, SectionName + is interpreted as the following: \n * Gateway: Listener + Name. When both Port (experimental) and SectionName are + specified, the name and port of the selected listener + must match both specified values. * Service: Port Name. + When both Port (experimental) and SectionName are specified, + the name and port of the selected listener must match + both specified values. Note that attaching Routes to Services + as Parents is part of experimental Mesh support and is + not supported for any other purpose. \n Implementations + MAY choose to support attaching Routes to other resources. + If that is the case, they MUST clearly document how SectionName + is interpreted. \n When unspecified (empty string), this + will reference the entire resource. For the purpose of + status, an attachment is considered successful if at least + one section in the parent resource accepts it. For example, + Gateway listeners can restrict which Routes can attach + to them by Route kind, namespace, or hostname. If 1 of + 2 Gateway listeners accept attachment from the referencing + Route, the Route MUST be considered successfully attached. + If no Gateway listeners accept attachment from this Route, + the Route MUST be considered detached from the Gateway. + \n Support: Core" + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - name + type: object + conditions: + description: Conditions describes the status of the Policy with + respect to the given Ancestor. + items: + description: "Condition contains details for one aspect of + the current state of this API Resource. --- This struct + is intended for direct use as an array at the field path + .status.conditions. For example, \n type FooStatus struct{ + // Represents the observations of a foo's current state. + // Known .status.conditions.type are: \"Available\", \"Progressing\", + and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields + }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should + be when the underlying condition changed. If that is + not known, then using the time when the API field changed + is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define expected + values and meanings for this field, and whether the + values are considered a guaranteed API. The value should + be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is + (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + controllerName: + description: "ControllerName is a domain/path string that indicates + the name of the controller that wrote this status. This corresponds + with the controllerName field on GatewayClass. \n Example: + \"example.net/gateway-controller\". \n The format of this + field is DOMAIN \"/\" PATH, where DOMAIN and PATH are valid + Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). + \n Controllers MUST populate this field when writing status. + Controllers should ensure that entries to status populated + with their ControllerName are cleaned up when they are no + longer necessary." + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$ + type: string + required: + - ancestorRef + - controllerName + type: object + maxItems: 16 + type: array + required: + - ancestors + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: null + storedVersions: null +--- +# # config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml # apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: gatewayclasses.gateway.networking.k8s.io @@ -55,10 +540,7 @@ spec: name: Description priority: 1 type: string - deprecated: true - deprecationWarning: The v1alpha2 version of GatewayClass has been deprecated and - will be removed in a future release of the API. Please upgrade to v1beta1. - name: v1alpha2 + name: v1 schema: openAPIV3Schema: description: "GatewayClass describes a class of Gateways available to the @@ -241,11 +723,40 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + supportedFeatures: + description: 'SupportedFeatures is the set of features the GatewayClass + support. It MUST be sorted in ascending alphabetical order. ' + items: + description: SupportedFeature is used to describe distinct features + that are covered by conformance tests. + enum: + - Gateway + - GatewayPort8080 + - GatewayStaticAddresses + - HTTPRoute + - HTTPRouteDestinationPortMatching + - HTTPRouteHostRewrite + - HTTPRouteMethodMatching + - HTTPRoutePathRedirect + - HTTPRoutePathRewrite + - HTTPRoutePortRedirect + - HTTPRouteQueryParamMatching + - HTTPRouteRequestMirror + - HTTPRouteRequestMultipleMirrors + - HTTPRouteResponseHeaderModification + - HTTPRouteSchemeRedirect + - Mesh + - ReferenceGrant + - TLSRoute + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set type: object required: - spec type: object - served: false + served: true storage: false subresources: status: {} @@ -446,6 +957,35 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + supportedFeatures: + description: 'SupportedFeatures is the set of features the GatewayClass + support. It MUST be sorted in ascending alphabetical order. ' + items: + description: SupportedFeature is used to describe distinct features + that are covered by conformance tests. + enum: + - Gateway + - GatewayPort8080 + - GatewayStaticAddresses + - HTTPRoute + - HTTPRouteDestinationPortMatching + - HTTPRouteHostRewrite + - HTTPRouteMethodMatching + - HTTPRoutePathRedirect + - HTTPRoutePathRewrite + - HTTPRoutePortRedirect + - HTTPRouteQueryParamMatching + - HTTPRouteRequestMirror + - HTTPRouteRequestMultipleMirrors + - HTTPRouteResponseHeaderModification + - HTTPRouteSchemeRedirect + - Mesh + - ReferenceGrant + - TLSRoute + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set type: object required: - spec @@ -468,8 +1008,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: gateways.gateway.networking.k8s.io @@ -499,10 +1039,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date - deprecated: true - deprecationWarning: The v1alpha2 version of Gateway has been deprecated and will - be removed in a future release of the API. Please upgrade to v1beta1. - name: v1alpha2 + name: v1 schema: openAPIV3Schema: description: Gateway represents an instance of a service-traffic handling @@ -532,14 +1069,12 @@ spec: for the address(es) on the \"outside of the Gateway\", that traffic bound for this Gateway will use. This could be the IP address or hostname of an external load balancer or other networking infrastructure, - or some other address that traffic will be sent to. \n The .listener.hostname - field is used to route traffic that has already arrived at the Gateway - to the correct in-cluster destination. \n If no Addresses are specified, - the implementation MAY schedule the Gateway in an implementation-specific - manner, assigning an appropriate set of Addresses. \n The implementation - MUST bind all Listeners to every GatewayAddress that it assigns - to the Gateway and add a corresponding entry in GatewayStatus.Addresses. - \n Support: Extended \n " + or some other address that traffic will be sent to. \n If no Addresses + are specified, the implementation MAY schedule the Gateway in an + implementation-specific manner, assigning an appropriate set of + Addresses. \n The implementation MUST bind all Listeners to every + GatewayAddress that it assigns to the Gateway and add a corresponding + entry in GatewayStatus.Addresses. \n Support: Extended \n " items: description: GatewayAddress describes an address that can be bound to a Gateway. @@ -595,39 +1130,134 @@ spec: maxLength: 253 minLength: 1 type: string + infrastructure: + description: "Infrastructure defines infrastructure level attributes + about this Gateway instance. \n Support: Core \n " + properties: + annotations: + additionalProperties: + description: AnnotationValue is the value of an annotation in + Gateway API. This is used for validation of maps such as TLS + options. This roughly matches Kubernetes annotation validation, + although the length validation in that case is based on the + entire size of the annotations struct. + maxLength: 4096 + minLength: 0 + type: string + description: "Annotations that SHOULD be applied to any resources + created in response to this Gateway. \n For implementations + creating other Kubernetes objects, this should be the `metadata.annotations` + field on resources. For other implementations, this refers to + any relevant (implementation specific) \"annotations\" concepts. + \n An implementation may chose to add additional implementation-specific + annotations as they see fit. \n Support: Extended" + maxProperties: 8 + type: object + labels: + additionalProperties: + description: AnnotationValue is the value of an annotation in + Gateway API. This is used for validation of maps such as TLS + options. This roughly matches Kubernetes annotation validation, + although the length validation in that case is based on the + entire size of the annotations struct. + maxLength: 4096 + minLength: 0 + type: string + description: "Labels that SHOULD be applied to any resources created + in response to this Gateway. \n For implementations creating + other Kubernetes objects, this should be the `metadata.labels` + field on resources. For other implementations, this refers to + any relevant (implementation specific) \"labels\" concepts. + \n An implementation may chose to add additional implementation-specific + labels as they see fit. \n Support: Extended" + maxProperties: 8 + type: object + type: object listeners: description: "Listeners associated with this Gateway. Listeners define logical endpoints that are bound on this Gateway's addresses. At - least one Listener MUST be specified. \n Each listener in a Gateway - must have a unique combination of Hostname, Port, and Protocol. - \n Within the HTTP Conformance Profile, the below combinations of - port and protocol are considered Core and MUST be supported: \n - 1. Port: 80, Protocol: HTTP 2. Port: 443, Protocol: HTTPS \n Within - the TLS Conformance Profile, the below combinations of port and - protocol are considered Core and MUST be supported: \n 1. Port: - 443, Protocol: TLS \n Port and protocol combinations not listed - above are considered Extended. \n An implementation MAY group Listeners - by Port and then collapse each group of Listeners into a single - Listener if the implementation determines that the Listeners in - the group are \"compatible\". An implementation MAY also group together - and collapse compatible Listeners belonging to different Gateways. - \n For example, an implementation might consider Listeners to be - compatible with each other if all of the following conditions are - met: \n 1. Either each Listener within the group specifies the \"HTTP\" - Protocol or each Listener within the group specifies either the - \"HTTPS\" or \"TLS\" Protocol. \n 2. Each Listener within the group - specifies a Hostname that is unique within the group. \n 3. As a - special case, one Listener within a group may omit Hostname, in - which case this Listener matches when no other Listener matches. - \n If the implementation does collapse compatible Listeners, the - hostname provided in the incoming client request MUST be matched - to a Listener to find the correct set of Routes. The incoming hostname - MUST be matched using the Hostname field for each Listener in order - of most to least specific. That is, exact matches must be processed - before wildcard matches. \n If this field specifies multiple Listeners - that have the same Port value but are not compatible, the implementation - must raise a \"Conflicted\" condition in the Listener status. \n - Support: Core" + least one Listener MUST be specified. \n Each Listener in a set + of Listeners (for example, in a single Gateway) MUST be _distinct_, + in that a traffic flow MUST be able to be assigned to exactly one + listener. (This section uses \"set of Listeners\" rather than \"Listeners + in a single Gateway\" because implementations MAY merge configuration + from multiple Gateways onto a single data plane, and these rules + _also_ apply in that case). \n Practically, this means that each + listener in a set MUST have a unique combination of Port, Protocol, + and, if supported by the protocol, Hostname. \n Some combinations + of port, protocol, and TLS settings are considered Core support + and MUST be supported by implementations based on their targeted + conformance profile: \n HTTP Profile \n 1. HTTPRoute, Port: 80, + Protocol: HTTP 2. HTTPRoute, Port: 443, Protocol: HTTPS, TLS Mode: + Terminate, TLS keypair provided \n TLS Profile \n 1. TLSRoute, Port: + 443, Protocol: TLS, TLS Mode: Passthrough \n \"Distinct\" Listeners + have the following property: \n The implementation can match inbound + requests to a single distinct Listener. When multiple Listeners + share values for fields (for example, two Listeners with the same + Port value), the implementation can match requests to only one of + the Listeners using other Listener fields. \n For example, the following + Listener scenarios are distinct: \n 1. Multiple Listeners with the + same Port that all use the \"HTTP\" Protocol that all have unique + Hostname values. 2. Multiple Listeners with the same Port that use + either the \"HTTPS\" or \"TLS\" Protocol that all have unique Hostname + values. 3. A mixture of \"TCP\" and \"UDP\" Protocol Listeners, + where no Listener with the same Protocol has the same Port value. + \n Some fields in the Listener struct have possible values that + affect whether the Listener is distinct. Hostname is particularly + relevant for HTTP or HTTPS protocols. \n When using the Hostname + value to select between same-Port, same-Protocol Listeners, the + Hostname value must be different on each Listener for the Listener + to be distinct. \n When the Listeners are distinct based on Hostname, + inbound request hostnames MUST match from the most specific to least + specific Hostname values to choose the correct Listener and its + associated set of Routes. \n Exact matches must be processed before + wildcard matches, and wildcard matches must be processed before + fallback (empty Hostname value) matches. For example, `\"foo.example.com\"` + takes precedence over `\"*.example.com\"`, and `\"*.example.com\"` + takes precedence over `\"\"`. \n Additionally, if there are multiple + wildcard entries, more specific wildcard entries must be processed + before less specific wildcard entries. For example, `\"*.foo.example.com\"` + takes precedence over `\"*.example.com\"`. The precise definition + here is that the higher the number of dots in the hostname to the + right of the wildcard character, the higher the precedence. \n The + wildcard character will match any number of characters _and dots_ + to the left, however, so `\"*.example.com\"` will match both `\"foo.bar.example.com\"` + _and_ `\"bar.example.com\"`. \n If a set of Listeners contains Listeners + that are not distinct, then those Listeners are Conflicted, and + the implementation MUST set the \"Conflicted\" condition in the + Listener Status to \"True\". \n Implementations MAY choose to accept + a Gateway with some Conflicted Listeners only if they only accept + the partial Listener set that contains no Conflicted Listeners. + To put this another way, implementations may accept a partial Listener + set only if they throw out *all* the conflicting Listeners. No picking + one of the conflicting listeners as the winner. This also means + that the Gateway must have at least one non-conflicting Listener + in this case, otherwise it violates the requirement that at least + one Listener must be present. \n The implementation MUST set a \"ListenersNotValid\" + condition on the Gateway Status when the Gateway contains Conflicted + Listeners whether or not they accept the Gateway. That Condition + SHOULD clearly indicate in the Message which Listeners are conflicted, + and which are Accepted. Additionally, the Listener status for those + listeners SHOULD indicate which Listeners are conflicted and not + Accepted. \n A Gateway's Listeners are considered \"compatible\" + if: \n 1. They are distinct. 2. The implementation can serve them + in compliance with the Addresses requirement that all Listeners + are available on all assigned addresses. \n Compatible combinations + in Extended support are expected to vary across implementations. + A combination that is compatible for one implementation may not + be compatible for another. \n For example, an implementation that + cannot serve both TCP and UDP listeners on the same address, or + cannot mix HTTPS and generic TLS listens on the same port would + not consider those cases compatible, even though they are distinct. + \n Note that requests SHOULD match at most one Listener. For example, + if Listeners are defined for \"foo.example.com\" and \"*.example.com\", + a request to \"foo.example.com\" SHOULD only be routed using routes + attached to the \"foo.example.com\" Listener (and not the \"*.example.com\" + Listener). This concept is known as \"Listener Isolation\". Implementations + that do not support Listener Isolation MUST clearly document this. + \n Implementations MAY merge separate Gateways onto a single set + of Addresses if all Listeners across all Gateways are compatible. + \n Support: Core" items: description: Listener embodies the concept of a logical endpoint where a Gateway accepts network connections. @@ -876,14 +1506,14 @@ spec: minLength: 1 type: string namespace: - description: "Namespace is the namespace of the backend. - When unspecified, the local namespace is inferred. - \n Note that when a namespace different than the - local namespace is specified, a ReferenceGrant object - is required in the referent namespace to allow that - namespace's owner to accept the reference. See the - ReferenceGrant documentation for details. \n Support: - Core" + description: "Namespace is the namespace of the referenced + object. When unspecified, the local namespace is + inferred. \n Note that when a namespace different + than the local namespace is specified, a ReferenceGrant + object is required in the referent namespace to + allow that namespace's owner to accept the reference. + See the ReferenceGrant documentation for details. + \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -985,13 +1615,15 @@ spec: description: Status defines the current state of Gateway. properties: addresses: - description: "Addresses lists the IP addresses that have actually - been bound to the Gateway. These addresses may differ from the addresses - in the Spec, e.g. if the Gateway automatically assigns an address - from a reserved pool. \n " + description: "Addresses lists the network addresses that have been + bound to the Gateway. \n This list may differ from the addresses + provided in the spec under some conditions: \n * no addresses are + specified, all addresses are dynamically assigned * a combination + of specified and dynamic addresses are assigned * a specified address + was unusable (e.g. already in use) \n " items: - description: GatewayStatusAddress describes an address that is bound - to a Gateway. + description: GatewayStatusAddress describes a network address that + is bound to a Gateway. oneOf: - properties: type: @@ -1127,8 +1759,23 @@ spec: description: ListenerStatus is the status associated with a Listener. properties: attachedRoutes: - description: AttachedRoutes represents the total number of accepted + description: "AttachedRoutes represents the total number of Routes that have been successfully attached to this Listener. + \n Successful attachment of a Route to a Listener is based + solely on the combination of the AllowedRoutes field on the + corresponding Listener and the Route's ParentRefs field. A + Route is successfully attached to a Listener when it is selected + by the Listener's AllowedRoutes field AND the Route has a + valid ParentRef selecting the whole Gateway resource or a + specific Listener as a parent resource (more detail on attachment + semantics can be found in the documentation on the various + Route kinds ParentRefs fields). Listener or Route status does + not impact successful attachment, i.e. the AttachedRoutes + field count MUST be set for Listeners with condition Accepted: + false and MUST count successfully attached Routes that may + themselves have Accepted: false conditions. \n Uses for this + field include troubleshooting Route attachment and measuring + blast radius/impact of changes to a Listener." format: int32 type: integer conditions: @@ -1263,7 +1910,7 @@ spec: required: - spec type: object - served: false + served: true storage: false subresources: status: {} @@ -1310,14 +1957,12 @@ spec: for the address(es) on the \"outside of the Gateway\", that traffic bound for this Gateway will use. This could be the IP address or hostname of an external load balancer or other networking infrastructure, - or some other address that traffic will be sent to. \n The .listener.hostname - field is used to route traffic that has already arrived at the Gateway - to the correct in-cluster destination. \n If no Addresses are specified, - the implementation MAY schedule the Gateway in an implementation-specific - manner, assigning an appropriate set of Addresses. \n The implementation - MUST bind all Listeners to every GatewayAddress that it assigns - to the Gateway and add a corresponding entry in GatewayStatus.Addresses. - \n Support: Extended \n " + or some other address that traffic will be sent to. \n If no Addresses + are specified, the implementation MAY schedule the Gateway in an + implementation-specific manner, assigning an appropriate set of + Addresses. \n The implementation MUST bind all Listeners to every + GatewayAddress that it assigns to the Gateway and add a corresponding + entry in GatewayStatus.Addresses. \n Support: Extended \n " items: description: GatewayAddress describes an address that can be bound to a Gateway. @@ -1373,39 +2018,134 @@ spec: maxLength: 253 minLength: 1 type: string + infrastructure: + description: "Infrastructure defines infrastructure level attributes + about this Gateway instance. \n Support: Core \n " + properties: + annotations: + additionalProperties: + description: AnnotationValue is the value of an annotation in + Gateway API. This is used for validation of maps such as TLS + options. This roughly matches Kubernetes annotation validation, + although the length validation in that case is based on the + entire size of the annotations struct. + maxLength: 4096 + minLength: 0 + type: string + description: "Annotations that SHOULD be applied to any resources + created in response to this Gateway. \n For implementations + creating other Kubernetes objects, this should be the `metadata.annotations` + field on resources. For other implementations, this refers to + any relevant (implementation specific) \"annotations\" concepts. + \n An implementation may chose to add additional implementation-specific + annotations as they see fit. \n Support: Extended" + maxProperties: 8 + type: object + labels: + additionalProperties: + description: AnnotationValue is the value of an annotation in + Gateway API. This is used for validation of maps such as TLS + options. This roughly matches Kubernetes annotation validation, + although the length validation in that case is based on the + entire size of the annotations struct. + maxLength: 4096 + minLength: 0 + type: string + description: "Labels that SHOULD be applied to any resources created + in response to this Gateway. \n For implementations creating + other Kubernetes objects, this should be the `metadata.labels` + field on resources. For other implementations, this refers to + any relevant (implementation specific) \"labels\" concepts. + \n An implementation may chose to add additional implementation-specific + labels as they see fit. \n Support: Extended" + maxProperties: 8 + type: object + type: object listeners: description: "Listeners associated with this Gateway. Listeners define logical endpoints that are bound on this Gateway's addresses. At - least one Listener MUST be specified. \n Each listener in a Gateway - must have a unique combination of Hostname, Port, and Protocol. - \n Within the HTTP Conformance Profile, the below combinations of - port and protocol are considered Core and MUST be supported: \n - 1. Port: 80, Protocol: HTTP 2. Port: 443, Protocol: HTTPS \n Within - the TLS Conformance Profile, the below combinations of port and - protocol are considered Core and MUST be supported: \n 1. Port: - 443, Protocol: TLS \n Port and protocol combinations not listed - above are considered Extended. \n An implementation MAY group Listeners - by Port and then collapse each group of Listeners into a single - Listener if the implementation determines that the Listeners in - the group are \"compatible\". An implementation MAY also group together - and collapse compatible Listeners belonging to different Gateways. - \n For example, an implementation might consider Listeners to be - compatible with each other if all of the following conditions are - met: \n 1. Either each Listener within the group specifies the \"HTTP\" - Protocol or each Listener within the group specifies either the - \"HTTPS\" or \"TLS\" Protocol. \n 2. Each Listener within the group - specifies a Hostname that is unique within the group. \n 3. As a - special case, one Listener within a group may omit Hostname, in - which case this Listener matches when no other Listener matches. - \n If the implementation does collapse compatible Listeners, the - hostname provided in the incoming client request MUST be matched - to a Listener to find the correct set of Routes. The incoming hostname - MUST be matched using the Hostname field for each Listener in order - of most to least specific. That is, exact matches must be processed - before wildcard matches. \n If this field specifies multiple Listeners - that have the same Port value but are not compatible, the implementation - must raise a \"Conflicted\" condition in the Listener status. \n - Support: Core" + least one Listener MUST be specified. \n Each Listener in a set + of Listeners (for example, in a single Gateway) MUST be _distinct_, + in that a traffic flow MUST be able to be assigned to exactly one + listener. (This section uses \"set of Listeners\" rather than \"Listeners + in a single Gateway\" because implementations MAY merge configuration + from multiple Gateways onto a single data plane, and these rules + _also_ apply in that case). \n Practically, this means that each + listener in a set MUST have a unique combination of Port, Protocol, + and, if supported by the protocol, Hostname. \n Some combinations + of port, protocol, and TLS settings are considered Core support + and MUST be supported by implementations based on their targeted + conformance profile: \n HTTP Profile \n 1. HTTPRoute, Port: 80, + Protocol: HTTP 2. HTTPRoute, Port: 443, Protocol: HTTPS, TLS Mode: + Terminate, TLS keypair provided \n TLS Profile \n 1. TLSRoute, Port: + 443, Protocol: TLS, TLS Mode: Passthrough \n \"Distinct\" Listeners + have the following property: \n The implementation can match inbound + requests to a single distinct Listener. When multiple Listeners + share values for fields (for example, two Listeners with the same + Port value), the implementation can match requests to only one of + the Listeners using other Listener fields. \n For example, the following + Listener scenarios are distinct: \n 1. Multiple Listeners with the + same Port that all use the \"HTTP\" Protocol that all have unique + Hostname values. 2. Multiple Listeners with the same Port that use + either the \"HTTPS\" or \"TLS\" Protocol that all have unique Hostname + values. 3. A mixture of \"TCP\" and \"UDP\" Protocol Listeners, + where no Listener with the same Protocol has the same Port value. + \n Some fields in the Listener struct have possible values that + affect whether the Listener is distinct. Hostname is particularly + relevant for HTTP or HTTPS protocols. \n When using the Hostname + value to select between same-Port, same-Protocol Listeners, the + Hostname value must be different on each Listener for the Listener + to be distinct. \n When the Listeners are distinct based on Hostname, + inbound request hostnames MUST match from the most specific to least + specific Hostname values to choose the correct Listener and its + associated set of Routes. \n Exact matches must be processed before + wildcard matches, and wildcard matches must be processed before + fallback (empty Hostname value) matches. For example, `\"foo.example.com\"` + takes precedence over `\"*.example.com\"`, and `\"*.example.com\"` + takes precedence over `\"\"`. \n Additionally, if there are multiple + wildcard entries, more specific wildcard entries must be processed + before less specific wildcard entries. For example, `\"*.foo.example.com\"` + takes precedence over `\"*.example.com\"`. The precise definition + here is that the higher the number of dots in the hostname to the + right of the wildcard character, the higher the precedence. \n The + wildcard character will match any number of characters _and dots_ + to the left, however, so `\"*.example.com\"` will match both `\"foo.bar.example.com\"` + _and_ `\"bar.example.com\"`. \n If a set of Listeners contains Listeners + that are not distinct, then those Listeners are Conflicted, and + the implementation MUST set the \"Conflicted\" condition in the + Listener Status to \"True\". \n Implementations MAY choose to accept + a Gateway with some Conflicted Listeners only if they only accept + the partial Listener set that contains no Conflicted Listeners. + To put this another way, implementations may accept a partial Listener + set only if they throw out *all* the conflicting Listeners. No picking + one of the conflicting listeners as the winner. This also means + that the Gateway must have at least one non-conflicting Listener + in this case, otherwise it violates the requirement that at least + one Listener must be present. \n The implementation MUST set a \"ListenersNotValid\" + condition on the Gateway Status when the Gateway contains Conflicted + Listeners whether or not they accept the Gateway. That Condition + SHOULD clearly indicate in the Message which Listeners are conflicted, + and which are Accepted. Additionally, the Listener status for those + listeners SHOULD indicate which Listeners are conflicted and not + Accepted. \n A Gateway's Listeners are considered \"compatible\" + if: \n 1. They are distinct. 2. The implementation can serve them + in compliance with the Addresses requirement that all Listeners + are available on all assigned addresses. \n Compatible combinations + in Extended support are expected to vary across implementations. + A combination that is compatible for one implementation may not + be compatible for another. \n For example, an implementation that + cannot serve both TCP and UDP listeners on the same address, or + cannot mix HTTPS and generic TLS listens on the same port would + not consider those cases compatible, even though they are distinct. + \n Note that requests SHOULD match at most one Listener. For example, + if Listeners are defined for \"foo.example.com\" and \"*.example.com\", + a request to \"foo.example.com\" SHOULD only be routed using routes + attached to the \"foo.example.com\" Listener (and not the \"*.example.com\" + Listener). This concept is known as \"Listener Isolation\". Implementations + that do not support Listener Isolation MUST clearly document this. + \n Implementations MAY merge separate Gateways onto a single set + of Addresses if all Listeners across all Gateways are compatible. + \n Support: Core" items: description: Listener embodies the concept of a logical endpoint where a Gateway accepts network connections. @@ -1654,14 +2394,14 @@ spec: minLength: 1 type: string namespace: - description: "Namespace is the namespace of the backend. - When unspecified, the local namespace is inferred. - \n Note that when a namespace different than the - local namespace is specified, a ReferenceGrant object - is required in the referent namespace to allow that - namespace's owner to accept the reference. See the - ReferenceGrant documentation for details. \n Support: - Core" + description: "Namespace is the namespace of the referenced + object. When unspecified, the local namespace is + inferred. \n Note that when a namespace different + than the local namespace is specified, a ReferenceGrant + object is required in the referent namespace to + allow that namespace's owner to accept the reference. + See the ReferenceGrant documentation for details. + \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -1763,13 +2503,15 @@ spec: description: Status defines the current state of Gateway. properties: addresses: - description: "Addresses lists the IP addresses that have actually - been bound to the Gateway. These addresses may differ from the addresses - in the Spec, e.g. if the Gateway automatically assigns an address - from a reserved pool. \n " + description: "Addresses lists the network addresses that have been + bound to the Gateway. \n This list may differ from the addresses + provided in the spec under some conditions: \n * no addresses are + specified, all addresses are dynamically assigned * a combination + of specified and dynamic addresses are assigned * a specified address + was unusable (e.g. already in use) \n " items: - description: GatewayStatusAddress describes an address that is bound - to a Gateway. + description: GatewayStatusAddress describes a network address that + is bound to a Gateway. oneOf: - properties: type: @@ -1905,8 +2647,23 @@ spec: description: ListenerStatus is the status associated with a Listener. properties: attachedRoutes: - description: AttachedRoutes represents the total number of accepted + description: "AttachedRoutes represents the total number of Routes that have been successfully attached to this Listener. + \n Successful attachment of a Route to a Listener is based + solely on the combination of the AllowedRoutes field on the + corresponding Listener and the Route's ParentRefs field. A + Route is successfully attached to a Listener when it is selected + by the Listener's AllowedRoutes field AND the Route has a + valid ParentRef selecting the whole Gateway resource or a + specific Listener as a parent resource (more detail on attachment + semantics can be found in the documentation on the various + Route kinds ParentRefs fields). Listener or Route status does + not impact successful attachment, i.e. the AttachedRoutes + field count MUST be set for Listeners with condition Accepted: + false and MUST count successfully attached Routes that may + themselves have Accepted: false conditions. \n Uses for this + field include troubleshooting Route attachment and measuring + blast radius/impact of changes to a Listener." format: int32 type: integer conditions: @@ -2059,8 +2816,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: grpcroutes.gateway.networking.k8s.io @@ -2191,30 +2948,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -2262,7 +3030,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -2270,7 +3038,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -2285,11 +3053,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -2341,16 +3109,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -2391,8 +3156,25 @@ spec: Service \n Support: Implementation-specific for any other resource \n Support for weight: Core" items: - description: GRPCBackendRef defines how a GRPCRoute forwards - a gRPC request. + description: "GRPCBackendRef defines how a GRPCRoute forwards + a gRPC request. \n Note that when a namespace different + than the local namespace is specified, a ReferenceGrant + object is required in the referent namespace to allow that + namespace's owner to accept the reference. See the ReferenceGrant + documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + " properties: filters: description: "Filters defined at this level MUST be executed @@ -3658,7 +4440,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -3666,7 +4448,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -3683,11 +4465,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -3764,8 +4546,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: httproutes.gateway.networking.k8s.io @@ -3787,10 +4569,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date - deprecated: true - deprecationWarning: The v1alpha2 version of HTTPRoute has been deprecated and - will be removed in a future release of the API. Please upgrade to v1beta1. - name: v1alpha2 + name: v1 schema: openAPIV3Schema: description: HTTPRoute provides a way to route HTTP requests. This includes @@ -3883,30 +4662,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -3954,7 +4744,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -3962,7 +4752,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -3977,11 +4767,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -4033,16 +4823,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -4088,8 +4875,25 @@ spec: for Kubernetes ServiceImport \n Support: Implementation-specific for any other resource \n Support for weight: Core" items: - description: HTTPBackendRef defines how a HTTPRoute should - forward an HTTP request. + description: "HTTPBackendRef defines how a HTTPRoute forwards + a HTTP request. \n Note that when a namespace different + than the local namespace is specified, a ReferenceGrant + object is required in the referent namespace to allow that + namespace's owner to accept the reference. See the ReferenceGrant + documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + " properties: filters: description: "Filters defined at this level should be @@ -5875,6 +6679,48 @@ spec: type: object maxItems: 8 type: array + timeouts: + description: "Timeouts defines the timeouts that can be configured + for an HTTP request. \n Support: Extended \n " + properties: + backendRequest: + description: "BackendRequest specifies a timeout for an + individual request from the gateway to a backend. This + covers the time from when the request first starts being + sent from the gateway to when the full response has been + received from the backend. \n An entire client HTTP transaction + with a gateway, covered by the Request timeout, may result + in more than one call from the gateway to the destination + backend, for example, if automatic retries are supported. + \n Because the Request timeout encompasses the BackendRequest + timeout, the value of BackendRequest must be <= the value + of Request timeout. \n Support: Extended" + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + request: + description: "Request specifies the maximum duration for + a gateway to respond to an HTTP request. If the gateway + has not been able to respond before this deadline is met, + the gateway MUST return a timeout error. \n For example, + setting the `rules.timeouts.request` field to the value + `10s` in an `HTTPRoute` will cause a timeout if a client + request is taking longer than 10 seconds to complete. + \n This timeout is intended to cover as close to the whole + request-response transaction as possible although an implementation + MAY choose to start the timeout after the entire request + stream has been received instead of immediately after + the transaction is initiated by the client. \n When this + field is unspecified, request timeout behavior is implementation-specific. + \n Support: Extended" + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + type: object + x-kubernetes-validations: + - message: backendRequest timeout cannot be longer than request + timeout + rule: '!(has(self.request) && has(self.backendRequest) && + duration(self.request) != duration(''0s'') && duration(self.backendRequest) + > duration(self.request))' type: object x-kubernetes-validations: - message: RequestRedirect filter must not be used together with @@ -6088,7 +6934,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -6096,7 +6942,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -6113,11 +6959,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -6178,7 +7024,7 @@ spec: required: - spec type: object - served: false + served: true storage: false subresources: status: {} @@ -6282,30 +7128,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -6353,7 +7210,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -6361,7 +7218,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -6376,11 +7233,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -6432,16 +7289,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -6487,8 +7341,25 @@ spec: for Kubernetes ServiceImport \n Support: Implementation-specific for any other resource \n Support for weight: Core" items: - description: HTTPBackendRef defines how a HTTPRoute should - forward an HTTP request. + description: "HTTPBackendRef defines how a HTTPRoute forwards + a HTTP request. \n Note that when a namespace different + than the local namespace is specified, a ReferenceGrant + object is required in the referent namespace to allow that + namespace's owner to accept the reference. See the ReferenceGrant + documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + " properties: filters: description: "Filters defined at this level should be @@ -8274,6 +9145,48 @@ spec: type: object maxItems: 8 type: array + timeouts: + description: "Timeouts defines the timeouts that can be configured + for an HTTP request. \n Support: Extended \n " + properties: + backendRequest: + description: "BackendRequest specifies a timeout for an + individual request from the gateway to a backend. This + covers the time from when the request first starts being + sent from the gateway to when the full response has been + received from the backend. \n An entire client HTTP transaction + with a gateway, covered by the Request timeout, may result + in more than one call from the gateway to the destination + backend, for example, if automatic retries are supported. + \n Because the Request timeout encompasses the BackendRequest + timeout, the value of BackendRequest must be <= the value + of Request timeout. \n Support: Extended" + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + request: + description: "Request specifies the maximum duration for + a gateway to respond to an HTTP request. If the gateway + has not been able to respond before this deadline is met, + the gateway MUST return a timeout error. \n For example, + setting the `rules.timeouts.request` field to the value + `10s` in an `HTTPRoute` will cause a timeout if a client + request is taking longer than 10 seconds to complete. + \n This timeout is intended to cover as close to the whole + request-response transaction as possible although an implementation + MAY choose to start the timeout after the entire request + stream has been received instead of immediately after + the transaction is initiated by the client. \n When this + field is unspecified, request timeout behavior is implementation-specific. + \n Support: Extended" + pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$ + type: string + type: object + x-kubernetes-validations: + - message: backendRequest timeout cannot be longer than request + timeout + rule: '!(has(self.request) && has(self.backendRequest) && + duration(self.request) != duration(''0s'') && duration(self.backendRequest) + > duration(self.request))' type: object x-kubernetes-validations: - message: RequestRedirect filter must not be used together with @@ -8487,7 +9400,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -8495,7 +9408,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -8512,11 +9425,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -8595,8 +9508,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: referencegrants.gateway.networking.k8s.io @@ -8884,8 +9797,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: tcproutes.gateway.networking.k8s.io @@ -8938,30 +9851,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -9009,7 +9933,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -9017,7 +9941,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -9032,11 +9956,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -9088,16 +10012,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -9132,7 +10053,24 @@ spec: namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. - See the ReferenceGrant documentation for details." + See the ReferenceGrant documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + \n Note that when the + BackendTLSPolicy object is enabled by the implementation, + there are some extra rules about validity to consider here. + See the fields where this struct is used for more information + about the exact behavior." properties: group: default: "" @@ -9392,7 +10330,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -9400,7 +10338,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -9417,11 +10355,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -9500,8 +10438,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: tlsroutes.gateway.networking.k8s.io @@ -9600,30 +10538,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -9671,7 +10620,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -9679,7 +10628,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -9694,11 +10643,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -9750,16 +10699,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -9797,7 +10743,24 @@ spec: namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. - See the ReferenceGrant documentation for details." + See the ReferenceGrant documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + \n Note that when the + BackendTLSPolicy object is enabled by the implementation, + there are some extra rules about validity to consider here. + See the fields where this struct is used for more information + about the exact behavior." properties: group: default: "" @@ -10057,7 +11020,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -10065,7 +11028,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -10082,11 +11045,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -10165,8 +11128,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2245 - gateway.networking.k8s.io/bundle-version: v0.8.1 + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2466 + gateway.networking.k8s.io/bundle-version: v1.0.0-rc1 gateway.networking.k8s.io/channel: experimental creationTimestamp: null name: udproutes.gateway.networking.k8s.io @@ -10219,30 +11182,41 @@ spec: for governing ParentRefs to Services - it is not possible to create a \"producer\" route for a Service in a different namespace from the Route. \n There are two kinds of parent resources with \"Core\" - support: \n * Gateway (Gateway conformance profile) * Service (Mesh - conformance profile, experimental, ClusterIP Services only) \n This + support: \n * Gateway (Gateway conformance profile) * Service (Mesh + conformance profile, experimental, ClusterIP Services only) This API may be extended in the future to support additional kinds of - parent resources. \n It is invalid to reference an identical parent - more than once. It is valid to reference multiple distinct sections - within the same parent resource, such as two separate Listeners - on the same Gateway or two separate ports on the same Service. \n - It is possible to separately reference multiple distinct objects - that may be collapsed by an implementation. For example, some implementations - may choose to merge compatible Gateway Listeners together. If that - is the case, the list of routes attached to those resources should - also be merged. \n Note that for ParentRefs that cross namespace - boundaries, there are specific rules. Cross-namespace references - are only valid if they are explicitly allowed by something in the - namespace they are referring to. For example, Gateway has the AllowedRoutes - field, and ReferenceGrant provides a generic way to enable other - kinds of cross-namespace reference. \n ParentRefs from a Route to - a Service in the same namespace are \"producer\" routes, which apply - default routing rules to inbound connections from any namespace - to the Service. \n ParentRefs from a Route to a Service in a different - namespace are \"consumer\" routes, and these routing rules are only - applied to outbound connections originating from the same namespace - as the Route, for which the intended destination of the connections - are a Service targeted as a ParentRef of the Route. \n " + parent resources. \n ParentRefs must be _distinct_. This means either + that: \n * They select different objects. If this is the case, + then parentRef entries are distinct. In terms of fields, this means + that the multi-part key defined by `group`, `kind`, `namespace`, + and `name` must be unique across all parentRef entries in the Route. + * They do not select different objects, but for each optional field + used, each ParentRef that selects the same object must set the same + set of optional fields to different values. If one ParentRef sets + a combination of optional fields, all must set the same combination. + \n Some examples: \n * If one ParentRef sets `sectionName`, all + ParentRefs referencing the same object must also set `sectionName`. + * If one ParentRef sets `port`, all ParentRefs referencing the same + object must also set `port`. * If one ParentRef sets `sectionName` + and `port`, all ParentRefs referencing the same object must also + set `sectionName` and `port`. \n It is possible to separately reference + multiple distinct objects that may be collapsed by an implementation. + For example, some implementations may choose to merge compatible + Gateway Listeners together. If that is the case, the list of routes + attached to those resources should also be merged. \n Note that + for ParentRefs that cross namespace boundaries, there are specific + rules. Cross-namespace references are only valid if they are explicitly + allowed by something in the namespace they are referring to. For + example, Gateway has the AllowedRoutes field, and ReferenceGrant + provides a generic way to enable other kinds of cross-namespace + reference. \n ParentRefs from a Route to a Service in the same + namespace are \"producer\" routes, which apply default routing rules + to inbound connections from any namespace to the Service. \n ParentRefs + from a Route to a Service in a different namespace are \"consumer\" + routes, and these routing rules are only applied to outbound connections + originating from the same namespace as the Route, for which the + intended destination of the connections are a Service targeted as + a ParentRef of the Route. \n " items: description: "ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually @@ -10290,7 +11264,7 @@ spec: the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference. - \n ParentRefs from a Route to a Service in the same namespace + \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to a Service in a different namespace @@ -10298,7 +11272,7 @@ spec: applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of - the Route. \n Support: Core" + the Route. \n Support: Core" maxLength: 63 minLength: 1 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ @@ -10313,11 +11287,11 @@ spec: a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener - must match both specified values. \n When the parent resource + must match both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified - values. \n Implementations MAY choose to support other parent + values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, an attachment is considered @@ -10369,16 +11343,13 @@ spec: - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind - == p2.kind && p1.name == p2.name && ( ( (!has(p1.__namespace__) + == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ - == '''') ) || ( has(p1.__namespace__) && has(p2.__namespace__) - && p1.__namespace__ == p2.__namespace__ ) ) ? ( ( ( (!has(p1.sectionName) - || p1.sectionName == '''') && (!has(p2.sectionName) || p2.sectionName - == '''') && (!has(p1.port) || p1.port == 0) && (!has(p2.port) - || p2.port == 0) ) || ( ( (has(p1.sectionName) && p1.sectionName - != '''') || (has(p1.port) && p1.port != 0) ) && ( (has(p2.sectionName) - && p2.sectionName != '''') || (has(p2.port) && p2.port != 0) ) - ) ) ): true ))' + == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && + p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) + || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName + == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) + || p2.port == 0)): true))' - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind @@ -10413,7 +11384,24 @@ spec: namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. - See the ReferenceGrant documentation for details." + See the ReferenceGrant documentation for details. \n + \n When the BackendRef points to a Kubernetes Service, implementations + SHOULD honor the appProtocol field if it is set for the + target Service Port. \n Implementations supporting appProtocol + SHOULD recognize the Kubernetes Standard Application Protocols + defined in KEP-3726. \n If a Service appProtocol isn't specified, + an implementation MAY infer the backend protocol through + its own means. Implementations MAY infer the protocol from + the Route type referring to the backend Service. \n If a + Route is not able to send traffic to the backend using the + specified protocol then the backend is considered invalid. + Implementations MUST set the \"ResolvedRefs\" condition + to \"False\" with the \"UnsupportedProtocol\" reason. \n + \n Note that when the + BackendTLSPolicy object is enabled by the implementation, + there are some extra rules about validity to consider here. + See the fields where this struct is used for more information + about the exact behavior." properties: group: default: "" @@ -10673,7 +11661,7 @@ spec: in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace - reference. \n ParentRefs from a Route to a Service in + reference. \n ParentRefs from a Route to a Service in the same namespace are \"producer\" routes, which apply default routing rules to inbound connections from any namespace to the Service. \n ParentRefs from a Route to @@ -10681,7 +11669,7 @@ spec: and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are - a Service targeted as a ParentRef of the Route. \n Support: + a Service targeted as a ParentRef of the Route. \n Support: Core" maxLength: 63 minLength: 1 @@ -10698,11 +11686,11 @@ spec: a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match - both specified values. \n When the parent resource is + both specified values. \n When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must - match both specified values. \n Implementations MAY choose + match both specified values. \n Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted. \n For the purpose of status, @@ -10773,286 +11761,3 @@ status: plural: "" conditions: null storedVersions: null ---- -# -# config/webhook/0-namespace.yaml -# -apiVersion: v1 -kind: Namespace -metadata: - name: gateway-system - labels: - pod-security.kubernetes.io/enforce: restricted - pod-security.kubernetes.io/audit: restricted - pod-security.kubernetes.io/warn: restricted ---- -# -# config/webhook/admission_webhook.yaml -# -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: gateway-api-admission -webhooks: -- name: validate.gateway.networking.k8s.io - matchPolicy: Equivalent - rules: - - operations: [ "CREATE" , "UPDATE" ] - apiGroups: [ "gateway.networking.k8s.io" ] - apiVersions: [ "v1alpha2", "v1beta1" ] - resources: [ "gateways", "gatewayclasses", "httproutes" ] - failurePolicy: Fail - sideEffects: None - admissionReviewVersions: - - v1 - clientConfig: - service: - name: gateway-api-admission-server - namespace: gateway-system - path: "/validate" ---- -apiVersion: v1 -kind: Service -metadata: - labels: - name: gateway-api-webhook-server - name: gateway-api-admission-server - namespace: gateway-system -spec: - type: ClusterIP - ports: - - name: https-webhook - port: 443 - targetPort: 8443 - selector: - name: gateway-api-admission-server ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gateway-api-admission-server - namespace: gateway-system - labels: - name: gateway-api-admission-server -spec: - replicas: 1 - selector: - matchLabels: - name: gateway-api-admission-server - template: - metadata: - name: gateway-api-admission-server - labels: - name: gateway-api-admission-server - spec: - containers: - - name: webhook - image: registry.k8s.io/gateway-api/admission-server:v0.8.1 - imagePullPolicy: IfNotPresent - args: - - -logtostderr - - --tlsCertFile=/etc/certs/cert - - --tlsKeyFile=/etc/certs/key - - -v=10 - - 2>&1 - ports: - - containerPort: 8443 - name: webhook - resources: - limits: - memory: 50Mi - cpu: 100m - requests: - memory: 50Mi - cpu: 100m - volumeMounts: - - name: webhook-certs - mountPath: /etc/certs - readOnly: true - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 65532 - runAsGroup: 65532 - capabilities: - drop: - - "ALL" - seccompProfile: - type: RuntimeDefault - volumes: - - name: webhook-certs - secret: - secretName: gateway-api-admission ---- -# -# config/webhook/certificate_config.yaml -# -apiVersion: v1 -kind: ServiceAccount -metadata: - name: gateway-api-admission - labels: - name: gateway-api-webhook - namespace: gateway-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: gateway-api-admission - labels: - name: gateway-api -rules: -- apiGroups: - - admissionregistration.k8s.io - resources: - - validatingwebhookconfigurations - verbs: - - get - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: gateway-api-admission - annotations: - labels: - name: gateway-api-webhook -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: gateway-api-admission -subjects: -- kind: ServiceAccount - name: gateway-api-admission - namespace: gateway-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: gateway-api-admission - annotations: - labels: - name: gateway-api-webhook - namespace: gateway-system -rules: -- apiGroups: - - '' - resources: - - secrets - verbs: - - get - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: gateway-api-admission - annotations: - labels: - name: gateway-api-webhook - namespace: gateway-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: gateway-api-admission -subjects: -- kind: ServiceAccount - name: gateway-api-admission - namespace: gateway-system ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: gateway-api-admission - annotations: - labels: - name: gateway-api-webhook - namespace: gateway-system -spec: - template: - metadata: - name: gateway-api-admission-create - labels: - name: gateway-api-webhook - spec: - containers: - - name: create - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 - imagePullPolicy: IfNotPresent - args: - - create - - --host=gateway-api-admission-server,gateway-api-admission-server.$(POD_NAMESPACE).svc - - --namespace=$(POD_NAMESPACE) - - --secret-name=gateway-api-admission - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 2000 - runAsGroup: 2000 - capabilities: - drop: - - "ALL" - seccompProfile: - type: RuntimeDefault - restartPolicy: OnFailure - serviceAccountName: gateway-api-admission - securityContext: - runAsNonRoot: true - runAsUser: 2000 - runAsGroup: 2000 ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: gateway-api-admission-patch - labels: - name: gateway-api-webhook - namespace: gateway-system -spec: - template: - metadata: - name: gateway-api-admission-patch - labels: - name: gateway-api-webhook - spec: - containers: - - name: patch - image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.1.1 - imagePullPolicy: IfNotPresent - args: - - patch - - --webhook-name=gateway-api-admission - - --namespace=$(POD_NAMESPACE) - - --patch-mutating=false - - --patch-validating=true - - --secret-name=gateway-api-admission - - --patch-failure-policy=Fail - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 2000 - runAsGroup: 2000 - capabilities: - drop: - - "ALL" - seccompProfile: - type: RuntimeDefault - restartPolicy: OnFailure - serviceAccountName: gateway-api-admission - securityContext: - runAsNonRoot: true - runAsUser: 2000 - runAsGroup: 2000 diff --git a/examples/kubernetes/accesslog/disable-accesslog.yaml b/examples/kubernetes/accesslog/disable-accesslog.yaml index e9deca01155..97d4b36332d 100644 --- a/examples/kubernetes/accesslog/disable-accesslog.yaml +++ b/examples/kubernetes/accesslog/disable-accesslog.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/accesslog/json-accesslog.yaml b/examples/kubernetes/accesslog/json-accesslog.yaml index 69c84d62733..bd50fb75c68 100644 --- a/examples/kubernetes/accesslog/json-accesslog.yaml +++ b/examples/kubernetes/accesslog/json-accesslog.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/accesslog/multi-sinks.yaml b/examples/kubernetes/accesslog/multi-sinks.yaml index b6d4226ec76..ae2cf3b55d5 100644 --- a/examples/kubernetes/accesslog/multi-sinks.yaml +++ b/examples/kubernetes/accesslog/multi-sinks.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/accesslog/otel-accesslog.yaml b/examples/kubernetes/accesslog/otel-accesslog.yaml index 8898d4c2802..d4a8f4948de 100644 --- a/examples/kubernetes/accesslog/otel-accesslog.yaml +++ b/examples/kubernetes/accesslog/otel-accesslog.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/accesslog/text-accesslog.yaml b/examples/kubernetes/accesslog/text-accesslog.yaml index 57df8f26ce5..d2eb0dec76e 100644 --- a/examples/kubernetes/accesslog/text-accesslog.yaml +++ b/examples/kubernetes/accesslog/text-accesslog.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/authn/jwt.yaml b/examples/kubernetes/authn/jwt.yaml index db113716a96..86e78eb1b20 100644 --- a/examples/kubernetes/authn/jwt.yaml +++ b/examples/kubernetes/authn/jwt.yaml @@ -9,7 +9,7 @@ spec: remoteJWKS: uri: https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/kubernetes/authn/jwks.json --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/examples/kubernetes/envoy-proxy-config.yaml b/examples/kubernetes/envoy-proxy-config.yaml index 1785b04e0e5..dbddea0d356 100644 --- a/examples/kubernetes/envoy-proxy-config.yaml +++ b/examples/kubernetes/envoy-proxy-config.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/grpc-routing.yaml b/examples/kubernetes/grpc-routing.yaml index 4698064f8c8..5e33a168358 100644 --- a/examples/kubernetes/grpc-routing.yaml +++ b/examples/kubernetes/grpc-routing.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: example-gateway-class @@ -7,7 +7,7 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: example-gateway diff --git a/examples/kubernetes/http-routing.yaml b/examples/kubernetes/http-routing.yaml index a4d406cdfe1..bbfc6cec8e0 100644 --- a/examples/kubernetes/http-routing.yaml +++ b/examples/kubernetes/http-routing.yaml @@ -2,7 +2,7 @@ # This includes a GatewayClass, Gateway, Services and Deployments that are used as backends # for routing traffic. kind: GatewayClass -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 metadata: name: example-gateway-class labels: @@ -10,7 +10,7 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: example-gateway @@ -70,7 +70,7 @@ spec: requests: cpu: 10m --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: example-route @@ -133,7 +133,7 @@ spec: requests: cpu: 10m --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: foo-route @@ -247,7 +247,7 @@ spec: requests: cpu: 10m --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: bar-route diff --git a/examples/kubernetes/metric/otel-sink.yaml b/examples/kubernetes/metric/otel-sink.yaml index 5e06bb7b293..e123f3d65f1 100644 --- a/examples/kubernetes/metric/otel-sink.yaml +++ b/examples/kubernetes/metric/otel-sink.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/metric/prometheus.yaml b/examples/kubernetes/metric/prometheus.yaml index d4234c81c99..15412ccc8e0 100644 --- a/examples/kubernetes/metric/prometheus.yaml +++ b/examples/kubernetes/metric/prometheus.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/examples/kubernetes/multicluster-service.yaml b/examples/kubernetes/multicluster-service.yaml index 2f20046b765..a7a1f684b84 100644 --- a/examples/kubernetes/multicluster-service.yaml +++ b/examples/kubernetes/multicluster-service.yaml @@ -10,7 +10,7 @@ spec: type: ClusterIP type: Kubernetes --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg @@ -22,7 +22,7 @@ spec: name: custom-proxy-config namespace: envoy-gateway-system --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -34,7 +34,7 @@ spec: protocol: HTTP port: 80 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend @@ -56,7 +56,7 @@ spec: type: PathPrefix value: / --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: ReferenceGrant metadata: namespace: submariner-operator diff --git a/examples/kubernetes/quickstart.yaml b/examples/kubernetes/quickstart.yaml index 032216678e5..e70a4df5996 100644 --- a/examples/kubernetes/quickstart.yaml +++ b/examples/kubernetes/quickstart.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -69,7 +69,7 @@ spec: fieldRef: fieldPath: metadata.namespace --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/examples/kubernetes/tcp-routing.yaml b/examples/kubernetes/tcp-routing.yaml index 546b500c74a..cc203bd1cf3 100644 --- a/examples/kubernetes/tcp-routing.yaml +++ b/examples/kubernetes/tcp-routing.yaml @@ -1,11 +1,11 @@ kind: GatewayClass -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: tcp-gateway diff --git a/examples/kubernetes/tls-termination.yaml b/examples/kubernetes/tls-termination.yaml index ab69765ef1f..0ffc34c4637 100644 --- a/examples/kubernetes/tls-termination.yaml +++ b/examples/kubernetes/tls-termination.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg diff --git a/examples/kubernetes/tracing/default.yaml b/examples/kubernetes/tracing/default.yaml index af2f98cfe1e..ea6caf143e8 100644 --- a/examples/kubernetes/tracing/default.yaml +++ b/examples/kubernetes/tracing/default.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg diff --git a/go.mod b/go.mod index e9e4f5113a9..d0284609a4f 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( k8s.io/kubectl v0.28.2 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 sigs.k8s.io/controller-runtime v0.16.2 - sigs.k8s.io/gateway-api v0.8.1 + sigs.k8s.io/gateway-api v1.0.0-rc1 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index 4e46575c092..fc33e499fd9 100644 --- a/go.sum +++ b/go.sum @@ -737,8 +737,8 @@ sigs.k8s.io/controller-runtime v0.6.1/go.mod h1:XRYBPdbf5XJu9kpS84VJiZ7h/u1hF3gE sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= -sigs.k8s.io/gateway-api v0.8.1 h1:Bo4NMAQFYkQZnHXOfufbYwbPW7b3Ic5NjpbeW6EJxuU= -sigs.k8s.io/gateway-api v0.8.1/go.mod h1:0PteDrsrgkRmr13nDqFWnev8tOysAVrwnvfFM55tSVg= +sigs.k8s.io/gateway-api v1.0.0-rc1 h1:v7N9fWTcQxox5aP2IrViDw6imeUHMAt2WFjI4BYo0sw= +sigs.k8s.io/gateway-api v1.0.0-rc1/go.mod h1:+QpYENjk9s31/abu2Pv5BpK2v88UQDK2aeQCwCvy6ck= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.8.1/go.mod h1:oNKTxUVPYkV9lWzY6CVMNluVq8cBsyq+UgPJdvA3uu4= diff --git a/internal/cmd/egctl/testdata/translate/in/authn-single-route-single-match-to-xds.yaml b/internal/cmd/egctl/testdata/translate/in/authn-single-route-single-match-to-xds.yaml index a2100a22ca2..ca56711986b 100644 --- a/internal/cmd/egctl/testdata/translate/in/authn-single-route-single-match-to-xds.yaml +++ b/internal/cmd/egctl/testdata/translate/in/authn-single-route-single-match-to-xds.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -81,7 +81,7 @@ spec: remoteJWKS: uri: https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/kubernetes/authn/jwks.json --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/default-resources.yaml b/internal/cmd/egctl/testdata/translate/in/default-resources.yaml index 4eb7e3711c3..1cdb52f993a 100644 --- a/internal/cmd/egctl/testdata/translate/in/default-resources.yaml +++ b/internal/cmd/egctl/testdata/translate/in/default-resources.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -91,7 +91,7 @@ spec: port: 3000 weight: 1 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/echo-gateway-api.yaml b/internal/cmd/egctl/testdata/translate/in/echo-gateway-api.yaml index 3cba5df2680..f0e412d92b0 100644 --- a/internal/cmd/egctl/testdata/translate/in/echo-gateway-api.yaml +++ b/internal/cmd/egctl/testdata/translate/in/echo-gateway-api.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -70,7 +70,7 @@ spec: fieldRef: fieldPath: metadata.namespace --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/envoy-patch-policy.yaml b/internal/cmd/egctl/testdata/translate/in/envoy-patch-policy.yaml index 17b25b2ddbc..e020bc9d429 100644 --- a/internal/cmd/egctl/testdata/translate/in/envoy-patch-policy.yaml +++ b/internal/cmd/egctl/testdata/translate/in/envoy-patch-policy.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -74,7 +74,7 @@ spec: fieldRef: fieldPath: metadata.namespace --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/from-gateway-api-to-xds.yaml b/internal/cmd/egctl/testdata/translate/in/from-gateway-api-to-xds.yaml index 348cf15c998..b13096a2e3a 100644 --- a/internal/cmd/egctl/testdata/translate/in/from-gateway-api-to-xds.yaml +++ b/internal/cmd/egctl/testdata/translate/in/from-gateway-api-to-xds.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -123,7 +123,7 @@ spec: port: 3000 weight: 1 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/invalid-envoyproxy.yaml b/internal/cmd/egctl/testdata/translate/in/invalid-envoyproxy.yaml index e180c5be225..9e31a94aa6a 100644 --- a/internal/cmd/egctl/testdata/translate/in/invalid-envoyproxy.yaml +++ b/internal/cmd/egctl/testdata/translate/in/invalid-envoyproxy.yaml @@ -18,7 +18,7 @@ spec: address: 127.0.0.1 port_value: 19000 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg @@ -30,7 +30,7 @@ spec: name: example namespace: default --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -148,7 +148,7 @@ spec: port: 3000 weight: 1 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/multiple-xds.yaml b/internal/cmd/egctl/testdata/translate/in/multiple-xds.yaml index 8a332388c9c..4f6b54faceb 100644 --- a/internal/cmd/egctl/testdata/translate/in/multiple-xds.yaml +++ b/internal/cmd/egctl/testdata/translate/in/multiple-xds.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -41,7 +41,7 @@ spec: selector: app: backend --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend @@ -63,7 +63,7 @@ spec: type: PathPrefix value: / --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg2 @@ -75,7 +75,7 @@ spec: protocol: HTTP port: 80 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/no-gateway-class-resources.yaml b/internal/cmd/egctl/testdata/translate/in/no-gateway-class-resources.yaml index 25f2e5fe292..529fae44af2 100644 --- a/internal/cmd/egctl/testdata/translate/in/no-gateway-class-resources.yaml +++ b/internal/cmd/egctl/testdata/translate/in/no-gateway-class-resources.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -9,7 +9,7 @@ spec: protocol: HTTP port: 80 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/quickstart.yaml b/internal/cmd/egctl/testdata/translate/in/quickstart.yaml index 3cba5df2680..f0e412d92b0 100644 --- a/internal/cmd/egctl/testdata/translate/in/quickstart.yaml +++ b/internal/cmd/egctl/testdata/translate/in/quickstart.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -70,7 +70,7 @@ spec: fieldRef: fieldPath: metadata.namespace --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/rate-limit-filter-single-route-single-match-to-xds.yaml b/internal/cmd/egctl/testdata/translate/in/rate-limit-filter-single-route-single-match-to-xds.yaml index 040c9c0748b..af4c794e82a 100644 --- a/internal/cmd/egctl/testdata/translate/in/rate-limit-filter-single-route-single-match-to-xds.yaml +++ b/internal/cmd/egctl/testdata/translate/in/rate-limit-filter-single-route-single-match-to-xds.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -86,7 +86,7 @@ spec: requests: 3 unit: Hour --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: http-ratelimit diff --git a/internal/cmd/egctl/testdata/translate/in/rejected-http-route.yaml b/internal/cmd/egctl/testdata/translate/in/rejected-http-route.yaml index ea4f4e98a3f..6979c77c15e 100644 --- a/internal/cmd/egctl/testdata/translate/in/rejected-http-route.yaml +++ b/internal/cmd/egctl/testdata/translate/in/rejected-http-route.yaml @@ -1,11 +1,11 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -16,7 +16,7 @@ spec: protocol: TLS port: 8443 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/testdata/translate/in/valid-envoyproxy.yaml b/internal/cmd/egctl/testdata/translate/in/valid-envoyproxy.yaml index dd8454a2e9b..bb9ca9478f9 100644 --- a/internal/cmd/egctl/testdata/translate/in/valid-envoyproxy.yaml +++ b/internal/cmd/egctl/testdata/translate/in/valid-envoyproxy.yaml @@ -11,7 +11,7 @@ spec: annotations: custom1: svc-annotation1 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg @@ -23,7 +23,7 @@ spec: name: example namespace: default --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg @@ -141,7 +141,7 @@ spec: port: 3000 weight: 1 --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend diff --git a/internal/cmd/egctl/translate.go b/internal/cmd/egctl/translate.go index d2b941444df..c46be9a8495 100644 --- a/internal/cmd/egctl/translate.go +++ b/internal/cmd/egctl/translate.go @@ -27,8 +27,8 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" + gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/api/v1alpha1/validation" @@ -262,7 +262,7 @@ func translateGatewayAPIToGatewayAPI(resources *gatewayapi.Resources) (gatewayap // Translate from Gateway API to Xds IR gTranslator := &gatewayapi.Translator{ GatewayControllerName: egv1a1.GatewayControllerName, - GatewayClassName: v1beta1.ObjectName(resources.GatewayClass.Name), + GatewayClassName: gwapiv1.ObjectName(resources.GatewayClass.Name), GlobalRateLimitEnabled: true, EndpointRoutingDisabled: true, } @@ -273,12 +273,12 @@ func translateGatewayAPIToGatewayAPI(resources *gatewayapi.Resources) (gatewayap if err := validation.ValidateEnvoyProxy(resources.EnvoyProxy); err != nil { epInvalid = true msg := fmt.Sprintf("%s: %v", status.MsgGatewayClassInvalidParams, err) - status.SetGatewayClassAccepted(resources.GatewayClass, false, string(v1beta1.GatewayClassReasonInvalidParameters), msg) + status.SetGatewayClassAccepted(resources.GatewayClass, false, string(gwapiv1.GatewayClassReasonInvalidParameters), msg) } gRes.EnvoyProxy = resources.EnvoyProxy } if !epInvalid { - status.SetGatewayClassAccepted(resources.GatewayClass, true, string(v1beta1.GatewayClassReasonAccepted), status.MsgValidGatewayClass) + status.SetGatewayClassAccepted(resources.GatewayClass, true, string(gwapiv1.GatewayClassReasonAccepted), status.MsgValidGatewayClass) } gRes.GatewayClass = resources.GatewayClass @@ -293,7 +293,7 @@ func translateGatewayAPIToXds(dnsDomain string, resourceType string, resources * // Translate from Gateway API to Xds IR gTranslator := &gatewayapi.Translator{ GatewayControllerName: egv1a1.GatewayControllerName, - GatewayClassName: v1beta1.ObjectName(resources.GatewayClass.Name), + GatewayClassName: gwapiv1.ObjectName(resources.GatewayClass.Name), GlobalRateLimitEnabled: true, EndpointRoutingDisabled: true, } @@ -498,33 +498,33 @@ func addMissingServices(requiredServices map[string]*v1.Service, obj interface{} var objNamespace string protocol := v1.Protocol(gatewayapi.TCPProtocol) - refs := []v1beta1.BackendRef{} + refs := []gwapiv1.BackendRef{} switch route := obj.(type) { - case *v1beta1.HTTPRoute: + case *gwapiv1.HTTPRoute: objNamespace = route.Namespace for _, rule := range route.Spec.Rules { for _, httpBakcendRef := range rule.BackendRefs { refs = append(refs, httpBakcendRef.BackendRef) } } - case *v1alpha2.GRPCRoute: + case *gwapiv1a2.GRPCRoute: objNamespace = route.Namespace for _, rule := range route.Spec.Rules { for _, gRPCBakcendRef := range rule.BackendRefs { refs = append(refs, gRPCBakcendRef.BackendRef) } } - case *v1alpha2.TLSRoute: + case *gwapiv1a2.TLSRoute: objNamespace = route.Namespace for _, rule := range route.Spec.Rules { refs = append(refs, rule.BackendRefs...) } - case *v1alpha2.TCPRoute: + case *gwapiv1a2.TCPRoute: objNamespace = route.Namespace for _, rule := range route.Spec.Rules { refs = append(refs, rule.BackendRefs...) } - case *v1alpha2.UDPRoute: + case *gwapiv1a2.UDPRoute: protocol = v1.Protocol(gatewayapi.UDPProtocol) objNamespace = route.Namespace for _, rule := range route.Spec.Rules { @@ -637,27 +637,27 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap resources.EnvoyProxy = envoyProxy case gatewayapi.KindGatewayClass: typedSpec := spec.Interface() - gatewayClass := &v1beta1.GatewayClass{ + gatewayClass := &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1beta1.GatewayClassSpec), + Spec: typedSpec.(gwapiv1.GatewayClassSpec), } resources.GatewayClass = gatewayClass case gatewayapi.KindGateway: typedSpec := spec.Interface() - gateway := &v1beta1.Gateway{ + gateway := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1beta1.GatewaySpec), + Spec: typedSpec.(gwapiv1.GatewaySpec), } resources.Gateways = append(resources.Gateways, gateway) case gatewayapi.KindTCPRoute: typedSpec := spec.Interface() - tcpRoute := &v1alpha2.TCPRoute{ + tcpRoute := &gwapiv1a2.TCPRoute{ TypeMeta: metav1.TypeMeta{ Kind: gatewayapi.KindTCPRoute, }, @@ -665,12 +665,12 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1alpha2.TCPRouteSpec), + Spec: typedSpec.(gwapiv1a2.TCPRouteSpec), } resources.TCPRoutes = append(resources.TCPRoutes, tcpRoute) case gatewayapi.KindUDPRoute: typedSpec := spec.Interface() - udpRoute := &v1alpha2.UDPRoute{ + udpRoute := &gwapiv1a2.UDPRoute{ TypeMeta: metav1.TypeMeta{ Kind: gatewayapi.KindUDPRoute, }, @@ -678,12 +678,12 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1alpha2.UDPRouteSpec), + Spec: typedSpec.(gwapiv1a2.UDPRouteSpec), } resources.UDPRoutes = append(resources.UDPRoutes, udpRoute) case gatewayapi.KindTLSRoute: typedSpec := spec.Interface() - tlsRoute := &v1alpha2.TLSRoute{ + tlsRoute := &gwapiv1a2.TLSRoute{ TypeMeta: metav1.TypeMeta{ Kind: gatewayapi.KindTLSRoute, }, @@ -691,12 +691,12 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1alpha2.TLSRouteSpec), + Spec: typedSpec.(gwapiv1a2.TLSRouteSpec), } resources.TLSRoutes = append(resources.TLSRoutes, tlsRoute) case gatewayapi.KindHTTPRoute: typedSpec := spec.Interface() - httpRoute := &v1beta1.HTTPRoute{ + httpRoute := &gwapiv1.HTTPRoute{ TypeMeta: metav1.TypeMeta{ Kind: gatewayapi.KindHTTPRoute, }, @@ -704,12 +704,12 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1beta1.HTTPRouteSpec), + Spec: typedSpec.(gwapiv1.HTTPRouteSpec), } resources.HTTPRoutes = append(resources.HTTPRoutes, httpRoute) case gatewayapi.KindGRPCRoute: typedSpec := spec.Interface() - grpcRoute := &v1alpha2.GRPCRoute{ + grpcRoute := &gwapiv1a2.GRPCRoute{ TypeMeta: metav1.TypeMeta{ Kind: gatewayapi.KindGRPCRoute, }, @@ -717,7 +717,7 @@ func kubernetesYAMLToResources(str string, addMissingResources bool) (*gatewayap Name: name, Namespace: namespace, }, - Spec: typedSpec.(v1alpha2.GRPCRouteSpec), + Spec: typedSpec.(gwapiv1a2.GRPCRouteSpec), } resources.GRPCRoutes = append(resources.GRPCRoutes, grpcRoute) case gatewayapi.KindNamespace: @@ -889,9 +889,9 @@ func addDefaultEnvoyProxy(resources *gatewayapi.Resources) error { }, } resources.EnvoyProxy = ep - ns := v1beta1.Namespace(namespace) - resources.GatewayClass.Spec.ParametersRef = &v1beta1.ParametersReference{ - Group: v1beta1.Group(egv1a1.GroupVersion.Group), + ns := gwapiv1.Namespace(namespace) + resources.GatewayClass.Spec.ParametersRef = &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: gatewayapi.KindEnvoyProxy, Name: defaultEnvoyProxyName, Namespace: &ns, diff --git a/internal/envoygateway/config/config.go b/internal/envoygateway/config/config.go index 5500873d803..2b7deb2411e 100644 --- a/internal/envoygateway/config/config.go +++ b/internal/envoygateway/config/config.go @@ -10,7 +10,7 @@ import ( "fmt" "net/url" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/logging" @@ -119,7 +119,7 @@ func (s *Server) Validate() error { return fmt.Errorf("certificateRef empty in extension service server TLS settings") } - if *certificateRefKind != gwapiv1b1.Kind("Secret") { + if *certificateRefKind != gwapiv1.Kind("Secret") { return fmt.Errorf("unsupported extension server TLS certificateRef %v", certificateRefKind) } } diff --git a/internal/envoygateway/config/config_test.go b/internal/envoygateway/config/config_test.go index c6bc08f8898..2aaa7cd8cc7 100644 --- a/internal/envoygateway/config/config_test.go +++ b/internal/envoygateway/config/config_test.go @@ -9,15 +9,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/logging" ) var ( - TLSSecretKind = v1beta1.Kind("Secret") - TLSUnrecognizedKind = v1beta1.Kind("Unrecognized") + TLSSecretKind = v1.Kind("Secret") + TLSUnrecognizedKind = v1.Kind("Unrecognized") ) func TestValidate(t *testing.T) { @@ -247,9 +247,9 @@ func TestValidate(t *testing.T) { Host: "foo.extension", Port: 443, TLS: &v1alpha1.ExtensionTLS{ - CertificateRef: v1beta1.SecretObjectReference{ + CertificateRef: v1.SecretObjectReference{ Kind: &TLSSecretKind, - Name: v1beta1.ObjectName("certificate"), + Name: v1.ObjectName("certificate"), }, }, }, @@ -283,9 +283,9 @@ func TestValidate(t *testing.T) { Host: "foo.extension", Port: 443, TLS: &v1alpha1.ExtensionTLS{ - CertificateRef: v1beta1.SecretObjectReference{ + CertificateRef: v1.SecretObjectReference{ Kind: &TLSSecretKind, - Name: v1beta1.ObjectName("certificate"), + Name: v1.ObjectName("certificate"), }, }, }, @@ -326,9 +326,9 @@ func TestValidate(t *testing.T) { Host: "foo.extension", Port: 8080, TLS: &v1alpha1.ExtensionTLS{ - CertificateRef: v1beta1.SecretObjectReference{ + CertificateRef: v1.SecretObjectReference{ Kind: &TLSUnrecognizedKind, - Name: v1beta1.ObjectName("certificate"), + Name: v1.ObjectName("certificate"), }, }, }, diff --git a/internal/envoygateway/config/decoder_test.go b/internal/envoygateway/config/decoder_test.go index 5ea9c7e157f..16cf2ef6b08 100644 --- a/internal/envoygateway/config/decoder_test.go +++ b/internal/envoygateway/config/decoder_test.go @@ -13,7 +13,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" ) @@ -176,7 +176,7 @@ func TestDecode(t *testing.T) { Redis: &v1alpha1.RateLimitRedisSettings{ URL: "localhost:6379", TLS: &v1alpha1.RedisTLSSettings{ - CertificateRef: &gwapiv1b1.SecretObjectReference{ + CertificateRef: &gwapiv1.SecretObjectReference{ Name: "ratelimit-cert", }, }, diff --git a/internal/envoygateway/scheme.go b/internal/envoygateway/scheme.go index 4156e18aef5..b50af115570 100644 --- a/internal/envoygateway/scheme.go +++ b/internal/envoygateway/scheme.go @@ -8,8 +8,8 @@ package envoygateway import ( "k8s.io/apimachinery/pkg/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -34,7 +34,7 @@ func init() { panic(err) } // Add Gateway API types. - if err := gwapiv1b1.AddToScheme(scheme); err != nil { + if err := gwapiv1.AddToScheme(scheme); err != nil { panic(err) } if err := gwapiv1a2.AddToScheme(scheme); err != nil { diff --git a/internal/extension/registry/extension_manager.go b/internal/extension/registry/extension_manager.go index 1cda3f919ab..d136889fa1b 100644 --- a/internal/extension/registry/extension_manager.go +++ b/internal/extension/registry/extension_manager.go @@ -18,7 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" k8scli "sigs.k8s.io/controller-runtime/pkg/client" k8sclicfg "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" @@ -76,11 +76,11 @@ func NewManager(cfg *config.Server) (extTypes.Manager, error) { // HasExtension checks to see whether a given Group and Kind has an // associated extension registered for it. -func (m *Manager) HasExtension(g v1beta1.Group, k v1beta1.Kind) bool { +func (m *Manager) HasExtension(g v1.Group, k v1.Kind) bool { extension := m.extension // TODO: not currently checking the version since extensionRef only supports group and kind. for _, gvk := range extension.Resources { - if g == v1beta1.Group(gvk.Group) && k == v1beta1.Kind(gvk.Kind) { + if g == v1.Group(gvk.Group) && k == v1.Kind(gvk.Kind) { return true } } diff --git a/internal/extension/testutils/manager.go b/internal/extension/testutils/manager.go index dd5375a1c06..9de5e6b7823 100644 --- a/internal/extension/testutils/manager.go +++ b/internal/extension/testutils/manager.go @@ -6,7 +6,7 @@ package testutils import ( - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" extType "github.com/envoyproxy/gateway/internal/extension/types" @@ -24,11 +24,11 @@ func NewManager(ext v1alpha1.ExtensionManager) extType.Manager { } } -func (m *Manager) HasExtension(g v1beta1.Group, k v1beta1.Kind) bool { +func (m *Manager) HasExtension(g v1.Group, k v1.Kind) bool { extension := m.extension // TODO: not currently checking the version since extensionRef only supports group and kind. for _, gvk := range extension.Resources { - if g == v1beta1.Group(gvk.Group) && k == v1beta1.Kind(gvk.Kind) { + if g == v1.Group(gvk.Group) && k == v1.Kind(gvk.Kind) { return true } } diff --git a/internal/extension/types/manager.go b/internal/extension/types/manager.go index 062c8bb89ef..1cd45905f3f 100644 --- a/internal/extension/types/manager.go +++ b/internal/extension/types/manager.go @@ -6,7 +6,7 @@ package types import ( - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/api/v1alpha1" ) @@ -19,7 +19,7 @@ type Manager interface { // // If a Group and Kind is registered with an extension, then it should // return true, otherwise return false. - HasExtension(g v1beta1.Group, k v1beta1.Kind) bool + HasExtension(g v1.Group, k v1.Kind) bool // GetPreXDSHookClient checks if the registered extension makes use of a particular hook type that modifies inputs // that are used to generate an xDS resource. diff --git a/internal/gatewayapi/address.go b/internal/gatewayapi/address.go index b8d7d507563..40a705cb528 100644 --- a/internal/gatewayapi/address.go +++ b/internal/gatewayapi/address.go @@ -6,7 +6,7 @@ package gatewayapi import ( - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" ) var _ AddressesTranslator = (*Translator)(nil) @@ -23,7 +23,7 @@ func (t *Translator) ProcessAddresses(gateways []*GatewayContext, xdsIR XdsIRMap var ipAddr []string for _, addr := range gateway.Spec.Addresses { - if *addr.Type == v1beta1.IPAddressType { + if *addr.Type == v1.IPAddressType { ipAddr = append(ipAddr, addr.Value) } } diff --git a/internal/gatewayapi/clienttrafficpolicy.go b/internal/gatewayapi/clienttrafficpolicy.go index 78af1beb09d..ba18d5b59b4 100644 --- a/internal/gatewayapi/clienttrafficpolicy.go +++ b/internal/gatewayapi/clienttrafficpolicy.go @@ -14,7 +14,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" gwv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwv1b1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" diff --git a/internal/gatewayapi/contexts.go b/internal/gatewayapi/contexts.go index 03823dc6642..83eb153a94d 100644 --- a/internal/gatewayapi/contexts.go +++ b/internal/gatewayapi/contexts.go @@ -13,14 +13,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" ) // GatewayContext wraps a Gateway and provides helper methods for // setting conditions, accessing Listeners, etc. type GatewayContext struct { - *v1beta1.Gateway + *gwapiv1.Gateway listeners []*ListenerContext } @@ -29,11 +29,11 @@ type GatewayContext struct { // ListenerContexts from the Gateway spec. func (g *GatewayContext) ResetListeners() { numListeners := len(g.Spec.Listeners) - g.Status.Listeners = make([]v1beta1.ListenerStatus, numListeners) + g.Status.Listeners = make([]gwapiv1.ListenerStatus, numListeners) g.listeners = make([]*ListenerContext, numListeners) for i := range g.Spec.Listeners { listener := &g.Spec.Listeners[i] - g.Status.Listeners[i] = v1beta1.ListenerStatus{Name: listener.Name} + g.Status.Listeners[i] = gwapiv1.ListenerStatus{Name: listener.Name} g.listeners[i] = &ListenerContext{ Listener: listener, gateway: g.Gateway, @@ -46,15 +46,15 @@ func (g *GatewayContext) ResetListeners() { // setting conditions and other status information on the associated // Gateway, etc. type ListenerContext struct { - *v1beta1.Listener + *gwapiv1.Listener - gateway *v1beta1.Gateway + gateway *gwapiv1.Gateway listenerStatusIdx int namespaceSelector labels.Selector tlsSecrets []*v1.Secret } -func (l *ListenerContext) SetCondition(conditionType v1beta1.ListenerConditionType, status metav1.ConditionStatus, reason v1beta1.ListenerConditionReason, message string) { +func (l *ListenerContext) SetCondition(conditionType gwapiv1.ListenerConditionType, status metav1.ConditionStatus, reason gwapiv1.ListenerConditionReason, message string) { cond := metav1.Condition{ Type: string(conditionType), Status: status, @@ -86,7 +86,7 @@ func (l *ListenerContext) SetCondition(conditionType v1beta1.ListenerConditionTy } } -func (l *ListenerContext) SetSupportedKinds(kinds ...v1beta1.RouteGroupKind) { +func (l *ListenerContext) SetSupportedKinds(kinds ...gwapiv1.RouteGroupKind) { l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds = kinds } @@ -98,7 +98,7 @@ func (l *ListenerContext) AttachedRoutes() int32 { return l.gateway.Status.Listeners[l.listenerStatusIdx].AttachedRoutes } -func (l *ListenerContext) AllowsKind(kind v1beta1.RouteGroupKind) bool { +func (l *ListenerContext) AllowsKind(kind gwapiv1.RouteGroupKind) bool { for _, allowed := range l.gateway.Status.Listeners[l.listenerStatusIdx].SupportedKinds { if GroupDerefOr(allowed.Group, "") == GroupDerefOr(kind.Group, "") && allowed.Kind == kind.Kind { @@ -119,9 +119,9 @@ func (l *ListenerContext) AllowsNamespace(namespace *v1.Namespace) bool { } switch *l.AllowedRoutes.Namespaces.From { - case v1beta1.NamespacesFromAll: + case gwapiv1.NamespacesFromAll: return true - case v1beta1.NamespacesFromSelector: + case gwapiv1.NamespacesFromSelector: if l.namespaceSelector == nil { return false } @@ -134,7 +134,7 @@ func (l *ListenerContext) AllowsNamespace(namespace *v1.Namespace) bool { func (l *ListenerContext) IsReady() bool { for _, cond := range l.gateway.Status.Listeners[l.listenerStatusIdx].Conditions { - if cond.Type == string(v1beta1.ListenerConditionProgrammed) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.ListenerConditionProgrammed) && cond.Status == metav1.ConditionTrue { return true } } @@ -162,9 +162,9 @@ type HTTPRouteContext struct { // GatewayControllerName is the name of the Gateway API controller. GatewayControllerName string - *v1beta1.HTTPRoute + *gwapiv1.HTTPRoute - ParentRefs map[v1beta1.ParentReference]*RouteParentContext + ParentRefs map[gwapiv1.ParentReference]*RouteParentContext } // GRPCRouteContext wraps a GRPCRoute and provides helper methods for @@ -175,7 +175,7 @@ type GRPCRouteContext struct { *v1alpha2.GRPCRoute - ParentRefs map[v1beta1.ParentReference]*RouteParentContext + ParentRefs map[gwapiv1.ParentReference]*RouteParentContext } // TLSRouteContext wraps a TLSRoute and provides helper methods for @@ -186,7 +186,7 @@ type TLSRouteContext struct { *v1alpha2.TLSRoute - ParentRefs map[v1beta1.ParentReference]*RouteParentContext + ParentRefs map[gwapiv1.ParentReference]*RouteParentContext } // UDPRouteContext wraps a UDPRoute and provides helper methods for @@ -197,7 +197,7 @@ type UDPRouteContext struct { *v1alpha2.UDPRoute - ParentRefs map[v1beta1.ParentReference]*RouteParentContext + ParentRefs map[gwapiv1.ParentReference]*RouteParentContext } // TCPRouteContext wraps a TCPRoute and provides helper methods for @@ -208,18 +208,18 @@ type TCPRouteContext struct { *v1alpha2.TCPRoute - ParentRefs map[v1beta1.ParentReference]*RouteParentContext + ParentRefs map[gwapiv1.ParentReference]*RouteParentContext } // GetRouteType returns the Kind of the Route object, HTTPRoute, // TLSRoute, TCPRoute, UDPRoute etc. -func GetRouteType(route RouteContext) v1beta1.Kind { +func GetRouteType(route RouteContext) gwapiv1.Kind { rv := reflect.ValueOf(route).Elem() - return v1beta1.Kind(rv.FieldByName("Kind").String()) + return gwapiv1.Kind(rv.FieldByName("Kind").String()) } -// TODO: [v1alpha2-v1beta1] This should not be required once all Route -// objects being implemented are of type v1beta1. +// TODO: [v1alpha2-gwapiv1] This should not be required once all Route +// objects being implemented are of type gwapiv1. // GetHostnames returns the hosts targeted by the Route object. func GetHostnames(route RouteContext) []string { rv := reflect.ValueOf(route).Elem() @@ -236,39 +236,39 @@ func GetHostnames(route RouteContext) []string { return hostnames } -// TODO: [v1alpha2-v1beta1] This should not be required once all Route -// objects being implemented are of type v1beta1. +// TODO: [v1alpha2-gwapiv1] This should not be required once all Route +// objects being implemented are of type gwapiv1. // GetParentReferences returns the ParentReference of the Route object. -func GetParentReferences(route RouteContext) []v1beta1.ParentReference { +func GetParentReferences(route RouteContext) []gwapiv1.ParentReference { rv := reflect.ValueOf(route).Elem() kind := rv.FieldByName("Kind").String() pr := rv.FieldByName("Spec").FieldByName("ParentRefs") if kind == KindHTTPRoute || kind == KindGRPCRoute { - return pr.Interface().([]v1beta1.ParentReference) + return pr.Interface().([]gwapiv1.ParentReference) } - parentReferences := make([]v1beta1.ParentReference, pr.Len()) + parentReferences := make([]gwapiv1.ParentReference, pr.Len()) for i := 0; i < len(parentReferences); i++ { - p := pr.Index(i).Interface().(v1beta1.ParentReference) + p := pr.Index(i).Interface().(gwapiv1.ParentReference) parentReferences[i] = UpgradeParentReference(p) } return parentReferences } // GetRouteStatus returns the RouteStatus object associated with the Route. -func GetRouteStatus(route RouteContext) *v1beta1.RouteStatus { +func GetRouteStatus(route RouteContext) *gwapiv1.RouteStatus { rv := reflect.ValueOf(route).Elem() - rs := rv.FieldByName("Status").FieldByName("RouteStatus").Interface().(v1beta1.RouteStatus) + rs := rv.FieldByName("Status").FieldByName("RouteStatus").Interface().(gwapiv1.RouteStatus) return &rs } // GetRouteParentContext returns RouteParentContext by using the Route // objects' ParentReference. -func GetRouteParentContext(route RouteContext, forParentRef v1beta1.ParentReference) *RouteParentContext { +func GetRouteParentContext(route RouteContext, forParentRef gwapiv1.ParentReference) *RouteParentContext { rv := reflect.ValueOf(route).Elem() pr := rv.FieldByName("ParentRefs") if pr.IsNil() { - mm := reflect.MakeMap(reflect.TypeOf(map[v1beta1.ParentReference]*RouteParentContext{})) + mm := reflect.MakeMap(reflect.TypeOf(map[gwapiv1.ParentReference]*RouteParentContext{})) pr.Set(mm) } @@ -282,10 +282,10 @@ func GetRouteParentContext(route RouteContext, forParentRef v1beta1.ParentRefere isHTTPRoute = true } - var parentRef *v1beta1.ParentReference + var parentRef *gwapiv1.ParentReference specParentRefs := rv.FieldByName("Spec").FieldByName("ParentRefs") for i := 0; i < specParentRefs.Len(); i++ { - p := specParentRefs.Index(i).Interface().(v1beta1.ParentReference) + p := specParentRefs.Index(i).Interface().(gwapiv1.ParentReference) up := p if !isHTTPRoute { up = UpgradeParentReference(p) @@ -307,10 +307,10 @@ func GetRouteParentContext(route RouteContext, forParentRef v1beta1.ParentRefere routeParentStatusIdx := -1 statusParents := rv.FieldByName("Status").FieldByName("Parents") for i := 0; i < statusParents.Len(); i++ { - p := statusParents.Index(i).FieldByName("ParentRef").Interface().(v1beta1.ParentReference) + p := statusParents.Index(i).FieldByName("ParentRef").Interface().(gwapiv1.ParentReference) if !isHTTPRoute { p = UpgradeParentReference(p) - defaultNamespace := v1beta1.Namespace(metav1.NamespaceDefault) + defaultNamespace := gwapiv1.Namespace(metav1.NamespaceDefault) if forParentRef.Namespace == nil { forParentRef.Namespace = &defaultNamespace } @@ -350,11 +350,11 @@ func GetRouteParentContext(route RouteContext, forParentRef v1beta1.ParentRefere // setting conditions and other status information on the associated // HTTPRoute, TLSRoute etc. type RouteParentContext struct { - *v1beta1.ParentReference + *gwapiv1.ParentReference - // TODO: [v1alpha2-v1beta1] This can probably be replaced with - // a single field pointing to *v1beta1.RouteStatus. - HTTPRoute *v1beta1.HTTPRoute + // TODO: [v1alpha2-gwapiv1] This can probably be replaced with + // a single field pointing to *gwapiv1.RouteStatus. + HTTPRoute *gwapiv1.HTTPRoute GRPCRoute *v1alpha2.GRPCRoute TLSRoute *v1alpha2.TLSRoute TCPRoute *v1alpha2.TCPRoute @@ -368,7 +368,7 @@ func (r *RouteParentContext) SetListeners(listeners ...*ListenerContext) { r.listeners = append(r.listeners, listeners...) } -func (r *RouteParentContext) SetCondition(route RouteContext, conditionType v1beta1.RouteConditionType, status metav1.ConditionStatus, reason v1beta1.RouteConditionReason, message string) { +func (r *RouteParentContext) SetCondition(route RouteContext, conditionType gwapiv1.RouteConditionType, status metav1.ConditionStatus, reason gwapiv1.RouteConditionReason, message string) { cond := metav1.Condition{ Type: string(conditionType), Status: status, @@ -406,7 +406,7 @@ func (r *RouteParentContext) ResetConditions(route RouteContext) { routeStatus.Parents[r.routeParentStatusIdx].Conditions = make([]metav1.Condition, 0) } -func (r *RouteParentContext) HasCondition(route RouteContext, condType v1beta1.RouteConditionType, status metav1.ConditionStatus) bool { +func (r *RouteParentContext) HasCondition(route RouteContext, condType gwapiv1.RouteConditionType, status metav1.ConditionStatus) bool { var conditions []metav1.Condition routeStatus := GetRouteStatus(route) conditions = routeStatus.Parents[r.routeParentStatusIdx].Conditions diff --git a/internal/gatewayapi/contexts_test.go b/internal/gatewayapi/contexts_test.go index 3b1867b53de..7a6b1897113 100644 --- a/internal/gatewayapi/contexts_test.go +++ b/internal/gatewayapi/contexts_test.go @@ -10,17 +10,17 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" ) func TestContexts(t *testing.T) { - gateway := &v1beta1.Gateway{ + gateway := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "envoy-gateway", Name: "gateway-1", }, - Spec: v1beta1.GatewaySpec{ - Listeners: []v1beta1.Listener{ + Spec: gwapiv1.GatewaySpec{ + Listeners: []gwapiv1.Listener{ { Name: "http", }, @@ -37,17 +37,17 @@ func TestContexts(t *testing.T) { lctx := gctx.listeners[0] require.NotNil(t, lctx) - lctx.SetCondition(v1beta1.ListenerConditionAccepted, metav1.ConditionFalse, v1beta1.ListenerReasonUnsupportedProtocol, "HTTPS protocol is not supported yet") + lctx.SetCondition(gwapiv1.ListenerConditionAccepted, metav1.ConditionFalse, gwapiv1.ListenerReasonUnsupportedProtocol, "HTTPS protocol is not supported yet") require.Len(t, gateway.Status.Listeners, 1) require.EqualValues(t, gateway.Status.Listeners[0].Name, "http") require.Len(t, gateway.Status.Listeners[0].Conditions, 1) - require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Type, v1beta1.ListenerConditionAccepted) + require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Type, gwapiv1.ListenerConditionAccepted) require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Status, metav1.ConditionFalse) - require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Reason, v1beta1.ListenerReasonUnsupportedProtocol) + require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Reason, gwapiv1.ListenerReasonUnsupportedProtocol) require.EqualValues(t, gateway.Status.Listeners[0].Conditions[0].Message, "HTTPS protocol is not supported yet") - lctx.SetSupportedKinds(v1beta1.RouteGroupKind{Group: GroupPtr(v1beta1.GroupName), Kind: "HTTPRoute"}) + lctx.SetSupportedKinds(gwapiv1.RouteGroupKind{Group: GroupPtr(gwapiv1.GroupName), Kind: "HTTPRoute"}) require.Len(t, gateway.Status.Listeners, 1) require.Len(t, gateway.Status.Listeners[0].SupportedKinds, 1) @@ -58,13 +58,13 @@ func TestContexts(t *testing.T) { } func TestContextsStaleListener(t *testing.T) { - gateway := &v1beta1.Gateway{ + gateway := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "envoy-gateway", Name: "gateway-1", }, - Spec: v1beta1.GatewaySpec{ - Listeners: []v1beta1.Listener{ + Spec: gwapiv1.GatewaySpec{ + Listeners: []gwapiv1.Listener{ { Name: "https", }, @@ -73,13 +73,13 @@ func TestContextsStaleListener(t *testing.T) { }, }, }, - Status: v1beta1.GatewayStatus{ - Listeners: []v1beta1.ListenerStatus{ + Status: gwapiv1.GatewayStatus{ + Listeners: []gwapiv1.ListenerStatus{ { Name: "https", Conditions: []metav1.Condition{ { - Status: metav1.ConditionStatus(v1beta1.ListenerConditionProgrammed), + Status: metav1.ConditionStatus(gwapiv1.ListenerConditionProgrammed), }, }, }, @@ -87,7 +87,7 @@ func TestContextsStaleListener(t *testing.T) { Name: "http", Conditions: []metav1.Condition{ { - Status: metav1.ConditionStatus(v1beta1.ListenerConditionProgrammed), + Status: metav1.ConditionStatus(gwapiv1.ListenerConditionProgrammed), }, }, }, @@ -98,7 +98,7 @@ func TestContextsStaleListener(t *testing.T) { gCtx := &GatewayContext{Gateway: gateway} httpsListenerCtx := &ListenerContext{ - Listener: &v1beta1.Listener{ + Listener: &gwapiv1.Listener{ Name: "https", }, gateway: gateway, @@ -106,7 +106,7 @@ func TestContextsStaleListener(t *testing.T) { } httpListenerCtx := &ListenerContext{ - Listener: &v1beta1.Listener{ + Listener: &gwapiv1.Listener{ Name: "http", }, gateway: gateway, @@ -125,7 +125,7 @@ func TestContextsStaleListener(t *testing.T) { require.Len(t, gCtx.Status.Listeners, 2) - expectedListenerStatuses := []v1beta1.ListenerStatus{ + expectedListenerStatuses := []gwapiv1.ListenerStatus{ { Name: "https", }, @@ -142,7 +142,7 @@ func TestContextsStaleListener(t *testing.T) { // Ensure the listener status has been updated and the stale listener has been // removed. - expectedListenerStatus := []v1beta1.ListenerStatus{{Name: "https"}} + expectedListenerStatus := []gwapiv1.ListenerStatus{{Name: "https"}} require.EqualValues(t, expectedListenerStatus, gCtx.Gateway.Status.Listeners) // Ensure that the listeners within GatewayContext have been properly updated. diff --git a/internal/gatewayapi/envoypatchpolicy.go b/internal/gatewayapi/envoypatchpolicy.go index f2581b37442..9ea3fa2e5ec 100644 --- a/internal/gatewayapi/envoypatchpolicy.go +++ b/internal/gatewayapi/envoypatchpolicy.go @@ -11,7 +11,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gwv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwv1b1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" diff --git a/internal/gatewayapi/filters.go b/internal/gatewayapi/filters.go index 64d9a80d0b3..a701b801080 100644 --- a/internal/gatewayapi/filters.go +++ b/internal/gatewayapi/filters.go @@ -11,8 +11,8 @@ import ( "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" @@ -25,12 +25,12 @@ type FiltersTranslator interface { var _ FiltersTranslator = (*Translator)(nil) type HTTPFiltersTranslator interface { - processURLRewriteFilter(rewrite *v1beta1.HTTPURLRewriteFilter, filterContext *HTTPFiltersContext) - processRedirectFilter(redirect *v1beta1.HTTPRequestRedirectFilter, filterContext *HTTPFiltersContext) - processRequestHeaderModifierFilter(headerModifier *v1beta1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) - processResponseHeaderModifierFilter(headerModifier *v1beta1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) - processRequestMirrorFilter(filterIdx int, mirror *v1beta1.HTTPRequestMirrorFilter, filterContext *HTTPFiltersContext, resources *Resources) - processExtensionRefHTTPFilter(extRef *v1beta1.LocalObjectReference, filterContext *HTTPFiltersContext, resources *Resources) + processURLRewriteFilter(rewrite *gwapiv1.HTTPURLRewriteFilter, filterContext *HTTPFiltersContext) + processRedirectFilter(redirect *gwapiv1.HTTPRequestRedirectFilter, filterContext *HTTPFiltersContext) + processRequestHeaderModifierFilter(headerModifier *gwapiv1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) + processResponseHeaderModifierFilter(headerModifier *gwapiv1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) + processRequestMirrorFilter(filterIdx int, mirror *gwapiv1.HTTPRequestMirrorFilter, filterContext *HTTPFiltersContext, resources *Resources) + processExtensionRefHTTPFilter(extRef *gwapiv1.LocalObjectReference, filterContext *HTTPFiltersContext, resources *Resources) processUnsupportedHTTPFilter(filterType string, filterContext *HTTPFiltersContext) } @@ -67,7 +67,7 @@ type HTTPFilterIR struct { // ProcessHTTPFilters translates gateway api http filters to IRs. func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, route RouteContext, - filters []v1beta1.HTTPRouteFilter, + filters []gwapiv1.HTTPRouteFilter, ruleIdx int, resources *Resources) *HTTPFiltersContext { httpFiltersContext := &HTTPFiltersContext{ @@ -88,17 +88,17 @@ func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, } switch filter.Type { - case v1beta1.HTTPRouteFilterURLRewrite: + case gwapiv1.HTTPRouteFilterURLRewrite: t.processURLRewriteFilter(filter.URLRewrite, httpFiltersContext) - case v1beta1.HTTPRouteFilterRequestRedirect: + case gwapiv1.HTTPRouteFilterRequestRedirect: t.processRedirectFilter(filter.RequestRedirect, httpFiltersContext) - case v1beta1.HTTPRouteFilterRequestHeaderModifier: + case gwapiv1.HTTPRouteFilterRequestHeaderModifier: t.processRequestHeaderModifierFilter(filter.RequestHeaderModifier, httpFiltersContext) - case v1beta1.HTTPRouteFilterResponseHeaderModifier: + case gwapiv1.HTTPRouteFilterResponseHeaderModifier: t.processResponseHeaderModifierFilter(filter.ResponseHeaderModifier, httpFiltersContext) - case v1beta1.HTTPRouteFilterRequestMirror: + case gwapiv1.HTTPRouteFilterRequestMirror: t.processRequestMirrorFilter(i, filter.RequestMirror, httpFiltersContext, resources) - case v1beta1.HTTPRouteFilterExtensionRef: + case gwapiv1.HTTPRouteFilterExtensionRef: t.processExtensionRefHTTPFilter(filter.ExtensionRef, httpFiltersContext, resources) default: t.processUnsupportedHTTPFilter(string(filter.Type), httpFiltersContext) @@ -148,13 +148,13 @@ func (t *Translator) ProcessGRPCFilters(parentRef *RouteParentContext, } func (t *Translator) processURLRewriteFilter( - rewrite *v1beta1.HTTPURLRewriteFilter, + rewrite *gwapiv1.HTTPURLRewriteFilter, filterContext *HTTPFiltersContext) { if filterContext.URLRewrite != nil { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "Cannot configure multiple urlRewrite filters for a single HTTPRouteRule", ) return @@ -169,9 +169,9 @@ func (t *Translator) processURLRewriteFilter( if rewrite.Hostname != nil { if err := t.validateHostname(string(*rewrite.Hostname)); err != nil { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, err.Error(), ) return @@ -182,13 +182,13 @@ func (t *Translator) processURLRewriteFilter( if rewrite.Path != nil { switch rewrite.Path.Type { - case v1beta1.FullPathHTTPPathModifier: + case gwapiv1.FullPathHTTPPathModifier: if rewrite.Path.ReplacePrefixMatch != nil { errMsg := "ReplacePrefixMatch cannot be set when rewrite path type is \"ReplaceFullPath\"" filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -196,9 +196,9 @@ func (t *Translator) processURLRewriteFilter( if rewrite.Path.ReplaceFullPath == nil { errMsg := "ReplaceFullPath must be set when rewrite path type is \"ReplaceFullPath\"" filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -208,13 +208,13 @@ func (t *Translator) processURLRewriteFilter( FullReplace: rewrite.Path.ReplaceFullPath, } } - case v1beta1.PrefixMatchHTTPPathModifier: + case gwapiv1.PrefixMatchHTTPPathModifier: if rewrite.Path.ReplaceFullPath != nil { errMsg := "ReplaceFullPath cannot be set when rewrite path type is \"ReplacePrefixMatch\"" filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -222,9 +222,9 @@ func (t *Translator) processURLRewriteFilter( if rewrite.Path.ReplacePrefixMatch == nil { errMsg := "ReplacePrefixMatch must be set when rewrite path type is \"ReplacePrefixMatch\"" filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -237,9 +237,9 @@ func (t *Translator) processURLRewriteFilter( default: errMsg := fmt.Sprintf("Rewrite path type: %s is invalid, only \"ReplaceFullPath\" and \"ReplacePrefixMatch\" are supported", rewrite.Path.Type) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -250,14 +250,14 @@ func (t *Translator) processURLRewriteFilter( } func (t *Translator) processRedirectFilter( - redirect *v1beta1.HTTPRequestRedirectFilter, + redirect *gwapiv1.HTTPRequestRedirectFilter, filterContext *HTTPFiltersContext) { // Can't have two redirects for the same route if filterContext.RedirectResponse != nil { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "Cannot configure multiple requestRedirect filters for a single HTTPRouteRule", ) return @@ -276,9 +276,9 @@ func (t *Translator) processRedirectFilter( } else { errMsg := fmt.Sprintf("Scheme: %s is unsupported, only 'https' and 'http' are supported", *redirect.Scheme) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -288,9 +288,9 @@ func (t *Translator) processRedirectFilter( if redirect.Hostname != nil { if err := t.validateHostname(string(*redirect.Hostname)); err != nil { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, err.Error(), ) } else { @@ -301,13 +301,13 @@ func (t *Translator) processRedirectFilter( if redirect.Path != nil { switch redirect.Path.Type { - case v1beta1.FullPathHTTPPathModifier: + case gwapiv1.FullPathHTTPPathModifier: if redirect.Path.ReplaceFullPath != nil { redir.Path = &ir.HTTPPathModifier{ FullReplace: redirect.Path.ReplaceFullPath, } } - case v1beta1.PrefixMatchHTTPPathModifier: + case gwapiv1.PrefixMatchHTTPPathModifier: if redirect.Path.ReplacePrefixMatch != nil { redir.Path = &ir.HTTPPathModifier{ PrefixMatchReplace: redirect.Path.ReplacePrefixMatch, @@ -316,9 +316,9 @@ func (t *Translator) processRedirectFilter( default: errMsg := fmt.Sprintf("Redirect path type: %s is invalid, only \"ReplaceFullPath\" and \"ReplacePrefixMatch\" are supported", redirect.Path.Type) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -333,9 +333,9 @@ func (t *Translator) processRedirectFilter( } else { errMsg := fmt.Sprintf("Status code %d is invalid, only 302 and 301 are supported", redirectCode) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) return @@ -351,7 +351,7 @@ func (t *Translator) processRedirectFilter( } func (t *Translator) processRequestHeaderModifierFilter( - headerModifier *v1beta1.HTTPHeaderFilter, + headerModifier *gwapiv1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) { // Make sure the header modifier config actually exists if headerModifier == nil { @@ -368,9 +368,9 @@ func (t *Translator) processRequestHeaderModifierFilter( emptyFilterConfig = false if addHeader.Name == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "RequestHeaderModifier Filter cannot add a header with an empty name", ) // try to process the rest of the headers and produce a valid config. @@ -379,9 +379,9 @@ func (t *Translator) processRequestHeaderModifierFilter( // Per Gateway API specification on HTTPHeaderName, : and / are invalid characters in header names if strings.Contains(string(addHeader.Name), "/") || strings.Contains(string(addHeader.Name), ":") { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, fmt.Sprintf("RequestHeaderModifier Filter cannot set headers with a '/' or ':' character in them. Header: %q", string(addHeader.Name)), ) continue @@ -419,9 +419,9 @@ func (t *Translator) processRequestHeaderModifierFilter( if setHeader.Name == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "RequestHeaderModifier Filter cannot set a header with an empty name", ) continue @@ -429,9 +429,9 @@ func (t *Translator) processRequestHeaderModifierFilter( // Per Gateway API specification on HTTPHeaderName, : and / are invalid characters in header names if strings.Contains(string(setHeader.Name), "/") || strings.Contains(string(setHeader.Name), ":") { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, fmt.Sprintf("RequestHeaderModifier Filter cannot set headers with a '/' or ':' character in them. Header: '%s'", string(setHeader.Name)), ) continue @@ -469,9 +469,9 @@ func (t *Translator) processRequestHeaderModifierFilter( for _, removedHeader := range headersToRemove { if removedHeader == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "RequestHeaderModifier Filter cannot remove a header with an empty name", ) continue @@ -495,16 +495,16 @@ func (t *Translator) processRequestHeaderModifierFilter( // Update the status if the filter failed to configure any valid headers to add/remove if len(filterContext.AddRequestHeaders) == 0 && len(filterContext.RemoveRequestHeaders) == 0 && !emptyFilterConfig { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "RequestHeaderModifier Filter did not provide valid configuration to add/set/remove any headers", ) } } func (t *Translator) processResponseHeaderModifierFilter( - headerModifier *v1beta1.HTTPHeaderFilter, + headerModifier *gwapiv1.HTTPHeaderFilter, filterContext *HTTPFiltersContext) { // Make sure the header modifier config actually exists if headerModifier == nil { @@ -521,9 +521,9 @@ func (t *Translator) processResponseHeaderModifierFilter( emptyFilterConfig = false if addHeader.Name == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "ResponseHeaderModifier Filter cannot add a header with an empty name", ) // try to process the rest of the headers and produce a valid config. @@ -532,9 +532,9 @@ func (t *Translator) processResponseHeaderModifierFilter( // Per Gateway API specification on HTTPHeaderName, : and / are invalid characters in header names if strings.Contains(string(addHeader.Name), "/") || strings.Contains(string(addHeader.Name), ":") { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, fmt.Sprintf("ResponseHeaderModifier Filter cannot set headers with a '/' or ':' character in them. Header: %q", string(addHeader.Name)), ) continue @@ -572,9 +572,9 @@ func (t *Translator) processResponseHeaderModifierFilter( if setHeader.Name == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "ResponseHeaderModifier Filter cannot set a header with an empty name", ) continue @@ -582,9 +582,9 @@ func (t *Translator) processResponseHeaderModifierFilter( // Per Gateway API specification on HTTPHeaderName, : and / are invalid characters in header names if strings.Contains(string(setHeader.Name), "/") || strings.Contains(string(setHeader.Name), ":") { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, fmt.Sprintf("ResponseHeaderModifier Filter cannot set headers with a '/' or ':' character in them. Header: '%s'", string(setHeader.Name)), ) continue @@ -622,9 +622,9 @@ func (t *Translator) processResponseHeaderModifierFilter( for _, removedHeader := range headersToRemove { if removedHeader == "" { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "ResponseHeaderModifier Filter cannot remove a header with an empty name", ) continue @@ -649,15 +649,15 @@ func (t *Translator) processResponseHeaderModifierFilter( // Update the status if the filter failed to configure any valid headers to add/remove if len(filterContext.AddResponseHeaders) == 0 && len(filterContext.RemoveResponseHeaders) == 0 && !emptyFilterConfig { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "ResponseHeaderModifier Filter did not provide valid configuration to add/set/remove any headers", ) } } -func (t *Translator) processExtensionRefHTTPFilter(extFilter *v1beta1.LocalObjectReference, filterContext *HTTPFiltersContext, resources *Resources) { +func (t *Translator) processExtensionRefHTTPFilter(extFilter *gwapiv1.LocalObjectReference, filterContext *HTTPFiltersContext, resources *Resources) { // Make sure the config actually exists. if extFilter == nil { return @@ -807,7 +807,7 @@ func (t *Translator) processExtensionRefHTTPFilter(extFilter *v1beta1.LocalObjec func (t *Translator) processRequestMirrorFilter( filterIdx int, - mirrorFilter *v1beta1.HTTPRequestMirrorFilter, + mirrorFilter *gwapiv1.HTTPRequestMirrorFilter, filterContext *HTTPFiltersContext, resources *Resources) { @@ -820,7 +820,7 @@ func (t *Translator) processRequestMirrorFilter( // Wrap the filter's BackendObjectReference into a BackendRef so we can use existing tooling to check it weight := int32(1) - mirrorBackendRef := v1beta1.BackendRef{ + mirrorBackendRef := gwapiv1.BackendRef{ BackendObjectReference: mirrorBackend, Weight: &weight, } @@ -844,15 +844,15 @@ func (t *Translator) processRequestMirrorFilter( func (t *Translator) processUnresolvedHTTPFilter(errMsg string, filterContext *HTTPFiltersContext) { filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonBackendNotFound, + gwapiv1.RouteReasonBackendNotFound, errMsg, ) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) filterContext.DirectResponse = &ir.DirectResponse{ @@ -864,9 +864,9 @@ func (t *Translator) processUnresolvedHTTPFilter(errMsg string, filterContext *H func (t *Translator) processUnsupportedHTTPFilter(filterType string, filterContext *HTTPFiltersContext) { errMsg := fmt.Sprintf("Unsupported filter type: %s", filterType) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) filterContext.DirectResponse = &ir.DirectResponse{ @@ -878,9 +878,9 @@ func (t *Translator) processUnsupportedHTTPFilter(filterType string, filterConte func (t *Translator) processInvalidHTTPFilter(filterType string, filterContext *HTTPFiltersContext, err error) { errMsg := fmt.Sprintf("Invalid filter %s: %v", filterType, err) filterContext.ParentRef.SetCondition(filterContext.Route, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, errMsg, ) filterContext.DirectResponse = &ir.DirectResponse{ diff --git a/internal/gatewayapi/helpers.go b/internal/gatewayapi/helpers.go index d5426610905..685373cb8a7 100644 --- a/internal/gatewayapi/helpers.go +++ b/internal/gatewayapi/helpers.go @@ -13,8 +13,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" @@ -29,36 +29,36 @@ const ( ) type protocolPort struct { - protocol v1beta1.ProtocolType + protocol gwapiv1.ProtocolType port int32 } -func GroupPtr(name string) *v1beta1.Group { - group := v1beta1.Group(name) +func GroupPtr(name string) *gwapiv1.Group { + group := gwapiv1.Group(name) return &group } -func KindPtr(name string) *v1beta1.Kind { - kind := v1beta1.Kind(name) +func KindPtr(name string) *gwapiv1.Kind { + kind := gwapiv1.Kind(name) return &kind } -func NamespacePtr(name string) *v1beta1.Namespace { - namespace := v1beta1.Namespace(name) +func NamespacePtr(name string) *gwapiv1.Namespace { + namespace := gwapiv1.Namespace(name) return &namespace } -func FromNamespacesPtr(fromNamespaces v1beta1.FromNamespaces) *v1beta1.FromNamespaces { +func FromNamespacesPtr(fromNamespaces gwapiv1.FromNamespaces) *gwapiv1.FromNamespaces { return &fromNamespaces } -func SectionNamePtr(name string) *v1beta1.SectionName { - sectionName := v1beta1.SectionName(name) +func SectionNamePtr(name string) *gwapiv1.SectionName { + sectionName := gwapiv1.SectionName(name) return §ionName } -func PortNumPtr(val int32) *v1beta1.PortNumber { - portNum := v1beta1.PortNumber(val) +func PortNumPtr(val int32) *gwapiv1.PortNumber { + portNum := gwapiv1.PortNumber(val) return &portNum } @@ -67,7 +67,7 @@ func ObjectNamePtr(val string) *v1alpha2.ObjectName { return &objectName } -func PathMatchTypeDerefOr(matchType *v1beta1.PathMatchType, defaultType v1beta1.PathMatchType) v1beta1.PathMatchType { +func PathMatchTypeDerefOr(matchType *gwapiv1.PathMatchType, defaultType gwapiv1.PathMatchType) gwapiv1.PathMatchType { if matchType != nil { return *matchType } @@ -81,36 +81,36 @@ func GRPCMethodMatchTypeDerefOr(matchType *v1alpha2.GRPCMethodMatchType, default return defaultType } -func HeaderMatchTypeDerefOr(matchType *v1beta1.HeaderMatchType, defaultType v1beta1.HeaderMatchType) v1beta1.HeaderMatchType { +func HeaderMatchTypeDerefOr(matchType *gwapiv1.HeaderMatchType, defaultType gwapiv1.HeaderMatchType) gwapiv1.HeaderMatchType { if matchType != nil { return *matchType } return defaultType } -func QueryParamMatchTypeDerefOr(matchType *v1beta1.QueryParamMatchType, - defaultType v1beta1.QueryParamMatchType) v1beta1.QueryParamMatchType { +func QueryParamMatchTypeDerefOr(matchType *gwapiv1.QueryParamMatchType, + defaultType gwapiv1.QueryParamMatchType) gwapiv1.QueryParamMatchType { if matchType != nil { return *matchType } return defaultType } -func NamespaceDerefOr(namespace *v1beta1.Namespace, defaultNamespace string) string { +func NamespaceDerefOr(namespace *gwapiv1.Namespace, defaultNamespace string) string { if namespace != nil && *namespace != "" { return string(*namespace) } return defaultNamespace } -func GroupDerefOr(group *v1beta1.Group, defaultGroup string) string { +func GroupDerefOr(group *gwapiv1.Group, defaultGroup string) string { if group != nil && *group != "" { return string(*group) } return defaultGroup } -func KindDerefOr(kind *v1beta1.Kind, defaultKind string) string { +func KindDerefOr(kind *gwapiv1.Kind, defaultKind string) string { if kind != nil && *kind != "" { return string(*kind) } @@ -121,8 +121,8 @@ func KindDerefOr(kind *v1beta1.Kind, defaultKind string) string { // to a Gateway with the given namespace/name, irrespective of whether a // section/listener name has been specified (i.e. a parent ref to a listener // on the specified gateway will return "true"). -func IsRefToGateway(parentRef v1beta1.ParentReference, gateway types.NamespacedName) bool { - if parentRef.Group != nil && string(*parentRef.Group) != v1beta1.GroupName { +func IsRefToGateway(parentRef gwapiv1.ParentReference, gateway types.NamespacedName) bool { + if parentRef.Group != nil && string(*parentRef.Group) != gwapiv1.GroupName { return false } @@ -141,7 +141,7 @@ func IsRefToGateway(parentRef v1beta1.ParentReference, gateway types.NamespacedN // in the given list, and if so, a list of the Listeners within that Gateway that // are included by the parent ref (either one specific Listener, or all Listeners // in the Gateway, depending on whether section name is specified or not). -func GetReferencedListeners(parentRef v1beta1.ParentReference, gateways []*GatewayContext) (bool, []*ListenerContext) { +func GetReferencedListeners(parentRef gwapiv1.ParentReference, gateways []*GatewayContext) (bool, []*ListenerContext) { var selectsGateway bool var referencedListeners []*ListenerContext @@ -175,17 +175,17 @@ func HasReadyListener(listeners []*ListenerContext) bool { } // ValidateHTTPRouteFilter validates the provided filter within HTTPRoute. -func ValidateHTTPRouteFilter(filter *v1beta1.HTTPRouteFilter, extGKs ...schema.GroupKind) error { +func ValidateHTTPRouteFilter(filter *gwapiv1.HTTPRouteFilter, extGKs ...schema.GroupKind) error { switch { case filter == nil: return errors.New("filter is nil") - case filter.Type == v1beta1.HTTPRouteFilterRequestMirror || - filter.Type == v1beta1.HTTPRouteFilterURLRewrite || - filter.Type == v1beta1.HTTPRouteFilterRequestRedirect || - filter.Type == v1beta1.HTTPRouteFilterRequestHeaderModifier || - filter.Type == v1beta1.HTTPRouteFilterResponseHeaderModifier: + case filter.Type == gwapiv1.HTTPRouteFilterRequestMirror || + filter.Type == gwapiv1.HTTPRouteFilterURLRewrite || + filter.Type == gwapiv1.HTTPRouteFilterRequestRedirect || + filter.Type == gwapiv1.HTTPRouteFilterRequestHeaderModifier || + filter.Type == gwapiv1.HTTPRouteFilterResponseHeaderModifier: return nil - case filter.Type == v1beta1.HTTPRouteFilterExtensionRef: + case filter.Type == gwapiv1.HTTPRouteFilterExtensionRef: switch { case filter.ExtensionRef == nil: return errors.New("extensionRef field must be specified for an extended filter") @@ -197,8 +197,8 @@ func ValidateHTTPRouteFilter(filter *v1beta1.HTTPRouteFilter, extGKs ...schema.G return nil default: for _, gk := range extGKs { - if filter.ExtensionRef.Group == v1beta1.Group(gk.Group) && - filter.ExtensionRef.Kind == v1beta1.Kind(gk.Kind) { + if filter.ExtensionRef.Group == gwapiv1.Group(gk.Group) && + filter.ExtensionRef.Kind == gwapiv1.Kind(gk.Kind) { return nil } } @@ -210,16 +210,16 @@ func ValidateHTTPRouteFilter(filter *v1beta1.HTTPRouteFilter, extGKs ...schema.G } // IsAuthnHTTPFilter returns true if the provided filter is an AuthenticationFilter. -func IsAuthnHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool { - return filter.Type == v1beta1.HTTPRouteFilterExtensionRef && +func IsAuthnHTTPFilter(filter *gwapiv1.HTTPRouteFilter) bool { + return filter.Type == gwapiv1.HTTPRouteFilterExtensionRef && filter.ExtensionRef != nil && string(filter.ExtensionRef.Group) == egv1a1.GroupVersion.Group && string(filter.ExtensionRef.Kind) == egv1a1.KindAuthenticationFilter } // IsRateLimitHTTPFilter returns true if the provided filter is a RateLimitFilter. -func IsRateLimitHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool { - return filter.Type == v1beta1.HTTPRouteFilterExtensionRef && +func IsRateLimitHTTPFilter(filter *gwapiv1.HTTPRouteFilter) bool { + return filter.Type == gwapiv1.HTTPRouteFilterExtensionRef && filter.ExtensionRef != nil && string(filter.ExtensionRef.Group) == egv1a1.GroupVersion.Group && string(filter.ExtensionRef.Kind) == egv1a1.KindRateLimitFilter @@ -246,8 +246,8 @@ func ValidateGRPCRouteFilter(filter *v1alpha2.GRPCRouteFilter, extGKs ...schema. return nil default: for _, gk := range extGKs { - if filter.ExtensionRef.Group == v1beta1.Group(gk.Group) && - filter.ExtensionRef.Kind == v1beta1.Kind(gk.Kind) { + if filter.ExtensionRef.Group == gwapiv1.Group(gk.Group) && + filter.ExtensionRef.Kind == gwapiv1.Kind(gk.Kind) { return nil } } @@ -298,7 +298,7 @@ func servicePortToContainerPort(servicePort int32) int32 { // computeHosts returns a list of the intersecting hostnames between the route // and the listener. -func computeHosts(routeHostnames []string, listenerHostname *v1beta1.Hostname) []string { +func computeHosts(routeHostnames []string, listenerHostname *gwapiv1.Hostname) []string { var listenerHostnameVal string if listenerHostname != nil { listenerHostnameVal = string(*listenerHostname) @@ -374,9 +374,9 @@ func containsPort(ports []*protocolPort, port *protocolPort) bool { // layer4Protocol returns listener L4 protocol and listen protocol level func layer4Protocol(protocolPort *protocolPort) (string, string) { switch protocolPort.protocol { - case v1beta1.HTTPProtocolType, v1beta1.HTTPSProtocolType, v1beta1.TLSProtocolType: + case gwapiv1.HTTPProtocolType, gwapiv1.HTTPSProtocolType, gwapiv1.TLSProtocolType: return TCPProtocol, L7Protocol - case v1beta1.TCPProtocolType: + case gwapiv1.TCPProtocolType: return TCPProtocol, L4Protocol default: return UDPProtocol, L4Protocol @@ -444,7 +444,7 @@ func irTLSListenerConfigName(secret *v1.Secret) string { return fmt.Sprintf("%s-%s", secret.Namespace, secret.Name) } -func protocolSliceToStringSlice(protocols []v1beta1.ProtocolType) []string { +func protocolSliceToStringSlice(protocols []gwapiv1.ProtocolType) []string { var protocolStrings []string for _, protocol := range protocols { protocolStrings = append(protocolStrings, string(protocol)) diff --git a/internal/gatewayapi/helpers_test.go b/internal/gatewayapi/helpers_test.go index 99fcc7bfa77..426845870b4 100644 --- a/internal/gatewayapi/helpers_test.go +++ b/internal/gatewayapi/helpers_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/runtime/schema" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) @@ -53,7 +53,7 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "valid extension resource", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "example.io", Kind: "Foo", Name: "test", @@ -65,7 +65,7 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "unsupported extended filter", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "UnsupportedGroup", Kind: "UnsupportedKind", Name: "test", @@ -84,7 +84,7 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "invalid filter type", filter: &gwapiv1a2.GRPCRouteFilter{ Type: "Invalid", - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "example.io", Kind: "Foo", Name: "test", @@ -96,7 +96,7 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "invalid authenticationfilter group", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "UnsupportedGroup", Kind: egv1a1.KindAuthenticationFilter, Name: "test", @@ -108,8 +108,8 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "invalid authenticationfilter kind", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: "UnsupportedKind", Name: "test", }, @@ -120,8 +120,8 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "valid authenticationfilter", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: egv1a1.KindAuthenticationFilter, Name: "test", }, @@ -132,7 +132,7 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "invalid ratelimitfilter group", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "UnsupportedGroup", Kind: egv1a1.KindRateLimitFilter, Name: "test", @@ -144,8 +144,8 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "invalid ratelimitfilter kind", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: "UnsupportedKind", Name: "test", }, @@ -156,8 +156,8 @@ func TestValidateGRPCFilterRef(t *testing.T) { name: "valid ratelimitfilter", filter: &gwapiv1a2.GRPCRouteFilter{ Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: egv1a1.KindRateLimitFilter, Name: "test", }, @@ -181,42 +181,42 @@ func TestValidateGRPCFilterRef(t *testing.T) { func TestValidateHTTPFilterRef(t *testing.T) { testCases := []struct { name string - filter *gwapiv1b1.HTTPRouteFilter + filter *gwapiv1.HTTPRouteFilter expected bool }{ { name: "request mirror filter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterRequestMirror, + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterRequestMirror, }, expected: true, }, { name: "url rewrite filter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterURLRewrite, + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterURLRewrite, }, expected: true, }, { name: "request header modifier filter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterRequestHeaderModifier, + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterRequestHeaderModifier, }, expected: true, }, { name: "request redirect filter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterRequestRedirect, + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterRequestRedirect, }, expected: true, }, { name: "unsupported extended filter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "UnsupportedGroup", Kind: "UnsupportedKind", Name: "test", @@ -226,16 +226,16 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "extended filter with missing reference", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, }, expected: false, }, { name: "invalid authenticationfilter group", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "UnsupportedGroup", Kind: egv1a1.KindAuthenticationFilter, Name: "test", @@ -245,10 +245,10 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "invalid authenticationfilter kind", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: "UnsupportedKind", Name: "test", }, @@ -257,10 +257,10 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "valid authenticationfilter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: egv1a1.KindAuthenticationFilter, Name: "test", }, @@ -269,10 +269,10 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "valid rateLimitfilter", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), Kind: egv1a1.KindRateLimitFilter, Name: "test", }, @@ -281,9 +281,9 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "valid extension resource", - filter: &gwapiv1b1.HTTPRouteFilter{ - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + filter: &gwapiv1.HTTPRouteFilter{ + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "example.io", Kind: "Foo", Name: "test", @@ -293,9 +293,9 @@ func TestValidateHTTPFilterRef(t *testing.T) { }, { name: "invalid filter type", - filter: &gwapiv1b1.HTTPRouteFilter{ + filter: &gwapiv1.HTTPRouteFilter{ Type: "Invalid", - ExtensionRef: &gwapiv1b1.LocalObjectReference{ + ExtensionRef: &gwapiv1.LocalObjectReference{ Group: "example.io", Kind: "Foo", Name: "test", diff --git a/internal/gatewayapi/helpers_v1alpha2.go b/internal/gatewayapi/helpers_v1alpha2.go index 65b31ad74af..6275db8adec 100644 --- a/internal/gatewayapi/helpers_v1alpha2.go +++ b/internal/gatewayapi/helpers_v1alpha2.go @@ -13,11 +13,11 @@ package gatewayapi import ( "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" ) -// TODO: [v1alpha2-v1beta1] -// This file can be removed once TLSRoute graduates to v1beta1. +// TODO: [v1alpha2-v1] +// This file can be removed once TLSRoute graduates to v1. func GroupPtrV1Alpha2(group string) *v1alpha2.Group { gwGroup := v1alpha2.Group(group) @@ -44,17 +44,17 @@ func PortNumPtrV1Alpha2(port int) *v1alpha2.PortNumber { return &pn } -func UpgradeParentReferences(old []v1alpha2.ParentReference) []v1beta1.ParentReference { - newParentReferences := make([]v1beta1.ParentReference, len(old)) +func UpgradeParentReferences(old []v1alpha2.ParentReference) []v1.ParentReference { + newParentReferences := make([]v1.ParentReference, len(old)) for i, o := range old { newParentReferences[i] = UpgradeParentReference(o) } return newParentReferences } -// UpgradeParentReference converts v1alpha2.ParentReference to v1beta1.ParentReference -func UpgradeParentReference(old v1alpha2.ParentReference) v1beta1.ParentReference { - upgraded := v1beta1.ParentReference{} +// UpgradeParentReference converts v1alpha2.ParentReference to v1.ParentReference +func UpgradeParentReference(old v1alpha2.ParentReference) v1.ParentReference { + upgraded := v1.ParentReference{} if old.Group != nil { upgraded.Group = GroupPtr(string(*old.Group)) @@ -81,7 +81,7 @@ func UpgradeParentReference(old v1alpha2.ParentReference) v1beta1.ParentReferenc return upgraded } -func DowngradeParentReference(old v1beta1.ParentReference) v1alpha2.ParentReference { +func DowngradeParentReference(old v1.ParentReference) v1alpha2.ParentReference { downgraded := v1alpha2.ParentReference{} if old.Group != nil { @@ -109,11 +109,11 @@ func DowngradeParentReference(old v1beta1.ParentReference) v1alpha2.ParentRefere return downgraded } -func UpgradeRouteParentStatuses(routeParentStatuses []v1alpha2.RouteParentStatus) []v1beta1.RouteParentStatus { - var res []v1beta1.RouteParentStatus +func UpgradeRouteParentStatuses(routeParentStatuses []v1alpha2.RouteParentStatus) []v1.RouteParentStatus { + var res []v1.RouteParentStatus for _, rps := range routeParentStatuses { - res = append(res, v1beta1.RouteParentStatus{ + res = append(res, v1.RouteParentStatus{ ParentRef: UpgradeParentReference(rps.ParentRef), ControllerName: rps.ControllerName, Conditions: rps.Conditions, @@ -123,7 +123,7 @@ func UpgradeRouteParentStatuses(routeParentStatuses []v1alpha2.RouteParentStatus return res } -func DowngradeRouteParentStatuses(routeParentStatuses []v1beta1.RouteParentStatus) []v1alpha2.RouteParentStatus { +func DowngradeRouteParentStatuses(routeParentStatuses []v1.RouteParentStatus) []v1alpha2.RouteParentStatus { var res []v1alpha2.RouteParentStatus for _, rps := range routeParentStatuses { @@ -137,9 +137,9 @@ func DowngradeRouteParentStatuses(routeParentStatuses []v1beta1.RouteParentStatu return res } -// UpgradeBackendRef converts v1alpha2.BackendRef to v1beta1.BackendRef -func UpgradeBackendRef(old v1alpha2.BackendRef) v1beta1.BackendRef { - upgraded := v1beta1.BackendRef{} +// UpgradeBackendRef converts v1alpha2.BackendRef to v1.BackendRef +func UpgradeBackendRef(old v1alpha2.BackendRef) v1.BackendRef { + upgraded := v1.BackendRef{} if old.Group != nil { upgraded.Group = GroupPtr(string(*old.Group)) @@ -162,7 +162,7 @@ func UpgradeBackendRef(old v1alpha2.BackendRef) v1beta1.BackendRef { return upgraded } -func DowngradeBackendRef(old v1beta1.BackendRef) v1alpha2.BackendRef { +func DowngradeBackendRef(old v1.BackendRef) v1alpha2.BackendRef { downgraded := v1alpha2.BackendRef{} if old.Group != nil { diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index 366778027b0..bee77dbdd6b 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -10,7 +10,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" @@ -25,8 +25,8 @@ type ListenersTranslator interface { func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap, infraIR InfraIRMap, resources *Resources) { t.validateConflictedLayer7Listeners(gateways) - t.validateConflictedLayer4Listeners(gateways, v1beta1.TCPProtocolType, v1beta1.TLSProtocolType) - t.validateConflictedLayer4Listeners(gateways, v1beta1.UDPProtocolType) + t.validateConflictedLayer4Listeners(gateways, gwapiv1.TCPProtocolType, gwapiv1.TLSProtocolType) + t.validateConflictedLayer4Listeners(gateways, gwapiv1.UDPProtocolType) // Iterate through all listeners to validate spec // and compute status for each, and add valid ones @@ -56,12 +56,12 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap for _, listener := range gateway.listeners { // Process protocol & supported kinds switch listener.Protocol { - case v1beta1.TLSProtocolType: + case gwapiv1.TLSProtocolType: if listener.TLS != nil { switch *listener.TLS.Mode { - case v1beta1.TLSModePassthrough: + case gwapiv1.TLSModePassthrough: t.validateAllowedRoutes(listener, KindTLSRoute) - case v1beta1.TLSModeTerminate: + case gwapiv1.TLSModeTerminate: t.validateAllowedRoutes(listener, KindTCPRoute) default: t.validateAllowedRoutes(listener, KindTCPRoute, KindTLSRoute) @@ -69,19 +69,19 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap } else { t.validateAllowedRoutes(listener, KindTCPRoute, KindTLSRoute) } - case v1beta1.HTTPProtocolType, v1beta1.HTTPSProtocolType: + case gwapiv1.HTTPProtocolType, gwapiv1.HTTPSProtocolType: t.validateAllowedRoutes(listener, KindHTTPRoute, KindGRPCRoute) - case v1beta1.TCPProtocolType: + case gwapiv1.TCPProtocolType: t.validateAllowedRoutes(listener, KindTCPRoute) - case v1beta1.UDPProtocolType: + case gwapiv1.UDPProtocolType: t.validateAllowedRoutes(listener, KindUDPRoute) default: listener.SetCondition( - v1beta1.ListenerConditionAccepted, + gwapiv1.ListenerConditionAccepted, metav1.ConditionFalse, - v1beta1.ListenerReasonUnsupportedProtocol, + gwapiv1.ListenerReasonUnsupportedProtocol, fmt.Sprintf("Protocol %s is unsupported, must be %s, %s, %s or %s.", listener.Protocol, - v1beta1.HTTPProtocolType, v1beta1.HTTPSProtocolType, v1beta1.TCPProtocolType, v1beta1.UDPProtocolType), + gwapiv1.HTTPProtocolType, gwapiv1.HTTPSProtocolType, gwapiv1.TCPProtocolType, gwapiv1.UDPProtocolType), ) } @@ -104,7 +104,7 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap servicePort := &protocolPort{protocol: listener.Protocol, port: int32(listener.Port)} containerPort := servicePortToContainerPort(servicePort.port) switch listener.Protocol { - case v1beta1.HTTPProtocolType, v1beta1.HTTPSProtocolType: + case gwapiv1.HTTPProtocolType, gwapiv1.HTTPSProtocolType: irListener := &ir.HTTPListener{ Name: irHTTPListenerName(listener), Address: "0.0.0.0", @@ -116,7 +116,7 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap } else { // Hostname specifies the virtual hostname to match for protocol types that define this concept. // When unspecified, all hostnames are matched. This field is ignored for protocols that don’t require hostname based matching. - // see more https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.Listener. + // see more https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/gwapiv1.Listener. irListener.Hostnames = append(irListener.Hostnames, "*") } gwXdsIR.HTTP = append(gwXdsIR.HTTP, irListener) @@ -128,15 +128,15 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap foundPorts = append(foundPorts, servicePort) var proto ir.ProtocolType switch listener.Protocol { - case v1beta1.HTTPProtocolType: + case gwapiv1.HTTPProtocolType: proto = ir.HTTPProtocolType - case v1beta1.HTTPSProtocolType: + case gwapiv1.HTTPSProtocolType: proto = ir.HTTPSProtocolType - case v1beta1.TLSProtocolType: + case gwapiv1.TLSProtocolType: proto = ir.TLSProtocolType - case v1beta1.TCPProtocolType: + case gwapiv1.TCPProtocolType: proto = ir.TCPProtocolType - case v1beta1.UDPProtocolType: + case gwapiv1.UDPProtocolType: proto = ir.UDPProtocolType } infraPort := ir.ListenerPort{ @@ -225,7 +225,7 @@ func processAccessLog(envoyproxy *egv1a1.EnvoyProxy) *ir.AccessLog { return irAccessLog } -func processTracing(gw *v1beta1.Gateway, envoyproxy *egv1a1.EnvoyProxy) *ir.Tracing { +func processTracing(gw *gwapiv1.Gateway, envoyproxy *egv1a1.EnvoyProxy) *ir.Tracing { if envoyproxy == nil || envoyproxy.Spec.Telemetry.Tracing == nil { return nil } diff --git a/internal/gatewayapi/listener_test.go b/internal/gatewayapi/listener_test.go index 9feb1c27417..b803aaf15ab 100644 --- a/internal/gatewayapi/listener_test.go +++ b/internal/gatewayapi/listener_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egcfgv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" @@ -18,14 +18,14 @@ import ( func TestProcessTracing(t *testing.T) { cases := []struct { - gw v1beta1.Gateway + gw gwapiv1.Gateway proxy *egcfgv1a1.EnvoyProxy expected *ir.Tracing }{ {}, { - gw: v1beta1.Gateway{ + gw: gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "fake-gw", Namespace: "fake-ns", diff --git a/internal/gatewayapi/resource.go b/internal/gatewayapi/resource.go index 15a87de6bac..cf9810b2d70 100644 --- a/internal/gatewayapi/resource.go +++ b/internal/gatewayapi/resource.go @@ -9,8 +9,8 @@ import ( v1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" + gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -26,14 +26,14 @@ type InfraIRMap map[string]*ir.Infra type Resources struct { // This field is only used for marshalling/unmarshalling purposes and is not used by // the translator - GatewayClass *v1beta1.GatewayClass `json:"gatewayClass,omitempty" yaml:"gatewayClass,omitempty"` - Gateways []*v1beta1.Gateway `json:"gateways,omitempty" yaml:"gateways,omitempty"` - HTTPRoutes []*v1beta1.HTTPRoute `json:"httpRoutes,omitempty" yaml:"httpRoutes,omitempty"` - GRPCRoutes []*v1alpha2.GRPCRoute `json:"grpcRoutes,omitempty" yaml:"grpcRoutes,omitempty"` - TLSRoutes []*v1alpha2.TLSRoute `json:"tlsRoutes,omitempty" yaml:"tlsRoutes,omitempty"` - TCPRoutes []*v1alpha2.TCPRoute `json:"tcpRoutes,omitempty" yaml:"tcpRoutes,omitempty"` - UDPRoutes []*v1alpha2.UDPRoute `json:"udpRoutes,omitempty" yaml:"udpRoutes,omitempty"` - ReferenceGrants []*v1alpha2.ReferenceGrant `json:"referenceGrants,omitempty" yaml:"referenceGrants,omitempty"` + GatewayClass *gwapiv1.GatewayClass `json:"gatewayClass,omitempty" yaml:"gatewayClass,omitempty"` + Gateways []*gwapiv1.Gateway `json:"gateways,omitempty" yaml:"gateways,omitempty"` + HTTPRoutes []*gwapiv1.HTTPRoute `json:"httpRoutes,omitempty" yaml:"httpRoutes,omitempty"` + GRPCRoutes []*gwapiv1a2.GRPCRoute `json:"grpcRoutes,omitempty" yaml:"grpcRoutes,omitempty"` + TLSRoutes []*gwapiv1a2.TLSRoute `json:"tlsRoutes,omitempty" yaml:"tlsRoutes,omitempty"` + TCPRoutes []*gwapiv1a2.TCPRoute `json:"tcpRoutes,omitempty" yaml:"tcpRoutes,omitempty"` + UDPRoutes []*gwapiv1a2.UDPRoute `json:"udpRoutes,omitempty" yaml:"udpRoutes,omitempty"` + ReferenceGrants []*gwapiv1a2.ReferenceGrant `json:"referenceGrants,omitempty" yaml:"referenceGrants,omitempty"` Namespaces []*v1.Namespace `json:"namespaces,omitempty" yaml:"namespaces,omitempty"` Services []*v1.Service `json:"services,omitempty" yaml:"services,omitempty"` ServiceImports []*mcsapi.ServiceImport `json:"serviceImports,omitempty" yaml:"serviceImports,omitempty"` @@ -49,14 +49,14 @@ type Resources struct { func NewResources() *Resources { return &Resources{ - Gateways: []*v1beta1.Gateway{}, - HTTPRoutes: []*v1beta1.HTTPRoute{}, - GRPCRoutes: []*v1alpha2.GRPCRoute{}, - TLSRoutes: []*v1alpha2.TLSRoute{}, + Gateways: []*gwapiv1.Gateway{}, + HTTPRoutes: []*gwapiv1.HTTPRoute{}, + GRPCRoutes: []*gwapiv1a2.GRPCRoute{}, + TLSRoutes: []*gwapiv1a2.TLSRoute{}, Services: []*v1.Service{}, EndpointSlices: []*discoveryv1.EndpointSlice{}, Secrets: []*v1.Secret{}, - ReferenceGrants: []*v1alpha2.ReferenceGrant{}, + ReferenceGrants: []*gwapiv1a2.ReferenceGrant{}, Namespaces: []*v1.Namespace{}, RateLimitFilters: []*egv1a1.RateLimitFilter{}, AuthenticationFilters: []*egv1a1.AuthenticationFilter{}, diff --git a/internal/gatewayapi/route.go b/internal/gatewayapi/route.go index ee8f45d7037..3a019499c72 100644 --- a/internal/gatewayapi/route.go +++ b/internal/gatewayapi/route.go @@ -13,8 +13,8 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" + gwapiv1a1 "sigs.k8s.io/gateway-api/apis/v1alpha2" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" @@ -28,14 +28,14 @@ var ( ) type RoutesTranslator interface { - ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext - ProcessGRPCRoutes(grpcRoutes []*v1alpha2.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext - ProcessTLSRoutes(tlsRoutes []*v1alpha2.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext - ProcessTCPRoutes(tcpRoutes []*v1alpha2.TCPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TCPRouteContext - ProcessUDPRoutes(udpRoutes []*v1alpha2.UDPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*UDPRouteContext + ProcessHTTPRoutes(httpRoutes []*gwapiv1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext + ProcessGRPCRoutes(grpcRoutes []*gwapiv1a1.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext + ProcessTLSRoutes(tlsRoutes []*gwapiv1a1.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext + ProcessTCPRoutes(tcpRoutes []*gwapiv1a1.TCPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TCPRouteContext + ProcessUDPRoutes(udpRoutes []*gwapiv1a1.UDPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*UDPRouteContext } -func (t *Translator) ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext { +func (t *Translator) ProcessHTTPRoutes(httpRoutes []*gwapiv1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext { var relevantHTTPRoutes []*HTTPRouteContext for _, h := range httpRoutes { @@ -63,7 +63,7 @@ func (t *Translator) ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways return relevantHTTPRoutes } -func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*v1alpha2.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext { +func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*gwapiv1a1.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext { var relevantGRPCRoutes []*GRPCRouteContext for _, g := range grpcRoutes { @@ -99,26 +99,26 @@ func (t *Translator) processHTTPRouteParentRefs(httpRoute *HTTPRouteContext, res routeRoutes := t.processHTTPRouteRules(httpRoute, parentRef, resources) // If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True" - if !parentRef.HasCondition(httpRoute, v1beta1.RouteConditionResolvedRefs, metav1.ConditionFalse) { + if !parentRef.HasCondition(httpRoute, gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse) { parentRef.SetCondition(httpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.RouteReasonResolvedRefs, + gwapiv1.RouteReasonResolvedRefs, "Resolved all the Object references for the Route", ) } // Skip parent refs that did not accept the route - if parentRef.HasCondition(httpRoute, v1beta1.RouteConditionAccepted, metav1.ConditionFalse) { + if parentRef.HasCondition(httpRoute, gwapiv1.RouteConditionAccepted, metav1.ConditionFalse) { continue } var hasHostnameIntersection = t.processHTTPRouteParentRefListener(httpRoute, routeRoutes, parentRef, xdsIR) if !hasHostnameIntersection { parentRef.SetCondition(httpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonNoMatchingListenerHostname, + gwapiv1.RouteReasonNoMatchingListenerHostname, "There were no hostname intersections between the HTTPRoute and this parent ref's Listener(s).", ) } @@ -127,9 +127,9 @@ func (t *Translator) processHTTPRouteParentRefs(httpRoute *HTTPRouteContext, res if parentRef.HTTPRoute != nil && len(parentRef.HTTPRoute.Status.Parents[parentRef.routeParentStatusIdx].Conditions) == 0 { parentRef.SetCondition(httpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } @@ -190,7 +190,7 @@ func (t *Translator) processHTTPRouteRules(httpRoute *HTTPRouteContext, parentRe return routeRoutes } -func processTimeout(irRoute *ir.HTTPRoute, rule v1beta1.HTTPRouteRule) { +func processTimeout(irRoute *ir.HTTPRoute, rule gwapiv1.HTTPRouteRule) { if rule.Timeouts != nil { if rule.Timeouts.Request != nil { // TODO: handle parse errors @@ -208,7 +208,7 @@ func processTimeout(irRoute *ir.HTTPRoute, rule v1beta1.HTTPRouteRule) { } } -func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx int, httpFiltersContext *HTTPFiltersContext, rule v1beta1.HTTPRouteRule) []*ir.HTTPRoute { +func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx int, httpFiltersContext *HTTPFiltersContext, rule gwapiv1.HTTPRouteRule) []*ir.HTTPRoute { var ruleRoutes []*ir.HTTPRoute // If no matches are specified, the implementation MUST match every HTTP request. @@ -231,29 +231,29 @@ func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx i processTimeout(irRoute, rule) if match.Path != nil { - switch PathMatchTypeDerefOr(match.Path.Type, v1beta1.PathMatchPathPrefix) { - case v1beta1.PathMatchPathPrefix: + switch PathMatchTypeDerefOr(match.Path.Type, gwapiv1.PathMatchPathPrefix) { + case gwapiv1.PathMatchPathPrefix: irRoute.PathMatch = &ir.StringMatch{ Prefix: match.Path.Value, } - case v1beta1.PathMatchExact: + case gwapiv1.PathMatchExact: irRoute.PathMatch = &ir.StringMatch{ Exact: match.Path.Value, } - case v1beta1.PathMatchRegularExpression: + case gwapiv1.PathMatchRegularExpression: irRoute.PathMatch = &ir.StringMatch{ SafeRegex: match.Path.Value, } } } for _, headerMatch := range match.Headers { - switch HeaderMatchTypeDerefOr(headerMatch.Type, v1beta1.HeaderMatchExact) { - case v1beta1.HeaderMatchExact: + switch HeaderMatchTypeDerefOr(headerMatch.Type, gwapiv1.HeaderMatchExact) { + case gwapiv1.HeaderMatchExact: irRoute.HeaderMatches = append(irRoute.HeaderMatches, &ir.StringMatch{ Name: string(headerMatch.Name), Exact: ptr.To(headerMatch.Value), }) - case v1beta1.HeaderMatchRegularExpression: + case gwapiv1.HeaderMatchRegularExpression: irRoute.HeaderMatches = append(irRoute.HeaderMatches, &ir.StringMatch{ Name: string(headerMatch.Name), SafeRegex: ptr.To(headerMatch.Value), @@ -261,13 +261,13 @@ func (t *Translator) processHTTPRouteRule(httpRoute *HTTPRouteContext, ruleIdx i } } for _, queryParamMatch := range match.QueryParams { - switch QueryParamMatchTypeDerefOr(queryParamMatch.Type, v1beta1.QueryParamMatchExact) { - case v1beta1.QueryParamMatchExact: + switch QueryParamMatchTypeDerefOr(queryParamMatch.Type, gwapiv1.QueryParamMatchExact) { + case gwapiv1.QueryParamMatchExact: irRoute.QueryParamMatches = append(irRoute.QueryParamMatches, &ir.StringMatch{ Name: string(queryParamMatch.Name), Exact: ptr.To(queryParamMatch.Value), }) - case v1beta1.QueryParamMatchRegularExpression: + case gwapiv1.QueryParamMatchRegularExpression: irRoute.QueryParamMatches = append(irRoute.QueryParamMatches, &ir.StringMatch{ Name: string(queryParamMatch.Name), SafeRegex: ptr.To(queryParamMatch.Value), @@ -336,24 +336,24 @@ func (t *Translator) processGRPCRouteParentRefs(grpcRoute *GRPCRouteContext, res routeRoutes := t.processGRPCRouteRules(grpcRoute, parentRef, resources) // If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True" - if !parentRef.HasCondition(grpcRoute, v1beta1.RouteConditionResolvedRefs, metav1.ConditionFalse) { + if !parentRef.HasCondition(grpcRoute, gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse) { parentRef.SetCondition(grpcRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.RouteReasonResolvedRefs, + gwapiv1.RouteReasonResolvedRefs, "Resolved all the Object references for the Route", ) } - if parentRef.HasCondition(grpcRoute, v1beta1.RouteConditionAccepted, metav1.ConditionFalse) { + if parentRef.HasCondition(grpcRoute, gwapiv1.RouteConditionAccepted, metav1.ConditionFalse) { continue } var hasHostnameIntersection = t.processHTTPRouteParentRefListener(grpcRoute, routeRoutes, parentRef, xdsIR) if !hasHostnameIntersection { parentRef.SetCondition(grpcRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonNoMatchingListenerHostname, + gwapiv1.RouteReasonNoMatchingListenerHostname, "There were no hostname intersections between the GRPCRoute and this parent ref's Listener(s).", ) } @@ -362,9 +362,9 @@ func (t *Translator) processGRPCRouteParentRefs(grpcRoute *GRPCRouteContext, res if parentRef.GRPCRoute != nil && len(parentRef.GRPCRoute.Status.Parents[parentRef.routeParentStatusIdx].Conditions) == 0 { parentRef.SetCondition(grpcRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } @@ -425,7 +425,7 @@ func (t *Translator) processGRPCRouteRules(grpcRoute *GRPCRouteContext, parentRe return routeRoutes } -func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx int, httpFiltersContext *HTTPFiltersContext, rule v1alpha2.GRPCRouteRule) []*ir.HTTPRoute { +func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx int, httpFiltersContext *HTTPFiltersContext, rule gwapiv1a1.GRPCRouteRule) []*ir.HTTPRoute { var ruleRoutes []*ir.HTTPRoute // If no matches are specified, the implementation MUST match every gRPC request. @@ -446,13 +446,13 @@ func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx i } for _, headerMatch := range match.Headers { - switch HeaderMatchTypeDerefOr(headerMatch.Type, v1beta1.HeaderMatchExact) { - case v1beta1.HeaderMatchExact: + switch HeaderMatchTypeDerefOr(headerMatch.Type, gwapiv1.HeaderMatchExact) { + case gwapiv1.HeaderMatchExact: irRoute.HeaderMatches = append(irRoute.HeaderMatches, &ir.StringMatch{ Name: string(headerMatch.Name), Exact: ptr.To(headerMatch.Value), }) - case v1beta1.HeaderMatchRegularExpression: + case gwapiv1.HeaderMatchRegularExpression: irRoute.HeaderMatches = append(irRoute.HeaderMatches, &ir.StringMatch{ Name: string(headerMatch.Name), SafeRegex: ptr.To(headerMatch.Value), @@ -462,10 +462,10 @@ func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx i if match.Method != nil { // GRPC's path is in the form of "//" - switch GRPCMethodMatchTypeDerefOr(match.Method.Type, v1alpha2.GRPCMethodMatchExact) { - case v1alpha2.GRPCMethodMatchExact: + switch GRPCMethodMatchTypeDerefOr(match.Method.Type, gwapiv1a1.GRPCMethodMatchExact) { + case gwapiv1a1.GRPCMethodMatchExact: t.processGRPCRouteMethodExact(match.Method, irRoute) - case v1alpha2.GRPCMethodMatchRegularExpression: + case gwapiv1a1.GRPCMethodMatchRegularExpression: t.processGRPCRouteMethodRegularExpression(match.Method, irRoute) } } @@ -476,7 +476,7 @@ func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx i return ruleRoutes } -func (t *Translator) processGRPCRouteMethodExact(method *v1alpha2.GRPCMethodMatch, irRoute *ir.HTTPRoute) { +func (t *Translator) processGRPCRouteMethodExact(method *gwapiv1a1.GRPCMethodMatch, irRoute *ir.HTTPRoute) { switch { case method.Service != nil && method.Method != nil: irRoute.PathMatch = &ir.StringMatch{ @@ -495,7 +495,7 @@ func (t *Translator) processGRPCRouteMethodExact(method *v1alpha2.GRPCMethodMatc } } -func (t *Translator) processGRPCRouteMethodRegularExpression(method *v1alpha2.GRPCMethodMatch, irRoute *ir.HTTPRoute) { +func (t *Translator) processGRPCRouteMethodRegularExpression(method *gwapiv1a1.GRPCMethodMatch, irRoute *ir.HTTPRoute) { switch { case method.Service != nil && method.Method != nil: irRoute.PathMatch = &ir.StringMatch{ @@ -592,7 +592,7 @@ func (t *Translator) processHTTPRouteParentRefListener(route RouteContext, route return hasHostnameIntersection } -func (t *Translator) ProcessTLSRoutes(tlsRoutes []*v1alpha2.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext { +func (t *Translator) ProcessTLSRoutes(tlsRoutes []*gwapiv1a1.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext { var relevantTLSRoutes []*TLSRouteContext for _, tls := range tlsRoutes { @@ -646,17 +646,17 @@ func (t *Translator) processTLSRouteParentRefs(tlsRoute *TLSRouteContext, resour } // If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True" - if !parentRef.HasCondition(tlsRoute, v1beta1.RouteConditionResolvedRefs, metav1.ConditionFalse) { + if !parentRef.HasCondition(tlsRoute, gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse) { parentRef.SetCondition(tlsRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.RouteReasonResolvedRefs, + gwapiv1.RouteReasonResolvedRefs, "Resolved all the Object references for the Route", ) } // Skip parent refs that did not accept the route - if parentRef.HasCondition(tlsRoute, v1beta1.RouteConditionAccepted, metav1.ConditionFalse) { + if parentRef.HasCondition(tlsRoute, gwapiv1.RouteConditionAccepted, metav1.ConditionFalse) { continue } @@ -698,9 +698,9 @@ func (t *Translator) processTLSRouteParentRefs(tlsRoute *TLSRouteContext, resour if !hasHostnameIntersection { parentRef.SetCondition(tlsRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonNoMatchingListenerHostname, + gwapiv1.RouteReasonNoMatchingListenerHostname, "There were no hostname intersections between the HTTPRoute and this parent ref's Listener(s).", ) } @@ -709,16 +709,16 @@ func (t *Translator) processTLSRouteParentRefs(tlsRoute *TLSRouteContext, resour if parentRef.TLSRoute != nil && len(parentRef.TLSRoute.Status.Parents[parentRef.routeParentStatusIdx].Conditions) == 0 { parentRef.SetCondition(tlsRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } } } -func (t *Translator) ProcessUDPRoutes(udpRoutes []*v1alpha2.UDPRoute, gateways []*GatewayContext, resources *Resources, +func (t *Translator) ProcessUDPRoutes(udpRoutes []*gwapiv1a1.UDPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*UDPRouteContext { var relevantUDPRoutes []*UDPRouteContext @@ -757,7 +757,7 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour // compute backends if len(udpRoute.Spec.Rules) != 1 { parentRef.SetCondition(udpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "InvalidRule", "One and only one rule is supported", @@ -766,7 +766,7 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour } if len(udpRoute.Spec.Rules[0].BackendRefs) != 1 { parentRef.SetCondition(udpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "InvalidBackend", "One and only one backend is supported", @@ -783,17 +783,17 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour destSettings = append(destSettings, ds) // If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True" - if !parentRef.HasCondition(udpRoute, v1beta1.RouteConditionResolvedRefs, metav1.ConditionFalse) { + if !parentRef.HasCondition(udpRoute, gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse) { parentRef.SetCondition(udpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.RouteReasonResolvedRefs, + gwapiv1.RouteReasonResolvedRefs, "Resolved all the Object references for the Route", ) } // Skip parent refs that did not accept the route - if parentRef.HasCondition(udpRoute, v1beta1.RouteConditionAccepted, metav1.ConditionFalse) { + if parentRef.HasCondition(udpRoute, gwapiv1.RouteConditionAccepted, metav1.ConditionFalse) { continue } @@ -835,25 +835,25 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour if accepted && parentRef.UDPRoute != nil && len(parentRef.UDPRoute.Status.Parents[parentRef.routeParentStatusIdx].Conditions) == 0 { parentRef.SetCondition(udpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } if !accepted { parentRef.SetCondition(udpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "Multiple routes on the same UDP listener", ) } } } -func (t *Translator) ProcessTCPRoutes(tcpRoutes []*v1alpha2.TCPRoute, gateways []*GatewayContext, resources *Resources, +func (t *Translator) ProcessTCPRoutes(tcpRoutes []*gwapiv1a1.TCPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TCPRouteContext { var relevantTCPRoutes []*TCPRouteContext @@ -893,7 +893,7 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour // compute backends if len(tcpRoute.Spec.Rules) != 1 { parentRef.SetCondition(tcpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "InvalidRule", "One and only one rule is supported", @@ -902,7 +902,7 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour } if len(tcpRoute.Spec.Rules[0].BackendRefs) != 1 { parentRef.SetCondition(tcpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "InvalidBackend", "One and only one backend is supported", @@ -918,17 +918,17 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour } destSettings = append(destSettings, ds) // If no negative condition has been set for ResolvedRefs, set "ResolvedRefs=True" - if !parentRef.HasCondition(tcpRoute, v1beta1.RouteConditionResolvedRefs, metav1.ConditionFalse) { + if !parentRef.HasCondition(tcpRoute, gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse) { parentRef.SetCondition(tcpRoute, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.RouteReasonResolvedRefs, + gwapiv1.RouteReasonResolvedRefs, "Resolved all the Object references for the Route", ) } // Skip parent refs that did not accept the route - if parentRef.HasCondition(tcpRoute, v1beta1.RouteConditionAccepted, metav1.ConditionFalse) { + if parentRef.HasCondition(tcpRoute, gwapiv1.RouteConditionAccepted, metav1.ConditionFalse) { continue } @@ -971,17 +971,17 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour if accepted && parentRef.TCPRoute != nil && len(parentRef.TCPRoute.Status.Parents[parentRef.routeParentStatusIdx].Conditions) == 0 { parentRef.SetCondition(tcpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } if !accepted { parentRef.SetCondition(tcpRoute, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonUnsupportedValue, + gwapiv1.RouteReasonUnsupportedValue, "Multiple routes on the same TCP listener", ) } @@ -992,7 +992,7 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour // processDestination takes a backendRef and translates it into destination setting or sets error statuses and // returns the weight for the backend so that 500 error responses can be returned for invalid backends in // the same proportion as the backend would have otherwise received -func (t *Translator) processDestination(backendRef v1beta1.BackendRef, +func (t *Translator) processDestination(backendRef gwapiv1.BackendRef, parentRef *RouteParentContext, route RouteContext, resources *Resources) (ds *ir.DestinationSetting, backendWeight uint32) { @@ -1083,9 +1083,9 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont if len(selectedListeners) == 0 { parentRefCtx.SetCondition(routeContext, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonNoMatchingParent, + gwapiv1.RouteReasonNoMatchingParent, "No listeners match this parent ref", ) continue @@ -1093,7 +1093,7 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont if !HasReadyListener(selectedListeners) { parentRefCtx.SetCondition(routeContext, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, "NoReadyListeners", "There are no ready listeners for this parent ref", @@ -1104,7 +1104,7 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont var allowedListeners []*ListenerContext for _, listener := range selectedListeners { acceptedKind := GetRouteType(routeContext) - if listener.AllowsKind(v1beta1.RouteGroupKind{Group: GroupPtr(v1beta1.GroupName), Kind: acceptedKind}) && + if listener.AllowsKind(gwapiv1.RouteGroupKind{Group: GroupPtr(gwapiv1.GroupName), Kind: acceptedKind}) && listener.AllowsNamespace(resources.GetNamespace(routeContext.GetNamespace())) { allowedListeners = append(allowedListeners, listener) } @@ -1112,9 +1112,9 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont if len(allowedListeners) == 0 { parentRefCtx.SetCondition(routeContext, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionFalse, - v1beta1.RouteReasonNotAllowedByListeners, + gwapiv1.RouteReasonNotAllowedByListeners, "No listeners included by this parent ref allowed this attachment.", ) continue @@ -1123,9 +1123,9 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont parentRefCtx.SetListeners(allowedListeners...) parentRefCtx.SetCondition(routeContext, - v1beta1.RouteConditionAccepted, + gwapiv1.RouteConditionAccepted, metav1.ConditionTrue, - v1beta1.RouteReasonAccepted, + gwapiv1.RouteReasonAccepted, "Route is accepted", ) } diff --git a/internal/gatewayapi/runner/runner.go b/internal/gatewayapi/runner/runner.go index 1c2cef28551..7dd107dcb10 100644 --- a/internal/gatewayapi/runner/runner.go +++ b/internal/gatewayapi/runner/runner.go @@ -9,7 +9,7 @@ import ( "context" "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/yaml" "github.com/envoyproxy/gateway/api/v1alpha1" @@ -62,7 +62,7 @@ func (r *Runner) subscribeAndTranslate(ctx context.Context) { // Translate and publish IRs. t := &gatewayapi.Translator{ GatewayControllerName: r.Server.EnvoyGateway.Gateway.ControllerName, - GatewayClassName: v1beta1.ObjectName(update.Key), + GatewayClassName: v1.ObjectName(update.Key), GlobalRateLimitEnabled: r.EnvoyGateway.RateLimit != nil, } diff --git a/internal/gatewayapi/sort.go b/internal/gatewayapi/sort.go index 0fed937d42c..589d564cf3f 100644 --- a/internal/gatewayapi/sort.go +++ b/internal/gatewayapi/sort.go @@ -46,7 +46,7 @@ func (x XdsIRRoutes) Less(i, j int) bool { // sortXdsIR sorts the xdsIR based on the match precedence // defined in the Gateway API spec. -// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteRule +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPRouteRule func sortXdsIRMap(xdsIR XdsIRMap) { for _, irItem := range xdsIR { for _, http := range irItem.HTTP { diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.in.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.in.yaml index 53038b83d2e..f0ba0ecc141 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.in.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.in.yaml @@ -69,7 +69,7 @@ clientTrafficPolicies: namespace: envoy-gateway sectionName: https gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -83,7 +83,7 @@ gateways: allowedRoutes: namespaces: from: Same -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml index d030eb12e20..413b622c743 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml @@ -125,7 +125,7 @@ clientTrafficPolicies: status: "True" type: Accepted gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -165,7 +165,7 @@ gateways: kind: HTTPRoute - group: gateway.networking.k8s.io kind: GRPCRoute -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.in.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.in.yaml index 8f913eb26a6..d263b45df77 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.in.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.in.yaml @@ -28,7 +28,7 @@ clientTrafficPolicies: sectionName: http-1 namespace: envoy-gateway gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml index 9eb9771a824..df173dba7d5 100755 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml @@ -50,7 +50,7 @@ clientTrafficPolicies: status: "True" type: Accepted gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/disable-accesslog.in.yaml b/internal/gatewayapi/testdata/disable-accesslog.in.yaml index 7b88c7bb41b..206f0d46b2c 100644 --- a/internal/gatewayapi/testdata/disable-accesslog.in.yaml +++ b/internal/gatewayapi/testdata/disable-accesslog.in.yaml @@ -57,7 +57,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/disable-accesslog.out.yaml b/internal/gatewayapi/testdata/disable-accesslog.out.yaml index ec01a484b4d..39e8d26d571 100644 --- a/internal/gatewayapi/testdata/disable-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/disable-accesslog.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.in.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.in.yaml index e44bc28e254..ee6050b5118 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.in.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.in.yaml @@ -19,7 +19,7 @@ envoyPatchPolicies: path: "/per_connection_buffer_limit_bytes" value: "1024" gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml index 4ac0382ce13..f7293e04c96 100755 --- a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.in.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.in.yaml index 7506737e8c2..57a5d4abd14 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.in.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.in.yaml @@ -19,7 +19,7 @@ envoyPatchPolicies: path: "/per_connection_buffer_limit_bytes" value: "1024" gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml index 7b529d50c24..b5d451c716b 100755 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid.in.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid.in.yaml index 59c899834de..4cbe335873b 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid.in.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid.in.yaml @@ -40,7 +40,7 @@ envoyPatchPolicies: path: "/ignore_global_conn_limit" value: "true" gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml index 2e1b5d6bac6..5c75624e136 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.in.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.in.yaml index 9f43b9908ad..3b1940f1fbd 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.in.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.in.yaml @@ -63,7 +63,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml index 84b6557c506..d7032df5b1a 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.in.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.in.yaml index ecd81272cf9..2bf2dc6ae59 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.in.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.in.yaml @@ -66,7 +66,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml index 65b9d535310..4e3a60ba8f3 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.in.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.in.yaml index 138af04e925..4cfbeea2e6d 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.in.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.in.yaml @@ -64,7 +64,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml index dbcbe9ea13e..b4611b897da 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog.in.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog.in.yaml index 5184c3c0a78..fe311ea0a59 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog.in.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog.in.yaml @@ -71,7 +71,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml index 428d4340028..01428c425e2 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/envoyproxy-valid.in.yaml b/internal/gatewayapi/testdata/envoyproxy-valid.in.yaml index fbeb9f5264e..172af475b30 100644 --- a/internal/gatewayapi/testdata/envoyproxy-valid.in.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-valid.in.yaml @@ -54,7 +54,7 @@ envoyproxy: secret: secretName: envoy-cert gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml index 673cbe12f0b..81ecbc9998b 100644 --- a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.in.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.in.yaml index 99c9bcac4f7..ba7eec6c05d 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.in.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml index 6ecb01dfb98..2828bf08166 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.in.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.in.yaml index 41bc18284be..d4f0fc1f9e5 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.in.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml index 205db04c086..d9271e30fc9 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.in.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.in.yaml index 7fadc617592..5d73bfa1b4c 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.in.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml index a51df87b71b..5f8e8829df6 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.in.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.in.yaml index 2b236fd55da..d44fa65086b 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.in.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml index c1f3d41a8f6..d01e792dd71 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.in.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.in.yaml index e586a45b961..0dd2519dc9d 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.in.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: Same httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml index 8541964e902..25c3cce6796 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.in.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.in.yaml index 8ba0171af8b..40c54eff3c3 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.in.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: Same httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml index f29f5ba0406..0c17d8dd89f 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.in.yaml b/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.in.yaml index 1be00724e66..e4194dd153c 100644 --- a/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml b/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml index f3db4d0d9c8..160fdae760e 100644 --- a/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.in.yaml index dace4dd1e13..7c71b1eaa65 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -20,7 +20,7 @@ gateways: values: - bar httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.out.yaml index 37ed3d958cd..d360fbafe44 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-namespaces-selector.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -43,7 +43,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.in.yaml index bb2bf841df6..e31eab26962 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -17,7 +17,7 @@ gateways: - group: foo.io kind: HTTPRoute httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.out.yaml index d58e4016331..1bd59a4c7c2 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-group.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -34,7 +34,7 @@ gateways: name: http supportedKinds: [] httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.in.yaml index eaa066350a7..3c1d72a73fa 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -19,7 +19,7 @@ gateways: - group: kind: HTTPRoute httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.out.yaml index 7743c4dbdee..03568e1828b 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind-and-supported.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -36,7 +36,7 @@ gateways: supportedKinds: - kind: HTTPRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.in.yaml index 70c85d2b781..dd3061ecf2a 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -17,7 +17,7 @@ gateways: - group: gateway.networking.k8s.io kind: FooRoute httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.out.yaml index fff2f75e09f..0854ce26a7d 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-routes-kind.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -34,7 +34,7 @@ gateways: name: http supportedKinds: [] httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.in.yaml index c5762afbaff..ee989f7fa0f 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.out.yaml index 5bbb66e3139..d6a010af299 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-allowed-tls-route-kind.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.in.yaml index 6418ac1093d..c0239e032f6 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -48,7 +48,7 @@ secrets: data: tls.key: YmFyCg== httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.out.yaml index aaa21059be6..7217e4191af 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-multiple-tls-configuration.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -49,7 +49,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.in.yaml index a4793ddeff2..e0f69d01a32 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -29,7 +29,7 @@ secrets: tls.crt: Zm9vCg== tls.key: YmFyCg== httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.out.yaml index 2384e905387..7db3c46cef1 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-invalid-mode.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -42,7 +42,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.in.yaml index d60c39b55c6..54feff74698 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -26,7 +26,7 @@ secrets: tls.crt: Zm9vCg== tls.key: YmFyCg== httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.out.yaml index ca98be39b47..654ea7d841e 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-certificate-refs.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -37,7 +37,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.in.yaml index 5689e9fedea..1833950ff0c 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -29,7 +29,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNxRENDQVpBQ0NRREVNZ1lZblFyQ29EQU5CZ2txaGtpRzl3MEJBUXNGQURBV01SUXdFZ1lEVlFRRERBdG0KYjI4dVltRnlMbU52YlRBZUZ3MHlNekF4TURVeE16UXpNalJhRncweU5EQXhNRFV4TXpRek1qUmFNQll4RkRBUwpCZ05WQkFNTUMyWnZieTVpWVhJdVkyOXRNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDCkFRRUFuZEh6d21wS2NUSUViamhGZ2RXd1RSTjc1Y3A4b3VsWnhMMUdydlI2SXc3ejdqaTBSNFcvTm85bkdmOU0KWVAyQ1JqaXN6NTFtd3hTeGVCcm9jTGVBK21reGkxK2lEdk5kQytyU0x4MTN6RUxTQ25xYnVzUHM3bUdmSlpxOAo5TGhlbmx5bzQzaDVjYTZINUxqTXd1L1JHVWlGMzFYck5yaVlGQlB2RTJyQitkd24vTkVrUTRoOFJxcXlwcmtuCkYvcWM5Sk1ZQVlGRld1VkNwa0lFbmRYMUN5dlFOT2FkZmN2cmd6dDV2SmwwT2kxQWdyaU5hWGJFUEdudWY3STQKcXBCSEdVWE5lMVdsOVdlVklxS1g0T2FFWERWQzZGQzdHOHptZWVMVzFBa1lFVm5pcFg2b1NCK0JjL1NIVlZOaApzQkxSbXRuc3pmTnRUMlFyZCttcGt4ODBaUUlEQVFBQk1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1VKOElDCkJveUVqT3V3enBHYVJoR044QjRqT1B6aHVDT0V0ZDM3UzAybHUwN09IenlCdmJzVEd6S3dCZ0x5bVdmR2tINEIKajdDTHNwOEZ6TkhLWnVhQmdwblo5SjZETE9Od2ZXZTJBWXA3TGRmT0tWQlVkTVhRaU9tN2pKOUhob0Ntdk1ONwpic2pjaFdKb013ckZmK3dkQUthdHowcUFQeWhMeWUvRnFtaVZ4a09SWmF3K1Q5bURaK0g0OXVBU2d1SnVOTXlRClY2RXlYNmd0Z1dxMzc2SHZhWE1TLzNoYW1Zb1ZXWEk1TXhpUE9ZeG5BQmtKQjRTQ2dJUmVqYkpmVmFRdG9RNGEKejAyaVVMZW5ESUllUU9Zb2JLY01CWGYxQjRQQVFtc2VocVZJYnpzUUNHaTU0VkRyczZiWmQvN0pzMXpDcHBncwpKaUQ1SXFNaktXRHdxN2FLCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQ2QwZlBDYWtweE1nUnUKT0VXQjFiQk5FM3ZseW55aTZWbkV2VWF1OUhvakR2UHVPTFJIaGI4MmoyY1ovMHhnL1lKR09LelBuV2JERkxGNApHdWh3dDRENmFUR0xYNklPODEwTDZ0SXZIWGZNUXRJS2VwdTZ3K3p1WVo4bG1yejB1RjZlWEtqamVIbHhyb2ZrCnVNekM3OUVaU0lYZlZlczJ1SmdVRSs4VGFzSDUzQ2Y4MFNSRGlIeEdxckttdVNjWCtwejBreGdCZ1VWYTVVS20KUWdTZDFmVUxLOUEwNXAxOXkrdURPM204bVhRNkxVQ0N1STFwZHNROGFlNS9zamlxa0VjWlJjMTdWYVgxWjVVaQpvcGZnNW9SY05VTG9VTHNiek9aNTR0YlVDUmdSV2VLbGZxaElINEZ6OUlkVlUyR3dFdEdhMmV6TjgyMVBaQ3QzCjZhbVRIelJsQWdNQkFBRUNnZ0VBWTFGTUlLNDVXTkVNUHJ6RTZUY3NNdVV2RkdhQVZ4bVk5NW5SMEtwajdvb3IKY21CVys2ZXN0TTQ4S1AwaitPbXd3VFpMY29Cd3VoWGN0V1Bob1lXcDhteWUxRUlEdjNyaHRHMDdocEQ1NGg2dgpCZzh3ejdFYStzMk9sT0N6UnlKNzBSY281YlhjWDNGaGJjdnFlRWJwaFFyQnpOSEtLMjZ4cmZqNWZIT3p6T1FGCmJHdUZ3SDVic3JGdFhlajJXM3c4eW90N0ZQSDV3S3RpdnhvSWU5RjMyOXNnOU9EQnZqWnpiaG1LVTArckFTK1kKRGVield2bFJyaEUrbXVmQTN6M0N0QXhDOFJpNzNscFNoTDRQQWlvcG1SUXlxZXRXMjYzOFFxcnM0R3hnNzhwbApJUXJXTmNBc2s3Slg5d3RZenV6UFBXSXRWTTFscFJiQVRhNTJqdFl2NVFLQmdRRE5tMTFtZTRYam1ZSFV2cStZCmFTUzdwK2UybXZEMHVaOU9JeFluQnBWMGkrckNlYnFFMkE1Rm5hcDQ5Yld4QTgwUElldlVkeUpCL2pUUkoxcVMKRUpXQkpMWm1LVkg2K1QwdWw1ZUtOcWxFTFZHU0dCSXNpeE9SUXpDZHBoMkx0UmtBMHVjSVUzY3hiUmVMZkZCRQpiSkdZWENCdlNGcWd0VDlvZTFldVpMVmFOd0tCZ1FERWdENzJENk81eGIweEQ1NDQ1M0RPMUJhZmd6aThCWDRTCk1SaVd2LzFUQ0w5N05sRWtoeXovNmtQd1owbXJRcE5CMzZFdkpKZFVteHdkU2MyWDhrOGcxMC85NVlLQkdWQWoKL3d0YVZYbE9WeEFvK0ZSelpZeFpyQ29uWWFSMHVwUzFybDRtenN4REhlZU9mUVZUTUgwUjdZN0pnbTA5dXQ4SwplanAvSXZBb1F3S0JnQjNaRWlRUWhvMVYrWjBTMlpiOG5KS0plMy9zMmxJTXFHM0ZkaS9RS3Q0eWViQWx6OGY5ClBZVXBzRmZEQTg5Z3grSU1nSm5sZVptdTk2ZnRXSjZmdmJSenllN216TG5zZU05TXZua1lHbGFGWmJRWnZubXMKN3ZoRmtzY3dHRlh4d21GMlBJZmU1Z3pNMDRBeVdjeTFIaVhLS2dNOXM3cGsxWUdyZGowZzdacmRBb0dCQUtLNApDR3MrbkRmMEZTMFJYOWFEWVJrRTdBNy9YUFhtSG5YMkRnU1h5N0Q4NTRPaWdTTWNoUmtPNTErbVNJejNQbllvCk41T1FXM2lHVVl1M1YvYmhnc0VSUzM1V2xmRk9BdDBzRUR5bjF5SVdXcDF5dG93d3BUNkVvUXVuZ2NYZjA5RjMKS1NROXowd3M4VmsvRWkvSFVXcU5LOWFXbU51cmFaT0ZqL2REK1ZkOUFvR0FMWFN3dEE3K043RDRkN0VEMURSRQpHTWdZNVd3OHFvdDZSdUNlNkpUY0FnU3B1MkhNU3JVY2dXclpiQnJZb09FUnVNQjFoMVJydk5ybU1qQlM0VW9FClgyZC8vbGhpOG1wL2VESWN3UDNRa2puanBJRFJWMFN1eWxrUkVaZURKZjVZb3R6eDdFdkJhbzFIbkQrWEg4eUIKVUtmWGJTaHZKVUdhRmgxT3Q1Y3JoM1k9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.out.yaml index 6bd21582eb4..deb3363ef43 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-no-valid-certificate-for-fqdn.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -44,7 +44,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.in.yaml index 0b68948ea73..95bffc38bbe 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -18,7 +18,7 @@ gateways: certificateRefs: - name: tls-secret-1 httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.out.yaml index c58c5f1a2ed..b7e09ffc5e6 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-does-not-exist.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.in.yaml index 0bee2931391..caab5079f9c 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -29,7 +29,7 @@ secrets: tls.crt: Zm9vCg== tls.key: YmFyCg== httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.out.yaml index 9975d4e9c27..ac0bea42b99 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-in-other-namespace.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -43,7 +43,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.in.yaml index c1ff4fb2c61..75e6051a21b 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -27,7 +27,7 @@ secrets: data: tls.key: YmFyCg== httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.out.yaml index b50ec90c584..3e8ca57f335 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-invalid-tls-configuration-secret-is-not-valid.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.in.yaml index 6d2bed7a339..f24ab41fe4d 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: Selector httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.out.yaml index 4ea7458ce24..9e7040d42cf 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-missing-allowed-namespaces-selector.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -36,7 +36,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.in.yaml index 1be8e3b6948..f027c23e67f 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.out.yaml index 9210e3216bf..d6d72c55452 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcp-with-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.in.yaml index 049bb0ea059..1cc29af9d38 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml index c071a6c9db6..76f634d295a 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.in.yaml index 3e5271710c3..f0291a53162 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml index f65335f942e..5ca44bf64d0 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.in.yaml index 52cfed69655..179769001d8 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.out.yaml index 2a8ef28ea44..b24190c9e08 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-rules.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.in.yaml index f61fc1b98a6..702318e694c 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -29,7 +29,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNxRENDQVpBQ0NRREVNZ1lZblFyQ29EQU5CZ2txaGtpRzl3MEJBUXNGQURBV01SUXdFZ1lEVlFRRERBdG0KYjI4dVltRnlMbU52YlRBZUZ3MHlNekF4TURVeE16UXpNalJhRncweU5EQXhNRFV4TXpRek1qUmFNQll4RkRBUwpCZ05WQkFNTUMyWnZieTVpWVhJdVkyOXRNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDCkFRRUFuZEh6d21wS2NUSUViamhGZ2RXd1RSTjc1Y3A4b3VsWnhMMUdydlI2SXc3ejdqaTBSNFcvTm85bkdmOU0KWVAyQ1JqaXN6NTFtd3hTeGVCcm9jTGVBK21reGkxK2lEdk5kQytyU0x4MTN6RUxTQ25xYnVzUHM3bUdmSlpxOAo5TGhlbmx5bzQzaDVjYTZINUxqTXd1L1JHVWlGMzFYck5yaVlGQlB2RTJyQitkd24vTkVrUTRoOFJxcXlwcmtuCkYvcWM5Sk1ZQVlGRld1VkNwa0lFbmRYMUN5dlFOT2FkZmN2cmd6dDV2SmwwT2kxQWdyaU5hWGJFUEdudWY3STQKcXBCSEdVWE5lMVdsOVdlVklxS1g0T2FFWERWQzZGQzdHOHptZWVMVzFBa1lFVm5pcFg2b1NCK0JjL1NIVlZOaApzQkxSbXRuc3pmTnRUMlFyZCttcGt4ODBaUUlEQVFBQk1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1VKOElDCkJveUVqT3V3enBHYVJoR044QjRqT1B6aHVDT0V0ZDM3UzAybHUwN09IenlCdmJzVEd6S3dCZ0x5bVdmR2tINEIKajdDTHNwOEZ6TkhLWnVhQmdwblo5SjZETE9Od2ZXZTJBWXA3TGRmT0tWQlVkTVhRaU9tN2pKOUhob0Ntdk1ONwpic2pjaFdKb013ckZmK3dkQUthdHowcUFQeWhMeWUvRnFtaVZ4a09SWmF3K1Q5bURaK0g0OXVBU2d1SnVOTXlRClY2RXlYNmd0Z1dxMzc2SHZhWE1TLzNoYW1Zb1ZXWEk1TXhpUE9ZeG5BQmtKQjRTQ2dJUmVqYkpmVmFRdG9RNGEKejAyaVVMZW5ESUllUU9Zb2JLY01CWGYxQjRQQVFtc2VocVZJYnpzUUNHaTU0VkRyczZiWmQvN0pzMXpDcHBncwpKaUQ1SXFNaktXRHdxN2FLCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQ2QwZlBDYWtweE1nUnUKT0VXQjFiQk5FM3ZseW55aTZWbkV2VWF1OUhvakR2UHVPTFJIaGI4MmoyY1ovMHhnL1lKR09LelBuV2JERkxGNApHdWh3dDRENmFUR0xYNklPODEwTDZ0SXZIWGZNUXRJS2VwdTZ3K3p1WVo4bG1yejB1RjZlWEtqamVIbHhyb2ZrCnVNekM3OUVaU0lYZlZlczJ1SmdVRSs4VGFzSDUzQ2Y4MFNSRGlIeEdxckttdVNjWCtwejBreGdCZ1VWYTVVS20KUWdTZDFmVUxLOUEwNXAxOXkrdURPM204bVhRNkxVQ0N1STFwZHNROGFlNS9zamlxa0VjWlJjMTdWYVgxWjVVaQpvcGZnNW9SY05VTG9VTHNiek9aNTR0YlVDUmdSV2VLbGZxaElINEZ6OUlkVlUyR3dFdEdhMmV6TjgyMVBaQ3QzCjZhbVRIelJsQWdNQkFBRUNnZ0VBWTFGTUlLNDVXTkVNUHJ6RTZUY3NNdVV2RkdhQVZ4bVk5NW5SMEtwajdvb3IKY21CVys2ZXN0TTQ4S1AwaitPbXd3VFpMY29Cd3VoWGN0V1Bob1lXcDhteWUxRUlEdjNyaHRHMDdocEQ1NGg2dgpCZzh3ejdFYStzMk9sT0N6UnlKNzBSY281YlhjWDNGaGJjdnFlRWJwaFFyQnpOSEtLMjZ4cmZqNWZIT3p6T1FGCmJHdUZ3SDVic3JGdFhlajJXM3c4eW90N0ZQSDV3S3RpdnhvSWU5RjMyOXNnOU9EQnZqWnpiaG1LVTArckFTK1kKRGVield2bFJyaEUrbXVmQTN6M0N0QXhDOFJpNzNscFNoTDRQQWlvcG1SUXlxZXRXMjYzOFFxcnM0R3hnNzhwbApJUXJXTmNBc2s3Slg5d3RZenV6UFBXSXRWTTFscFJiQVRhNTJqdFl2NVFLQmdRRE5tMTFtZTRYam1ZSFV2cStZCmFTUzdwK2UybXZEMHVaOU9JeFluQnBWMGkrckNlYnFFMkE1Rm5hcDQ5Yld4QTgwUElldlVkeUpCL2pUUkoxcVMKRUpXQkpMWm1LVkg2K1QwdWw1ZUtOcWxFTFZHU0dCSXNpeE9SUXpDZHBoMkx0UmtBMHVjSVUzY3hiUmVMZkZCRQpiSkdZWENCdlNGcWd0VDlvZTFldVpMVmFOd0tCZ1FERWdENzJENk81eGIweEQ1NDQ1M0RPMUJhZmd6aThCWDRTCk1SaVd2LzFUQ0w5N05sRWtoeXovNmtQd1owbXJRcE5CMzZFdkpKZFVteHdkU2MyWDhrOGcxMC85NVlLQkdWQWoKL3d0YVZYbE9WeEFvK0ZSelpZeFpyQ29uWWFSMHVwUzFybDRtenN4REhlZU9mUVZUTUgwUjdZN0pnbTA5dXQ4SwplanAvSXZBb1F3S0JnQjNaRWlRUWhvMVYrWjBTMlpiOG5KS0plMy9zMmxJTXFHM0ZkaS9RS3Q0eWViQWx6OGY5ClBZVXBzRmZEQTg5Z3grSU1nSm5sZVptdTk2ZnRXSjZmdmJSenllN216TG5zZU05TXZua1lHbGFGWmJRWnZubXMKN3ZoRmtzY3dHRlh4d21GMlBJZmU1Z3pNMDRBeVdjeTFIaVhLS2dNOXM3cGsxWUdyZGowZzdacmRBb0dCQUtLNApDR3MrbkRmMEZTMFJYOWFEWVJrRTdBNy9YUFhtSG5YMkRnU1h5N0Q4NTRPaWdTTWNoUmtPNTErbVNJejNQbllvCk41T1FXM2lHVVl1M1YvYmhnc0VSUzM1V2xmRk9BdDBzRUR5bjF5SVdXcDF5dG93d3BUNkVvUXVuZ2NYZjA5RjMKS1NROXowd3M4VmsvRWkvSFVXcU5LOWFXbU51cmFaT0ZqL2REK1ZkOUFvR0FMWFN3dEE3K043RDRkN0VEMURSRQpHTWdZNVd3OHFvdDZSdUNlNkpUY0FnU3B1MkhNU3JVY2dXclpiQnJZb09FUnVNQjFoMVJydk5ybU1qQlM0VW9FClgyZC8vbGhpOG1wL2VESWN3UDNRa2puanBJRFJWMFN1eWxrUkVaZURKZjVZb3R6eDdFdkJhbzFIbkQrWEg4eUIKVUtmWGJTaHZKVUdhRmgxT3Q1Y3JoM1k9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml index 65a9f6bc7c2..851bdc81538 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -47,7 +47,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.in.yaml index 910faa3e9ef..233c609eea1 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -42,7 +42,7 @@ tlsRoutes: - name: service-2 port: 8080 httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml index 7e746a06fa3..125a1519bac 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -77,7 +77,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.in.yaml index 5da384704ec..f8e9d3859d8 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.out.yaml index 458b291eda3..cdec1d56490 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udp-with-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.in.yaml index 3f59d61eb8e..440e8c9fd55 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.out.yaml index 73baed8dc13..518de1b91fa 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-mismatch-port-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.in.yaml index 7b8bad988c2..6dfe97fba5e 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml index 991b675b511..f52d4f1a720 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.in.yaml index 1cf9356840b..ecb2d33e09f 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.out.yaml index 50e5b63fa60..c024a1cfa91 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-rules.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.in.yaml index dc4f8e80521..bba95249356 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.out.yaml index 32d5b2fdd7b..16f687f3ce2 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-tcproute.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.in.yaml index a1699083121..2f7fa01b58c 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.out.yaml index 79c3c322757..f5d768207dc 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unmatched-udproute.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.in.yaml index 7fe1283b99c..12598d5c297 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml index 784cda8521b..7e24746ae1d 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-unsupported-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -36,7 +36,7 @@ gateways: name: unsupported supportedKinds: null httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.in.yaml index 4bb8c828d3d..2d042047881 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -38,7 +38,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJZakNCNlFJSkFNcDhYTGNsWGJ2NU1Bb0dDQ3FHU000OUJBTUNNQnN4R1RBWEJnTlZCQU1NRUhSbGMzUXUKWlhoaGJYQnNaUzVqYjIwd0hoY05Nak13TlRJMU1UUXhNRFF5V2hjTk1qUXdOVEkwTVRReE1EUXlXakFiTVJrdwpGd1lEVlFRRERCQjBaWE4wTG1WNFlXMXdiR1V1WTI5dE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFCmVNdEhDM2hJZXEyUXNka3RTaS9aTlIvTUtOYXZTbTNITm43dEdvZ2ZxYXFuOEFTZ0hJYTd5VVUrK1Bzb0RENmsKZisrQ2U3dXNkMG1RTzFTbmRZSVdqMlFMaUl6ME5aSDhCL1FyNGk3SjBJS3dzUWxVbnVuWnF2NUtZOVRMUWEwbgpNQW9HQ0NxR1NNNDlCQU1DQTJnQU1HVUNNUUNHVGpQa2hqZE1KcWUrVjFGRWpteUk2andEV0FDalhucFRuaXhVCnM2dUNKZjVNNUw1TmpGYmkydGplMGlES0UxVUNNQXdxSjZmOUs2bUhUd2JxVGkzTVNFMmQxODl6aUcyWVZCaUQKYmVXcHc0UjF5ZTdHRFJvVm9veG9ob2lERjdsNm13PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= tls.key: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1JR2tBZ0VCQkRDUUE5VWo0SkR5c0Q0MlJIMGI2cjU5NTlXTmlXU2ZKZlMxK2RvTjk0TzZCUGdaQUJiUTI4eTIKUTZsM3pZdklLeFNnQndZRks0RUVBQ0toWkFOaUFBUjR5MGNMZUVoNnJaQ3gyUzFLTDlrMUg4d28xcTlLYmNjMgpmdTBhaUIrcHFxZndCS0FjaHJ2SlJUNzQreWdNUHFSLzc0Sjd1NngzU1pBN1ZLZDFnaGFQWkF1SWpQUTFrZndICjlDdmlMc25RZ3JDeENWU2U2ZG1xL2twajFNdEJyU2M9Ci0tLS0tRU5EIEVDIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml index 09027d99136..806ed34a6b6 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -49,7 +49,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.in.yaml index 36725caf65c..940d551a501 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -38,7 +38,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJHekNCd2dJSkFJL3gxc0NEL0lSa01Bb0dDQ3FHU000OUJBTUNNQll4RkRBU0JnTlZCQU1NQzJadmJ5NWkKWVhJdVkyOXRNQjRYRFRJek1ERXdOVEl4TlRNeU9Wb1hEVEkwTURFd05USXhOVE15T1Zvd0ZqRVVNQklHQTFVRQpBd3dMWm05dkxtSmhjaTVqYjIwd1dUQVRCZ2NxaGtqT1BRSUJCZ2dxaGtqT1BRTUJCd05DQUFRZmxXMnR6T3M4Cm82Nk5USVRmYUhucEc2UzI3Y2hkSldzallKdWJISkFtT2tYdS8rVGxLTXhGUzl4R2tHK09BQjAyR0ZQaHhQVzcKRnFaTFJoOEp0YlZkTUFvR0NDcUdTTTQ5QkFNQ0EwZ0FNRVVDSVFEdlplU1pBZ1VWV2VpM3o0ZEhOTEd0aHpiaQoxRHZ0anRQekhYZ1R3WS92YmdJZ05KWStNcTRweFJnNit3eU04R1R4czVUV3k5Zml5RGhMUEU5QnhlbEsxSjQ9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K tls.key: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUxEbnZNM1RKM3NHYm9EeTF4T3dqSVppVFNWeWZXVWF5YVExcWdrdUdacEtvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFSDVWdHJjenJQS091alV5RTMyaDU2UnVrdHUzSVhTVnJJMkNibXh5UUpqcEY3di9rNVNqTQpSVXZjUnBCdmpnQWROaGhUNGNUMXV4YW1TMFlmQ2JXMVhRPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo= httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml index 7a18c6de510..07a1de64cb4 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -49,7 +49,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.in.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.in.yaml index 58feff7c6ed..e85e71e7482 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -28,7 +28,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNxRENDQVpBQ0NRREVNZ1lZblFyQ29EQU5CZ2txaGtpRzl3MEJBUXNGQURBV01SUXdFZ1lEVlFRRERBdG0KYjI4dVltRnlMbU52YlRBZUZ3MHlNekF4TURVeE16UXpNalJhRncweU5EQXhNRFV4TXpRek1qUmFNQll4RkRBUwpCZ05WQkFNTUMyWnZieTVpWVhJdVkyOXRNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDCkFRRUFuZEh6d21wS2NUSUViamhGZ2RXd1RSTjc1Y3A4b3VsWnhMMUdydlI2SXc3ejdqaTBSNFcvTm85bkdmOU0KWVAyQ1JqaXN6NTFtd3hTeGVCcm9jTGVBK21reGkxK2lEdk5kQytyU0x4MTN6RUxTQ25xYnVzUHM3bUdmSlpxOAo5TGhlbmx5bzQzaDVjYTZINUxqTXd1L1JHVWlGMzFYck5yaVlGQlB2RTJyQitkd24vTkVrUTRoOFJxcXlwcmtuCkYvcWM5Sk1ZQVlGRld1VkNwa0lFbmRYMUN5dlFOT2FkZmN2cmd6dDV2SmwwT2kxQWdyaU5hWGJFUEdudWY3STQKcXBCSEdVWE5lMVdsOVdlVklxS1g0T2FFWERWQzZGQzdHOHptZWVMVzFBa1lFVm5pcFg2b1NCK0JjL1NIVlZOaApzQkxSbXRuc3pmTnRUMlFyZCttcGt4ODBaUUlEQVFBQk1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1VKOElDCkJveUVqT3V3enBHYVJoR044QjRqT1B6aHVDT0V0ZDM3UzAybHUwN09IenlCdmJzVEd6S3dCZ0x5bVdmR2tINEIKajdDTHNwOEZ6TkhLWnVhQmdwblo5SjZETE9Od2ZXZTJBWXA3TGRmT0tWQlVkTVhRaU9tN2pKOUhob0Ntdk1ONwpic2pjaFdKb013ckZmK3dkQUthdHowcUFQeWhMeWUvRnFtaVZ4a09SWmF3K1Q5bURaK0g0OXVBU2d1SnVOTXlRClY2RXlYNmd0Z1dxMzc2SHZhWE1TLzNoYW1Zb1ZXWEk1TXhpUE9ZeG5BQmtKQjRTQ2dJUmVqYkpmVmFRdG9RNGEKejAyaVVMZW5ESUllUU9Zb2JLY01CWGYxQjRQQVFtc2VocVZJYnpzUUNHaTU0VkRyczZiWmQvN0pzMXpDcHBncwpKaUQ1SXFNaktXRHdxN2FLCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQ2QwZlBDYWtweE1nUnUKT0VXQjFiQk5FM3ZseW55aTZWbkV2VWF1OUhvakR2UHVPTFJIaGI4MmoyY1ovMHhnL1lKR09LelBuV2JERkxGNApHdWh3dDRENmFUR0xYNklPODEwTDZ0SXZIWGZNUXRJS2VwdTZ3K3p1WVo4bG1yejB1RjZlWEtqamVIbHhyb2ZrCnVNekM3OUVaU0lYZlZlczJ1SmdVRSs4VGFzSDUzQ2Y4MFNSRGlIeEdxckttdVNjWCtwejBreGdCZ1VWYTVVS20KUWdTZDFmVUxLOUEwNXAxOXkrdURPM204bVhRNkxVQ0N1STFwZHNROGFlNS9zamlxa0VjWlJjMTdWYVgxWjVVaQpvcGZnNW9SY05VTG9VTHNiek9aNTR0YlVDUmdSV2VLbGZxaElINEZ6OUlkVlUyR3dFdEdhMmV6TjgyMVBaQ3QzCjZhbVRIelJsQWdNQkFBRUNnZ0VBWTFGTUlLNDVXTkVNUHJ6RTZUY3NNdVV2RkdhQVZ4bVk5NW5SMEtwajdvb3IKY21CVys2ZXN0TTQ4S1AwaitPbXd3VFpMY29Cd3VoWGN0V1Bob1lXcDhteWUxRUlEdjNyaHRHMDdocEQ1NGg2dgpCZzh3ejdFYStzMk9sT0N6UnlKNzBSY281YlhjWDNGaGJjdnFlRWJwaFFyQnpOSEtLMjZ4cmZqNWZIT3p6T1FGCmJHdUZ3SDVic3JGdFhlajJXM3c4eW90N0ZQSDV3S3RpdnhvSWU5RjMyOXNnOU9EQnZqWnpiaG1LVTArckFTK1kKRGVield2bFJyaEUrbXVmQTN6M0N0QXhDOFJpNzNscFNoTDRQQWlvcG1SUXlxZXRXMjYzOFFxcnM0R3hnNzhwbApJUXJXTmNBc2s3Slg5d3RZenV6UFBXSXRWTTFscFJiQVRhNTJqdFl2NVFLQmdRRE5tMTFtZTRYam1ZSFV2cStZCmFTUzdwK2UybXZEMHVaOU9JeFluQnBWMGkrckNlYnFFMkE1Rm5hcDQ5Yld4QTgwUElldlVkeUpCL2pUUkoxcVMKRUpXQkpMWm1LVkg2K1QwdWw1ZUtOcWxFTFZHU0dCSXNpeE9SUXpDZHBoMkx0UmtBMHVjSVUzY3hiUmVMZkZCRQpiSkdZWENCdlNGcWd0VDlvZTFldVpMVmFOd0tCZ1FERWdENzJENk81eGIweEQ1NDQ1M0RPMUJhZmd6aThCWDRTCk1SaVd2LzFUQ0w5N05sRWtoeXovNmtQd1owbXJRcE5CMzZFdkpKZFVteHdkU2MyWDhrOGcxMC85NVlLQkdWQWoKL3d0YVZYbE9WeEFvK0ZSelpZeFpyQ29uWWFSMHVwUzFybDRtenN4REhlZU9mUVZUTUgwUjdZN0pnbTA5dXQ4SwplanAvSXZBb1F3S0JnQjNaRWlRUWhvMVYrWjBTMlpiOG5KS0plMy9zMmxJTXFHM0ZkaS9RS3Q0eWViQWx6OGY5ClBZVXBzRmZEQTg5Z3grSU1nSm5sZVptdTk2ZnRXSjZmdmJSenllN216TG5zZU05TXZua1lHbGFGWmJRWnZubXMKN3ZoRmtzY3dHRlh4d21GMlBJZmU1Z3pNMDRBeVdjeTFIaVhLS2dNOXM3cGsxWUdyZGowZzdacmRBb0dCQUtLNApDR3MrbkRmMEZTMFJYOWFEWVJrRTdBNy9YUFhtSG5YMkRnU1h5N0Q4NTRPaWdTTWNoUmtPNTErbVNJejNQbllvCk41T1FXM2lHVVl1M1YvYmhnc0VSUzM1V2xmRk9BdDBzRUR5bjF5SVdXcDF5dG93d3BUNkVvUXVuZ2NYZjA5RjMKS1NROXowd3M4VmsvRWkvSFVXcU5LOWFXbU51cmFaT0ZqL2REK1ZkOUFvR0FMWFN3dEE3K043RDRkN0VEMURSRQpHTWdZNVd3OHFvdDZSdUNlNkpUY0FnU3B1MkhNU3JVY2dXclpiQnJZb09FUnVNQjFoMVJydk5ybU1qQlM0VW9FClgyZC8vbGhpOG1wL2VESWN3UDNRa2puanBJRFJWMFN1eWxrUkVaZURKZjVZb3R6eDdFdkJhbzFIbkQrWEg4eUIKVUtmWGJTaHZKVUdhRmgxT3Q1Y3JoM1k9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml index 55c5e7a1dd4..337937ea290 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -46,7 +46,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.in.yaml b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.in.yaml index 1e3c087a464..88a3c06d4ba 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: default @@ -26,7 +26,7 @@ gateways: reason: Programmed message: Listener has been successfully translated httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml index aafd8dc810c..7f3e382bf42 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.in.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.in.yaml index 13195729173..27fc4622a0d 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml index bd37e9d93b6..a88038eae96 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.in.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.in.yaml index a5c8561df8e..0d8be290550 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml index 2e4de3be4f9..754dae0c4dc 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.in.yaml b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.in.yaml index 96b48f3e7b7..e1020d2369a 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: default @@ -40,7 +40,7 @@ gateways: reason: Programmed message: Listener has been successfully translated httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml index 63cd4da8049..cc331a9ec1d 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -46,7 +46,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.in.yaml index fc0744606b6..049c7974138 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml index e0192da49b8..9f6f8957295 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.in.yaml index b76a4678043..50601282fce 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml index fd71697a94e..4b312da21d8 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.in.yaml index e3bfa502356..90fe76523f8 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -24,7 +24,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.out.yaml index a04318ffb34..dda0a7c4e74 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: TLSRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.in.yaml index 65b6ed82eba..d0cadfda02c 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -22,7 +22,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default @@ -38,7 +38,7 @@ httpRoutes: backendRefs: - name: service-1 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml index b2a94a36e49..d7f5bbc33e2 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -105,7 +105,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.in.yaml index 69b6f58c0b8..69b93f3b1a6 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -22,7 +22,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.out.yaml index fe1c076d695..c7db7a21465 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.in.yaml index 981e2604510..37c0a342f3b 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -22,7 +22,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.out.yaml index ec3264e73cd..7ec1823a77e 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-and-incompatible-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.in.yaml index a7296205001..34bd7a43e6f 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -21,7 +21,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml index 5c3c6546a73..da39c8b00ef 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -68,7 +68,7 @@ gateways: - group: gateway.networking.k8s.io kind: TCPRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.in.yaml index 9fc9e95903f..d4ef5be9e3f 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -21,7 +21,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml index e97c1579df6..d59e161199d 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -68,7 +68,7 @@ gateways: - group: gateway.networking.k8s.io kind: UDPRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.in.yaml index dbdd26a3d06..a4bb69bb764 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml index 78baeac5313..49acc6c8452 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.in.yaml index 773c926237d..1ba01ba6cd5 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml index a3715a50666..759e45901db 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.in.yaml index ab1cc8facb1..dc3a42ab705 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml index 1f6c63c0242..a5a304ba208 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.in.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.in.yaml index 1922d9353d1..2638f0f19de 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.in.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml index 4700a880360..692388c6498 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.in.yaml index b6078734a8d..ae2baa8dca1 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml index c04a8944b9f..59d139d01c1 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.in.yaml index b7da2bc9300..82e319fd264 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml index 4b8aa0f5737..ee66e91bc17 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.in.yaml index a95d5fab433..e2a374d149e 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml index 488a7e19f48..b7fc079c14f 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.in.yaml index 56dbf4ed110..2c48dad582e 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml index 4778608be30..1891581612e 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.in.yaml index 912c2f9c4b4..ad245cb182c 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml index 93c18221bd8..4406f205c53 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.in.yaml index 24a6a3c2fca..9c46c74c843 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.out.yaml index d84abac1fbd..b36321651d8 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-valid-authenfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.in.yaml b/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.in.yaml index 06766cdf705..29ddd013056 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.in.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.out.yaml index 71b7921f9b0..704f48edb10 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-valid-ratelimitfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.in.yaml index 7ec5ee38330..d44d02d168f 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -64,7 +64,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml index fc0ea56e303..d30026097ab 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -251,7 +251,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.in.yaml index 6d6d34395df..d2078deb76b 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -64,7 +64,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml index d78427b642e..de694b38c8c 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -251,7 +251,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.in.yaml index 26afb769e00..8674e7a9633 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -34,7 +34,7 @@ secrets: tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNxRENDQVpBQ0NRREVNZ1lZblFyQ29EQU5CZ2txaGtpRzl3MEJBUXNGQURBV01SUXdFZ1lEVlFRRERBdG0KYjI4dVltRnlMbU52YlRBZUZ3MHlNekF4TURVeE16UXpNalJhRncweU5EQXhNRFV4TXpRek1qUmFNQll4RkRBUwpCZ05WQkFNTUMyWnZieTVpWVhJdVkyOXRNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDCkFRRUFuZEh6d21wS2NUSUViamhGZ2RXd1RSTjc1Y3A4b3VsWnhMMUdydlI2SXc3ejdqaTBSNFcvTm85bkdmOU0KWVAyQ1JqaXN6NTFtd3hTeGVCcm9jTGVBK21reGkxK2lEdk5kQytyU0x4MTN6RUxTQ25xYnVzUHM3bUdmSlpxOAo5TGhlbmx5bzQzaDVjYTZINUxqTXd1L1JHVWlGMzFYck5yaVlGQlB2RTJyQitkd24vTkVrUTRoOFJxcXlwcmtuCkYvcWM5Sk1ZQVlGRld1VkNwa0lFbmRYMUN5dlFOT2FkZmN2cmd6dDV2SmwwT2kxQWdyaU5hWGJFUEdudWY3STQKcXBCSEdVWE5lMVdsOVdlVklxS1g0T2FFWERWQzZGQzdHOHptZWVMVzFBa1lFVm5pcFg2b1NCK0JjL1NIVlZOaApzQkxSbXRuc3pmTnRUMlFyZCttcGt4ODBaUUlEQVFBQk1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1VKOElDCkJveUVqT3V3enBHYVJoR044QjRqT1B6aHVDT0V0ZDM3UzAybHUwN09IenlCdmJzVEd6S3dCZ0x5bVdmR2tINEIKajdDTHNwOEZ6TkhLWnVhQmdwblo5SjZETE9Od2ZXZTJBWXA3TGRmT0tWQlVkTVhRaU9tN2pKOUhob0Ntdk1ONwpic2pjaFdKb013ckZmK3dkQUthdHowcUFQeWhMeWUvRnFtaVZ4a09SWmF3K1Q5bURaK0g0OXVBU2d1SnVOTXlRClY2RXlYNmd0Z1dxMzc2SHZhWE1TLzNoYW1Zb1ZXWEk1TXhpUE9ZeG5BQmtKQjRTQ2dJUmVqYkpmVmFRdG9RNGEKejAyaVVMZW5ESUllUU9Zb2JLY01CWGYxQjRQQVFtc2VocVZJYnpzUUNHaTU0VkRyczZiWmQvN0pzMXpDcHBncwpKaUQ1SXFNaktXRHdxN2FLCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQ2QwZlBDYWtweE1nUnUKT0VXQjFiQk5FM3ZseW55aTZWbkV2VWF1OUhvakR2UHVPTFJIaGI4MmoyY1ovMHhnL1lKR09LelBuV2JERkxGNApHdWh3dDRENmFUR0xYNklPODEwTDZ0SXZIWGZNUXRJS2VwdTZ3K3p1WVo4bG1yejB1RjZlWEtqamVIbHhyb2ZrCnVNekM3OUVaU0lYZlZlczJ1SmdVRSs4VGFzSDUzQ2Y4MFNSRGlIeEdxckttdVNjWCtwejBreGdCZ1VWYTVVS20KUWdTZDFmVUxLOUEwNXAxOXkrdURPM204bVhRNkxVQ0N1STFwZHNROGFlNS9zamlxa0VjWlJjMTdWYVgxWjVVaQpvcGZnNW9SY05VTG9VTHNiek9aNTR0YlVDUmdSV2VLbGZxaElINEZ6OUlkVlUyR3dFdEdhMmV6TjgyMVBaQ3QzCjZhbVRIelJsQWdNQkFBRUNnZ0VBWTFGTUlLNDVXTkVNUHJ6RTZUY3NNdVV2RkdhQVZ4bVk5NW5SMEtwajdvb3IKY21CVys2ZXN0TTQ4S1AwaitPbXd3VFpMY29Cd3VoWGN0V1Bob1lXcDhteWUxRUlEdjNyaHRHMDdocEQ1NGg2dgpCZzh3ejdFYStzMk9sT0N6UnlKNzBSY281YlhjWDNGaGJjdnFlRWJwaFFyQnpOSEtLMjZ4cmZqNWZIT3p6T1FGCmJHdUZ3SDVic3JGdFhlajJXM3c4eW90N0ZQSDV3S3RpdnhvSWU5RjMyOXNnOU9EQnZqWnpiaG1LVTArckFTK1kKRGVield2bFJyaEUrbXVmQTN6M0N0QXhDOFJpNzNscFNoTDRQQWlvcG1SUXlxZXRXMjYzOFFxcnM0R3hnNzhwbApJUXJXTmNBc2s3Slg5d3RZenV6UFBXSXRWTTFscFJiQVRhNTJqdFl2NVFLQmdRRE5tMTFtZTRYam1ZSFV2cStZCmFTUzdwK2UybXZEMHVaOU9JeFluQnBWMGkrckNlYnFFMkE1Rm5hcDQ5Yld4QTgwUElldlVkeUpCL2pUUkoxcVMKRUpXQkpMWm1LVkg2K1QwdWw1ZUtOcWxFTFZHU0dCSXNpeE9SUXpDZHBoMkx0UmtBMHVjSVUzY3hiUmVMZkZCRQpiSkdZWENCdlNGcWd0VDlvZTFldVpMVmFOd0tCZ1FERWdENzJENk81eGIweEQ1NDQ1M0RPMUJhZmd6aThCWDRTCk1SaVd2LzFUQ0w5N05sRWtoeXovNmtQd1owbXJRcE5CMzZFdkpKZFVteHdkU2MyWDhrOGcxMC85NVlLQkdWQWoKL3d0YVZYbE9WeEFvK0ZSelpZeFpyQ29uWWFSMHVwUzFybDRtenN4REhlZU9mUVZUTUgwUjdZN0pnbTA5dXQ4SwplanAvSXZBb1F3S0JnQjNaRWlRUWhvMVYrWjBTMlpiOG5KS0plMy9zMmxJTXFHM0ZkaS9RS3Q0eWViQWx6OGY5ClBZVXBzRmZEQTg5Z3grSU1nSm5sZVptdTk2ZnRXSjZmdmJSenllN216TG5zZU05TXZua1lHbGFGWmJRWnZubXMKN3ZoRmtzY3dHRlh4d21GMlBJZmU1Z3pNMDRBeVdjeTFIaVhLS2dNOXM3cGsxWUdyZGowZzdacmRBb0dCQUtLNApDR3MrbkRmMEZTMFJYOWFEWVJrRTdBNy9YUFhtSG5YMkRnU1h5N0Q4NTRPaWdTTWNoUmtPNTErbVNJejNQbllvCk41T1FXM2lHVVl1M1YvYmhnc0VSUzM1V2xmRk9BdDBzRUR5bjF5SVdXcDF5dG93d3BUNkVvUXVuZ2NYZjA5RjMKS1NROXowd3M4VmsvRWkvSFVXcU5LOWFXbU51cmFaT0ZqL2REK1ZkOUFvR0FMWFN3dEE3K043RDRkN0VEMURSRQpHTWdZNVd3OHFvdDZSdUNlNkpUY0FnU3B1MkhNU3JVY2dXclpiQnJZb09FUnVNQjFoMVJydk5ybU1qQlM0VW9FClgyZC8vbGhpOG1wL2VESWN3UDNRa2puanBJRFJWMFN1eWxrUkVaZURKZjVZb3R6eDdFdkJhbzFIbkQrWEg4eUIKVUtmWGJTaHZKVUdhRmgxT3Q1Y3JoM1k9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml index ee3af2fc22b..737d43da668 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -75,7 +75,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.in.yaml index 42319322961..8b11c8da7bf 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -22,7 +22,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml index 57fef257e9a..e88edaa93ac 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.in.yaml index 9c0f4d4e1a6..2946dfeb105 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml index 0ff593eef5f..ae14d6cbe63 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.in.yaml index b40ea29ee4d..ec02f88815e 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml index aae1c295212..a8d9a02048b 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.in.yaml index 6e11d814f18..bc9aba4dd28 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -22,7 +22,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml index 49c5c6a6378..dddac198b29 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -71,7 +71,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.in.yaml index b090ab618b4..26a816b93c8 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml index 4f007fcb909..f5334296b70 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.in.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.in.yaml index 34751d39697..6766b18f543 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.in.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml index a24ce596311..aae08dee870 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.in.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.in.yaml index ed0fc57e493..f16077de329 100644 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.in.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml index d11214ba602..d910e6e5442 100755 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.in.yaml b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.in.yaml index 42d894b2639..0060019963e 100644 --- a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.in.yaml +++ b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml index 83f680c2035..4cd3e58a774 100644 --- a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.in.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.in.yaml index d69d718f6e2..6cf2210aa3f 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.in.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml index 253cbb92c61..8e55e85f2be 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.in.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.in.yaml index df9b9983a82..2e9cddb5809 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.in.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml index c156e4b0b0e..d7fc6c8c81c 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.in.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.in.yaml index 3f6730de32a..36acae06f4d 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.in.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml index 73341f78699..06e52bfe474 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml index dc90c9d80f9..c1d5723e744 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml index cd3d01036e1..c9c5a58e59d 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.in.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.in.yaml index ba04517a1f6..e445c56366d 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml index 1e063589383..20ed4f04dbb 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.in.yaml b/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.in.yaml index aba0f749f4d..c956ebc3117 100644 --- a/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.out.yaml b/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.out.yaml index 294b55ec0ca..556411900c9 100644 --- a/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-distinct-sourcecidr-ratelimit.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.in.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.in.yaml index 9961e34afc7..14755bccba1 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml index ceac0578a8c..14f190acbc5 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.in.yaml index 741dd1ab74d..06888796590 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml index d129f5cc21d..b186106f0ce 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.in.yaml index 7a721b54686..d9dcdc3b289 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml index 0a08fe285ce..55a7d36259c 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.in.yaml index f8a8ed02266..754fc2d9730 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml index 3a21a4c48e1..7f12824c553 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.in.yaml index 432dc059e55..08fc178a22a 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml index 168e4a8ffb9..a466c593e7a 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.in.yaml index 7c22d7c62fe..c965d329683 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml index f77e614c698..2e4b11c24cb 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.in.yaml index 978ef416a6d..1b47bb7f4ff 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml index 9878d2af780..9d79d3a3475 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.in.yaml index ecdaf8f42dd..aaf5bad87ff 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml index 7816357aa6c..14cb1d167ef 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.in.yaml index 9ff34332afe..3b0ede69aee 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml index abb49168f4c..d2d65c9dd62 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.in.yaml index be2cdcaafd2..f2bc3162ff0 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml index 83ba31aba95..b32d9c0a122 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.in.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.in.yaml index 7bbbf94f8c5..09e21329020 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml index b5c41eb7dc9..2ae92bdd504 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.in.yaml index 7fbaac57602..85d2eabc26e 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml index 0bda5f1f503..e75b60882e6 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.in.yaml index fdb538528ef..66905669ee7 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml index 4acf16cb01d..50079248c8a 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.in.yaml index a543072c269..8914c502c54 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml index 6506717df8f..6781dcc65b7 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.in.yaml index 6a4116f6c45..90664bbd470 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml index 5e078ba2614..020a7bf3f96 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.in.yaml index 83dd774da95..35593cde200 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml index 6b8cc0a4bcf..669c5afcdab 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.in.yaml index 509869600a7..d56d23d0c94 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml index bd5e0bf4173..9e4963f1127 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.in.yaml index b0f788c5207..833ca4ad07b 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml index 0441329dd23..9543bab4beb 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.in.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.in.yaml index 4883307c8e7..1c0a11c7526 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.out.yaml index 7b9bd1f3ab1..4328150736a 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-ratelimitfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.in.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.in.yaml index 9bd0ed504de..f366ee752cb 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml index 75ed33c6593..afa9f1c4524 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.in.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.in.yaml index 950db156b83..16cc895b808 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml index 7c205006aaa..d5aa80f0bd1 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.in.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.in.yaml index 3873206e923..d14154f4a67 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml index 89d54922f22..85b30ec48e6 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.in.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.in.yaml index b3e9b7f624e..d2d41de93b1 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml index 163b520efbb..2858e31d5aa 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.in.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.in.yaml index c624835c1e7..f428cd3665e 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml index c86eea1c83e..6d64d583a12 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.in.yaml b/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.in.yaml index da672ca499e..5785df85e16 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.out.yaml b/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.out.yaml index b8928173cb3..919f22bf257 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-existent-authenfilter-ref.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.in.yaml b/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.in.yaml index cdf5030c62f..86569b96053 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.out.yaml b/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.out.yaml index b3a78ad1129..b61269b4370 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-matching-authenfilter-ref.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml index 99f6ba02fdb..51dd2e3d2c2 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml index 9531cbf1449..14f9cf7dacc 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.in.yaml index 491cf3d4cfd..d36b84da5fb 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml index fb6abc0382a..3b0c94febaa 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.in.yaml index bebd2d3e688..7eac1daafb2 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml index a4b50604c43..effccbc5fa3 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.in.yaml index e40076f5b56..41653f4d9b9 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml index ce288fdf647..b551b071c98 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.in.yaml index fcc91ae6054..ef891674a55 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml index b206db71c24..ce331c461d9 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.in.yaml index 45d029b7ea4..02986648009 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml index 3715c30de2e..08792fc2676 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.in.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.in.yaml index a683b7d7634..34c0b50fe8c 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml index e1b8f8f0795..e87602dc49c 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.in.yaml index cea778dd95b..40cf83e0d7f 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml index e4c521a18ee..d376bb2bd31 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.in.yaml index 12197e4d164..ac534639c68 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml index a4d9aee56c4..082da467faa 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.in.yaml index 42e37c41aaa..0cebadee072 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml index 6328ed885bb..7387da265c8 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.in.yaml index d3374ed743a..7624edfcc8e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml index de6da5623c0..5050624b40e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.in.yaml index 6d234bcf5f2..4cfd6396767 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml index 06d55576641..a6d34ce0944 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.in.yaml index d6e1c760913..1c0016800d3 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml index afd96392f91..dce73fb7d96 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.in.yaml index 2eb722baea5..cca451186c8 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml index 3fad87ce52a..1635b111757 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.in.yaml index 4c1a29d288e..6e1e57425bf 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml index 9975dabe0c4..77ff80ec20d 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.in.yaml index 2841ea22237..0f1e790b9d6 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml index 16459263d6a..80d939f8009 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.in.yaml index 1851a22c97d..8120906a4b7 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml index c3d3259e899..e18af4f074e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.in.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.in.yaml index 1e83e0d15a2..413ec03c8b1 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml index 1077aa7cac8..e1d73c90422 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.in.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.in.yaml index ce166fe9411..af7ae362824 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml index a9b0e9bffeb..3de870613b9 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.in.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.in.yaml index 3d372e82c8d..ee032081642 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml index 2840399fc04..fdb845ae1d0 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.in.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.in.yaml index 9fd68520b16..2ec00c37a8f 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml index f4a3498af5f..33d4418d46a 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.in.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.in.yaml index 3c8a4d791a3..7709a6945d0 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml index 0514ae06292..4bb51c36abf 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.in.yaml b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.in.yaml index b11330744b1..dbd94a92b56 100644 --- a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml index 2b92be85bbb..cd095768ea3 100644 --- a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.in.yaml b/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.in.yaml index 746c291fd47..80512128a46 100644 --- a/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.out.yaml b/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.out.yaml index 897139e8f19..3f80798c10a 100644 --- a/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-sourcecidr-ratelimit.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml index 7396ea600d8..87e9eedbb95 100644 --- a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml index 729d5f3bfe1..8654dbf94b4 100644 --- a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.in.yaml index 34c4cf7c439..fb2e342f211 100644 --- a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml index 4826d7bff70..f89e3718881 100644 --- a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.in.yaml index a9d0eed0a4d..d31a159837f 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml index 6661fb70ce8..a216ec0d08e 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.in.yaml index 81b7145ebc4..38e9a2f2ffc 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml index 180f43a123d..1758895c365 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.in.yaml index 20c01dad056..d9b220fd34c 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml index 75a6a895889..c89bf6ad9e6 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.in.yaml index 17a0293da6b..dbfc732c089 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml index 7761144afa9..8b3354f1a3b 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.in.yaml index 9aef23666fd..bcd778f9c29 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml index 63d1a94137f..4368e3326aa 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.in.yaml index 4a80b8390a4..1b8366455e2 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml index 7ca0f1c05d8..4860707ed5a 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.in.yaml index 8feeaffc603..11b7ff298c7 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml index 36735a83130..3ac9cd2e136 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.in.yaml index fb33211a086..555a6dbf5da 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml index ec36e84e67f..69dfe210917 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.in.yaml index 99c0c5f6b80..a89a9e7722e 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml index 79a11f36c04..df69cdec644 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.in.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.in.yaml index a11190c3195..c4597755cc3 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml index 2b039846e89..a77717cbd76 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.in.yaml b/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.in.yaml index 5c7e5acfa0b..9534510f851 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.out.yaml b/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.out.yaml index 8120012f896..ef2b7de94f8 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-authenfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.in.yaml b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.in.yaml index 23c61e764c4..2517962aefd 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.out.yaml b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.out.yaml index 47742e1f3ca..e88afb72488 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-authenfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.in.yaml b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.in.yaml index eef5dbfa36e..22460f60151 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.out.yaml b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.out.yaml index 01ef8b1283a..9cc518431ef 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-multi-match-multi-authenfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.in.yaml b/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.in.yaml index 5640fd55a44..3d14a3e87a4 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -15,7 +15,7 @@ gateways: namespaces: from: All httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.out.yaml b/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.out.yaml index 5da00005568..b278efea178 100644 --- a/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-valid-ratelimitfilter.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -41,7 +41,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.in.yaml b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.in.yaml index 91a92c15c6f..d61cae0499e 100644 --- a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.in.yaml +++ b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: All httpRoutes: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: default diff --git a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml index 27e12a73cd1..6f9a6e0f893 100644 --- a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.in.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.in.yaml index 7d7a3dd5b67..7315f3f4faa 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.in.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway @@ -14,7 +14,7 @@ gateways: namespaces: from: Same httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway @@ -30,7 +30,7 @@ httpRoutes: backendRefs: - name: service-1 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway @@ -49,7 +49,7 @@ httpRoutes: backendRefs: - name: service-1 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway @@ -70,7 +70,7 @@ httpRoutes: backendRefs: - name: service-1 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway @@ -88,7 +88,7 @@ httpRoutes: backendRefs: - name: service-2 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway @@ -109,7 +109,7 @@ httpRoutes: backendRefs: - name: service-1 port: 8080 -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml index 8a0a25fe207..83b255739cf 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null @@ -40,7 +40,7 @@ gateways: - group: gateway.networking.k8s.io kind: GRPCRoute httpRoutes: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -74,7 +74,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -111,7 +111,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -150,7 +150,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -186,7 +186,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null @@ -225,7 +225,7 @@ httpRoutes: parentRef: name: gateway-1 namespace: envoy-gateway -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.in.yaml b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.in.yaml index 92954ea1b89..ec0c3d12932 100644 --- a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.in.yaml +++ b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml index 4bf24e56fdc..20df52b004f 100644 --- a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml +++ b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.in.yaml b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.in.yaml index 71db6c0ece6..a10119662dd 100644 --- a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml index f7116969f2d..8e45df442d5 100644 --- a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-multiple.in.yaml b/internal/gatewayapi/testdata/tlsroute-multiple.in.yaml index 46222c6ce09..e7d44bece2b 100644 --- a/internal/gatewayapi/testdata/tlsroute-multiple.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-multiple.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml index 1ab0a53f0a7..77b25d4495f 100644 --- a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.in.yaml b/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.in.yaml index 38395404cd8..f37773dbd8d 100644 --- a/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.out.yaml b/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.out.yaml index f23f5631d37..2fac08a9c5e 100644 --- a/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-not-attaching-to-gateway-with-no-mode.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml index dbb0eb52d13..00e85a87370 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml index 4a800ecdff0..4264efe0bef 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.in.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.in.yaml index 39e8ba661de..76f60b0752e 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml index 7a4c2dd5c16..cb9f727850e 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.in.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.in.yaml index a91b6fdb83e..621f046a9b4 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.in.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml index 84a2283c2a6..414c6b8e574 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.in.yaml b/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.in.yaml index 81afa2331b1..26a91e256a0 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.in.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.in.yaml @@ -1,5 +1,5 @@ gateways: - - apiVersion: gateway.networking.k8s.io/v1beta1 + - apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: namespace: envoy-gateway diff --git a/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.out.yaml index a0a84118f77..0e48f934a10 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-listener-both-passthrough-and-cert-data.out.yaml @@ -1,5 +1,5 @@ gateways: -- apiVersion: gateway.networking.k8s.io/v1beta1 +- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: creationTimestamp: null diff --git a/internal/gatewayapi/tls.go b/internal/gatewayapi/tls.go index e9c9199e79f..177dbcdaa5a 100644 --- a/internal/gatewayapi/tls.go +++ b/internal/gatewayapi/tls.go @@ -11,12 +11,12 @@ import ( "fmt" corev1 "k8s.io/api/core/v1" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" ) // validateTLSSecretData ensures the cert and key provided in a secret // is not malformed and can be properly parsed -func validateTLSSecretsData(secrets []*corev1.Secret, host *v1beta1.Hostname) error { +func validateTLSSecretsData(secrets []*corev1.Secret, host *v1.Hostname) error { var publicKeyAlgorithm string var parseErr error @@ -81,7 +81,7 @@ func validateTLSSecretsData(secrets []*corev1.Secret, host *v1beta1.Hostname) er } // verifyHostname checks if the listener Hostname matches any domain in the certificate, returns a list of matched hosts. -func verifyHostname(cert *x509.Certificate, host *v1beta1.Hostname) ([]string, error) { +func verifyHostname(cert *x509.Certificate, host *v1.Hostname) ([]string, error) { var matchedHosts []string if len(cert.DNSNames) > 0 { diff --git a/internal/gatewayapi/tls_test.go b/internal/gatewayapi/tls_test.go index 94098730179..875a453d698 100644 --- a/internal/gatewayapi/tls_test.go +++ b/internal/gatewayapi/tls_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" ) const ( @@ -83,7 +83,7 @@ func TestValidateTLSSecretsData(t *testing.T) { Name string CertFile string KeyFile string - Domain v1beta1.Hostname + Domain v1.Hostname ExpectedErr error } diff --git a/internal/gatewayapi/translator.go b/internal/gatewayapi/translator.go index 13bee453da1..c449321c548 100644 --- a/internal/gatewayapi/translator.go +++ b/internal/gatewayapi/translator.go @@ -7,7 +7,7 @@ package gatewayapi import ( "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) @@ -46,7 +46,7 @@ var _ TranslatorManager = (*Translator)(nil) type TranslatorManager interface { Translate(resources *Resources) *TranslateResult - GetRelevantGateways(gateways []*v1beta1.Gateway) []*GatewayContext + GetRelevantGateways(gateways []*gwapiv1.Gateway) []*GatewayContext RoutesTranslator ListenersTranslator @@ -62,7 +62,7 @@ type Translator struct { // GatewayClassName is the name of the GatewayClass // to process Gateways for. - GatewayClassName v1beta1.ObjectName + GatewayClassName gwapiv1.ObjectName // GlobalRateLimitEnabled is true when global // ratelimiting has been configured by the admin. @@ -164,7 +164,7 @@ func (t *Translator) Translate(resources *Resources) *TranslateResult { // GetRelevantGateways returns GatewayContexts, containing a copy of the original // Gateway with the Listener statuses reset. -func (t *Translator) GetRelevantGateways(gateways []*v1beta1.Gateway) []*GatewayContext { +func (t *Translator) GetRelevantGateways(gateways []*gwapiv1.Gateway) []*GatewayContext { var relevant []*GatewayContext for _, gateway := range gateways { diff --git a/internal/gatewayapi/validate.go b/internal/gatewayapi/validate.go index 913d62b937d..d835dea1518 100644 --- a/internal/gatewayapi/validate.go +++ b/internal/gatewayapi/validate.go @@ -14,12 +14,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" - "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" + gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" ) -func (t *Translator) validateBackendRef(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, route RouteContext, - resources *Resources, backendNamespace string, routeKind v1beta1.Kind) bool { +func (t *Translator) validateBackendRef(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, route RouteContext, + resources *Resources, backendNamespace string, routeKind gwapiv1.Kind) bool { if !t.validateBackendRefGroup(backendRef, parentRef, route) { return false } @@ -50,12 +50,12 @@ func (t *Translator) validateBackendRef(backendRef *v1alpha2.BackendRef, parentR return true } -func (t *Translator) validateBackendRefGroup(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { +func (t *Translator) validateBackendRefGroup(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { if backendRef.Group != nil && *backendRef.Group != "" && *backendRef.Group != GroupMultiClusterService { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonInvalidKind, + gwapiv1.RouteReasonInvalidKind, fmt.Sprintf("Group is invalid, only the core API group (specified by omitting the group field or setting it to an empty string) and %s is supported", GroupMultiClusterService), ) return false @@ -63,12 +63,12 @@ func (t *Translator) validateBackendRefGroup(backendRef *v1alpha2.BackendRef, pa return true } -func (t *Translator) validateBackendRefKind(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { +func (t *Translator) validateBackendRefKind(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { if backendRef.Kind != nil && *backendRef.Kind != KindService && *backendRef.Kind != KindServiceImport { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonInvalidKind, + gwapiv1.RouteReasonInvalidKind, "Kind is invalid, only Service and MCS ServiceImport is supported", ) return false @@ -76,12 +76,12 @@ func (t *Translator) validateBackendRefKind(backendRef *v1alpha2.BackendRef, par return true } -func (t *Translator) validateBackendNamespace(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, route RouteContext, - resources *Resources, routeKind v1beta1.Kind) bool { +func (t *Translator) validateBackendNamespace(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, route RouteContext, + resources *Resources, routeKind gwapiv1.Kind) bool { if backendRef.Namespace != nil && string(*backendRef.Namespace) != "" && string(*backendRef.Namespace) != route.GetNamespace() { if !t.validateCrossNamespaceRef( crossNamespaceFrom{ - group: v1beta1.GroupName, + group: gwapiv1.GroupName, kind: string(routeKind), namespace: route.GetNamespace(), }, @@ -94,9 +94,9 @@ func (t *Translator) validateBackendNamespace(backendRef *v1alpha2.BackendRef, p resources.ReferenceGrants, ) { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonRefNotPermitted, + gwapiv1.RouteReasonRefNotPermitted, fmt.Sprintf("Backend ref to %s %s/%s not permitted by any ReferenceGrant.", KindDerefOr(backendRef.Kind, KindService), *backendRef.Namespace, backendRef.Name), ) return false @@ -105,10 +105,10 @@ func (t *Translator) validateBackendNamespace(backendRef *v1alpha2.BackendRef, p return true } -func (t *Translator) validateBackendPort(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { +func (t *Translator) validateBackendPort(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, route RouteContext) bool { if backendRef.Port == nil { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "PortNotSpecified", "A valid port number corresponding to a port on the Service must be specified", @@ -117,14 +117,14 @@ func (t *Translator) validateBackendPort(backendRef *v1alpha2.BackendRef, parent } return true } -func (t *Translator) validateBackendService(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, resources *Resources, +func (t *Translator) validateBackendService(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, resources *Resources, serviceNamespace string, route RouteContext, protocol v1.Protocol) bool { service := resources.GetService(serviceNamespace, string(backendRef.Name)) if service == nil { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonBackendNotFound, + gwapiv1.RouteReasonBackendNotFound, fmt.Sprintf("Service %s/%s not found", NamespaceDerefOr(backendRef.Namespace, route.GetNamespace()), string(backendRef.Name)), ) @@ -144,7 +144,7 @@ func (t *Translator) validateBackendService(backendRef *v1alpha2.BackendRef, par if !portFound { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "PortNotFound", fmt.Sprintf(string(protocol)+" Port %d not found on service %s/%s", *backendRef.Port, serviceNamespace, @@ -155,14 +155,14 @@ func (t *Translator) validateBackendService(backendRef *v1alpha2.BackendRef, par return true } -func (t *Translator) validateBackendServiceImport(backendRef *v1alpha2.BackendRef, parentRef *RouteParentContext, resources *Resources, +func (t *Translator) validateBackendServiceImport(backendRef *gwapiv1a2.BackendRef, parentRef *RouteParentContext, resources *Resources, serviceImportNamespace string, route RouteContext, protocol v1.Protocol) bool { serviceImport := resources.GetServiceImport(serviceImportNamespace, string(backendRef.Name)) if serviceImport == nil { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.RouteReasonBackendNotFound, + gwapiv1.RouteReasonBackendNotFound, fmt.Sprintf("ServiceImport %s/%s not found", NamespaceDerefOr(backendRef.Namespace, route.GetNamespace()), string(backendRef.Name)), ) @@ -182,7 +182,7 @@ func (t *Translator) validateBackendServiceImport(backendRef *v1alpha2.BackendRe if !portFound { parentRef.SetCondition(route, - v1beta1.RouteConditionResolvedRefs, + gwapiv1.RouteConditionResolvedRefs, metav1.ConditionFalse, "PortNotFound", fmt.Sprintf(string(protocol)+" Port %d not found on ServiceImport %s/%s", *backendRef.Port, serviceImportNamespace, @@ -196,42 +196,42 @@ func (t *Translator) validateBackendServiceImport(backendRef *v1alpha2.BackendRe func (t *Translator) validateListenerConditions(listener *ListenerContext) (isReady bool) { lConditions := listener.GetConditions() if len(lConditions) == 0 { - listener.SetCondition(v1beta1.ListenerConditionProgrammed, metav1.ConditionTrue, v1beta1.ListenerReasonProgrammed, + listener.SetCondition(gwapiv1.ListenerConditionProgrammed, metav1.ConditionTrue, gwapiv1.ListenerReasonProgrammed, "Sending translated listener configuration to the data plane") - listener.SetCondition(v1beta1.ListenerConditionAccepted, metav1.ConditionTrue, v1beta1.ListenerReasonAccepted, + listener.SetCondition(gwapiv1.ListenerConditionAccepted, metav1.ConditionTrue, gwapiv1.ListenerReasonAccepted, "Listener has been successfully translated") - listener.SetCondition(v1beta1.ListenerConditionResolvedRefs, metav1.ConditionTrue, v1beta1.ListenerReasonResolvedRefs, + listener.SetCondition(gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionTrue, gwapiv1.ListenerReasonResolvedRefs, "Listener references have been resolved") return true } // Any condition on the listener apart from Programmed=true indicates an error. - if !(lConditions[0].Type == string(v1beta1.ListenerConditionProgrammed) && lConditions[0].Status == metav1.ConditionTrue) { + if !(lConditions[0].Type == string(gwapiv1.ListenerConditionProgrammed) && lConditions[0].Status == metav1.ConditionTrue) { hasProgrammedCond := false hasRefsCond := false for _, existing := range lConditions { - if existing.Type == string(v1beta1.ListenerConditionProgrammed) { + if existing.Type == string(gwapiv1.ListenerConditionProgrammed) { hasProgrammedCond = true } - if existing.Type == string(v1beta1.ListenerConditionResolvedRefs) { + if existing.Type == string(gwapiv1.ListenerConditionResolvedRefs) { hasRefsCond = true } } // set "Programmed: false" if it's not set already. if !hasProgrammedCond { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, "Listener is invalid, see other Conditions for details.", ) } // set "ResolvedRefs: true" if it's not set already. if !hasRefsCond { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionTrue, - v1beta1.ListenerReasonResolvedRefs, + gwapiv1.ListenerReasonResolvedRefs, "Listener references have been resolved", ) } @@ -245,21 +245,21 @@ func (t *Translator) validateAllowedNamespaces(listener *ListenerContext) { if listener.AllowedRoutes != nil && listener.AllowedRoutes.Namespaces != nil && listener.AllowedRoutes.Namespaces.From != nil && - *listener.AllowedRoutes.Namespaces.From == v1beta1.NamespacesFromSelector { + *listener.AllowedRoutes.Namespaces.From == gwapiv1.NamespacesFromSelector { if listener.AllowedRoutes.Namespaces.Selector == nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, "The allowedRoutes.namespaces.selector field must be specified when allowedRoutes.namespaces.from is set to \"Selector\".", ) } else { selector, err := metav1.LabelSelectorAsSelector(listener.AllowedRoutes.Namespaces.Selector) if err != nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, fmt.Sprintf("The allowedRoutes.namespaces.selector could not be parsed: %v.", err), ) } @@ -272,9 +272,9 @@ func (t *Translator) validateAllowedNamespaces(listener *ListenerContext) { func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerContext, resources *Resources) []*v1.Secret { if len(listener.TLS.CertificateRefs) == 0 { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, "Listener must have at least 1 TLS certificate ref", ) return nil @@ -284,9 +284,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon for _, certificateRef := range listener.TLS.CertificateRefs { if certificateRef.Group != nil && string(*certificateRef.Group) != "" { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, "Listener's TLS certificate ref group must be unspecified/empty.", ) break @@ -294,9 +294,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon if certificateRef.Kind != nil && string(*certificateRef.Kind) != KindSecret { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, fmt.Sprintf("Listener's TLS certificate ref kind must be %s.", KindSecret), ) break @@ -307,7 +307,7 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon if certificateRef.Namespace != nil && string(*certificateRef.Namespace) != "" && string(*certificateRef.Namespace) != listener.gateway.Namespace { if !t.validateCrossNamespaceRef( crossNamespaceFrom{ - group: v1beta1.GroupName, + group: gwapiv1.GroupName, kind: KindGateway, namespace: listener.gateway.Namespace, }, @@ -320,9 +320,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon resources.ReferenceGrants, ) { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonRefNotPermitted, + gwapiv1.ListenerReasonRefNotPermitted, fmt.Sprintf("Certificate ref to secret %s/%s not permitted by any ReferenceGrant.", *certificateRef.Namespace, certificateRef.Name), ) break @@ -335,9 +335,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon if secret == nil { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, fmt.Sprintf("Secret %s/%s does not exist.", listener.gateway.Namespace, certificateRef.Name), ) break @@ -345,9 +345,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon if secret.Type != v1.SecretTypeTLS { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, fmt.Sprintf("Secret %s/%s must be of type %s.", listener.gateway.Namespace, certificateRef.Name, v1.SecretTypeTLS), ) break @@ -355,9 +355,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon if len(secret.Data[v1.TLSCertKey]) == 0 || len(secret.Data[v1.TLSPrivateKeyKey]) == 0 { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, fmt.Sprintf("Secret %s/%s must contain %s and %s.", listener.gateway.Namespace, certificateRef.Name, v1.TLSCertKey, v1.TLSPrivateKeyKey), ) break @@ -369,9 +369,9 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon err := validateTLSSecretsData(secrets, listener.Hostname) if err != nil { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidCertificateRef, + gwapiv1.ListenerReasonInvalidCertificateRef, fmt.Sprintf("Secret %s.", err.Error()), ) } @@ -381,29 +381,29 @@ func (t *Translator) validateTerminateModeAndGetTLSSecrets(listener *ListenerCon func (t *Translator) validateTLSConfiguration(listener *ListenerContext, resources *Resources) { switch listener.Protocol { - case v1beta1.HTTPProtocolType, v1beta1.UDPProtocolType, v1beta1.TCPProtocolType: + case gwapiv1.HTTPProtocolType, gwapiv1.UDPProtocolType, gwapiv1.TCPProtocolType: if listener.TLS != nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, fmt.Sprintf("Listener must not have TLS set when protocol is %s.", listener.Protocol), ) } - case v1beta1.HTTPSProtocolType: + case gwapiv1.HTTPSProtocolType: if listener.TLS == nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, fmt.Sprintf("Listener must have TLS set when protocol is %s.", listener.Protocol), ) break } - if listener.TLS.Mode != nil && *listener.TLS.Mode != v1beta1.TLSModeTerminate { + if listener.TLS.Mode != nil && *listener.TLS.Mode != gwapiv1.TLSModeTerminate { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, "UnsupportedTLSMode", fmt.Sprintf("TLS %s mode is not supported, TLS mode must be Terminate.", *listener.TLS.Mode), @@ -414,35 +414,35 @@ func (t *Translator) validateTLSConfiguration(listener *ListenerContext, resourc secrets := t.validateTerminateModeAndGetTLSSecrets(listener, resources) listener.SetTLSSecrets(secrets) - case v1beta1.TLSProtocolType: + case gwapiv1.TLSProtocolType: if listener.TLS == nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, fmt.Sprintf("Listener must have TLS set when protocol is %s.", listener.Protocol), ) break } - if listener.TLS.Mode != nil && *listener.TLS.Mode == v1beta1.TLSModePassthrough { + if listener.TLS.Mode != nil && *listener.TLS.Mode == gwapiv1.TLSModePassthrough { if len(listener.TLS.CertificateRefs) > 0 { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, "Listener must not have TLS certificate refs set for TLS mode Passthrough.", ) break } } - if listener.TLS.Mode != nil && *listener.TLS.Mode == v1beta1.TLSModeTerminate { + if listener.TLS.Mode != nil && *listener.TLS.Mode == gwapiv1.TLSModeTerminate { if len(listener.TLS.CertificateRefs) == 0 { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, "Listener must have TLS certificate refs set for TLS mode Terminate.", ) break @@ -454,41 +454,41 @@ func (t *Translator) validateTLSConfiguration(listener *ListenerContext, resourc } func (t *Translator) validateHostName(listener *ListenerContext) { - if listener.Protocol == v1beta1.UDPProtocolType || listener.Protocol == v1beta1.TCPProtocolType { + if listener.Protocol == gwapiv1.UDPProtocolType || listener.Protocol == gwapiv1.TCPProtocolType { if listener.Hostname != nil { listener.SetCondition( - v1beta1.ListenerConditionProgrammed, + gwapiv1.ListenerConditionProgrammed, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalid, + gwapiv1.ListenerReasonInvalid, fmt.Sprintf("Listener must not have hostname set when protocol is %s.", listener.Protocol), ) } } } -func (t *Translator) validateAllowedRoutes(listener *ListenerContext, routeKinds ...v1beta1.Kind) { - canSupportKinds := make([]v1beta1.RouteGroupKind, len(routeKinds)) +func (t *Translator) validateAllowedRoutes(listener *ListenerContext, routeKinds ...gwapiv1.Kind) { + canSupportKinds := make([]gwapiv1.RouteGroupKind, len(routeKinds)) for i, routeKind := range routeKinds { - canSupportKinds[i] = v1beta1.RouteGroupKind{Group: GroupPtr(v1beta1.GroupName), Kind: routeKind} + canSupportKinds[i] = gwapiv1.RouteGroupKind{Group: GroupPtr(gwapiv1.GroupName), Kind: routeKind} } if listener.AllowedRoutes == nil || len(listener.AllowedRoutes.Kinds) == 0 { listener.SetSupportedKinds(canSupportKinds...) return } - supportedRouteKinds := make([]v1beta1.Kind, 0) - supportedKinds := make([]v1beta1.RouteGroupKind, 0) - unSupportedKinds := make([]v1beta1.RouteGroupKind, 0) + supportedRouteKinds := make([]gwapiv1.Kind, 0) + supportedKinds := make([]gwapiv1.RouteGroupKind, 0) + unSupportedKinds := make([]gwapiv1.RouteGroupKind, 0) for _, kind := range listener.AllowedRoutes.Kinds { // if there is a group it must match `gateway.networking.k8s.io` - if kind.Group != nil && string(*kind.Group) != v1beta1.GroupName { + if kind.Group != nil && string(*kind.Group) != gwapiv1.GroupName { listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidRouteKinds, - fmt.Sprintf("Group is not supported, group must be %s", v1beta1.GroupName), + gwapiv1.ListenerReasonInvalidRouteKinds, + fmt.Sprintf("Group is not supported, group must be %s", gwapiv1.GroupName), ) continue } @@ -509,16 +509,16 @@ func (t *Translator) validateAllowedRoutes(listener *ListenerContext, routeKinds } for _, kind := range unSupportedKinds { - var printRouteKinds []v1beta1.Kind + var printRouteKinds []gwapiv1.Kind if len(supportedKinds) == 0 { printRouteKinds = routeKinds } else { printRouteKinds = supportedRouteKinds } listener.SetCondition( - v1beta1.ListenerConditionResolvedRefs, + gwapiv1.ListenerConditionResolvedRefs, metav1.ConditionFalse, - v1beta1.ListenerReasonInvalidRouteKinds, + gwapiv1.ListenerReasonInvalidRouteKinds, fmt.Sprintf("%s is not supported, kind must be one of %v", string(kind.Kind), printRouteKinds), ) } @@ -536,9 +536,9 @@ func (t *Translator) validateConflictedLayer7Listeners(gateways []*GatewayContex // Iterate through all layer-7 (HTTP, HTTPS, TLS) listeners and collect info about protocols // and hostnames per port. for _, gateway := range gateways { - portListenerInfo := map[v1beta1.PortNumber]*portListeners{} + portListenerInfo := map[gwapiv1.PortNumber]*portListeners{} for _, listener := range gateway.listeners { - if listener.Protocol == v1beta1.UDPProtocolType || listener.Protocol == v1beta1.TCPProtocolType { + if listener.Protocol == gwapiv1.UDPProtocolType || listener.Protocol == gwapiv1.TCPProtocolType { continue } if portListenerInfo[listener.Port] == nil { @@ -553,7 +553,7 @@ func (t *Translator) validateConflictedLayer7Listeners(gateways []*GatewayContex var protocol string switch listener.Protocol { // HTTPS and TLS can co-exist on the same port - case v1beta1.HTTPSProtocolType, v1beta1.TLSProtocolType: + case gwapiv1.HTTPSProtocolType, gwapiv1.TLSProtocolType: protocol = "https/tls" default: protocol = string(listener.Protocol) @@ -573,9 +573,9 @@ func (t *Translator) validateConflictedLayer7Listeners(gateways []*GatewayContex for _, listener := range info.listeners { if len(info.protocols) > 1 { listener.SetCondition( - v1beta1.ListenerConditionConflicted, + gwapiv1.ListenerConditionConflicted, metav1.ConditionTrue, - v1beta1.ListenerReasonProtocolConflict, + gwapiv1.ListenerReasonProtocolConflict, "All listeners for a given port must use a compatible protocol", ) } @@ -587,9 +587,9 @@ func (t *Translator) validateConflictedLayer7Listeners(gateways []*GatewayContex if info.hostnames[hostname] > 1 { listener.SetCondition( - v1beta1.ListenerConditionConflicted, + gwapiv1.ListenerConditionConflicted, metav1.ConditionTrue, - v1beta1.ListenerReasonHostnameConflict, + gwapiv1.ListenerReasonHostnameConflict, "All listeners for a given port must use a unique hostname", ) } @@ -598,10 +598,10 @@ func (t *Translator) validateConflictedLayer7Listeners(gateways []*GatewayContex } } -func (t *Translator) validateConflictedLayer4Listeners(gateways []*GatewayContext, protocols ...v1beta1.ProtocolType) { +func (t *Translator) validateConflictedLayer4Listeners(gateways []*GatewayContext, protocols ...gwapiv1.ProtocolType) { // Iterate through all layer-4(TCP UDP) listeners and check if there are more than one listener on the same port for _, gateway := range gateways { - portListenerInfo := map[v1beta1.PortNumber]*portListeners{} + portListenerInfo := map[gwapiv1.PortNumber]*portListeners{} for _, listener := range gateway.listeners { for _, protocol := range protocols { if listener.Protocol == protocol { @@ -618,9 +618,9 @@ func (t *Translator) validateConflictedLayer4Listeners(gateways []*GatewayContex if len(info.listeners) > 1 { for i := 1; i < len(info.listeners); i++ { info.listeners[i].SetCondition( - v1beta1.ListenerConditionConflicted, + gwapiv1.ListenerConditionConflicted, metav1.ConditionTrue, - v1beta1.ListenerReasonProtocolConflict, + gwapiv1.ListenerReasonProtocolConflict, fmt.Sprintf("Only one %s listener is allowed in a given port", strings.Join(protocolSliceToStringSlice(protocols), "/")), ) } @@ -629,7 +629,7 @@ func (t *Translator) validateConflictedLayer4Listeners(gateways []*GatewayContex } } -func (t *Translator) validateCrossNamespaceRef(from crossNamespaceFrom, to crossNamespaceTo, referenceGrants []*v1alpha2.ReferenceGrant) bool { +func (t *Translator) validateCrossNamespaceRef(from crossNamespaceFrom, to crossNamespaceTo, referenceGrants []*gwapiv1a2.ReferenceGrant) bool { for _, referenceGrant := range referenceGrants { // The ReferenceGrant must be defined in the namespace of // the "to" (the referent). diff --git a/internal/gatewayapi/zz_generated.deepcopy.go b/internal/gatewayapi/zz_generated.deepcopy.go deleted file mode 100644 index 9d09747b711..00000000000 --- a/internal/gatewayapi/zz_generated.deepcopy.go +++ /dev/null @@ -1,229 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -// Code generated by controller-gen. DO NOT EDIT. - -package gatewayapi - -import ( - apiv1alpha1 "github.com/envoyproxy/gateway/api/v1alpha1" - "k8s.io/api/core/v1" - discoveryv1 "k8s.io/api/discovery/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" - "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Resources) DeepCopyInto(out *Resources) { - *out = *in - if in.GatewayClass != nil { - in, out := &in.GatewayClass, &out.GatewayClass - *out = new(v1beta1.GatewayClass) - (*in).DeepCopyInto(*out) - } - if in.Gateways != nil { - in, out := &in.Gateways, &out.Gateways - *out = make([]*v1beta1.Gateway, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1beta1.Gateway) - (*in).DeepCopyInto(*out) - } - } - } - if in.HTTPRoutes != nil { - in, out := &in.HTTPRoutes, &out.HTTPRoutes - *out = make([]*v1beta1.HTTPRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1beta1.HTTPRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.GRPCRoutes != nil { - in, out := &in.GRPCRoutes, &out.GRPCRoutes - *out = make([]*v1alpha2.GRPCRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha2.GRPCRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.TLSRoutes != nil { - in, out := &in.TLSRoutes, &out.TLSRoutes - *out = make([]*v1alpha2.TLSRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha2.TLSRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.TCPRoutes != nil { - in, out := &in.TCPRoutes, &out.TCPRoutes - *out = make([]*v1alpha2.TCPRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha2.TCPRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.UDPRoutes != nil { - in, out := &in.UDPRoutes, &out.UDPRoutes - *out = make([]*v1alpha2.UDPRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha2.UDPRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.ReferenceGrants != nil { - in, out := &in.ReferenceGrants, &out.ReferenceGrants - *out = make([]*v1alpha2.ReferenceGrant, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha2.ReferenceGrant) - (*in).DeepCopyInto(*out) - } - } - } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]*v1.Namespace, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1.Namespace) - (*in).DeepCopyInto(*out) - } - } - } - if in.Services != nil { - in, out := &in.Services, &out.Services - *out = make([]*v1.Service, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1.Service) - (*in).DeepCopyInto(*out) - } - } - } - if in.ServiceImports != nil { - in, out := &in.ServiceImports, &out.ServiceImports - *out = make([]*v1alpha1.ServiceImport, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1alpha1.ServiceImport) - (*in).DeepCopyInto(*out) - } - } - } - if in.EndpointSlices != nil { - in, out := &in.EndpointSlices, &out.EndpointSlices - *out = make([]*discoveryv1.EndpointSlice, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(discoveryv1.EndpointSlice) - (*in).DeepCopyInto(*out) - } - } - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]*v1.Secret, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(v1.Secret) - (*in).DeepCopyInto(*out) - } - } - } - if in.AuthenticationFilters != nil { - in, out := &in.AuthenticationFilters, &out.AuthenticationFilters - *out = make([]*apiv1alpha1.AuthenticationFilter, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(apiv1alpha1.AuthenticationFilter) - (*in).DeepCopyInto(*out) - } - } - } - if in.RateLimitFilters != nil { - in, out := &in.RateLimitFilters, &out.RateLimitFilters - *out = make([]*apiv1alpha1.RateLimitFilter, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(apiv1alpha1.RateLimitFilter) - (*in).DeepCopyInto(*out) - } - } - } - if in.EnvoyProxy != nil { - in, out := &in.EnvoyProxy, &out.EnvoyProxy - *out = new(apiv1alpha1.EnvoyProxy) - (*in).DeepCopyInto(*out) - } - if in.ExtensionRefFilters != nil { - in, out := &in.ExtensionRefFilters, &out.ExtensionRefFilters - *out = make([]unstructured.Unstructured, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EnvoyPatchPolicies != nil { - in, out := &in.EnvoyPatchPolicies, &out.EnvoyPatchPolicies - *out = make([]*apiv1alpha1.EnvoyPatchPolicy, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(apiv1alpha1.EnvoyPatchPolicy) - (*in).DeepCopyInto(*out) - } - } - } - if in.ClientTrafficPolicies != nil { - in, out := &in.ClientTrafficPolicies, &out.ClientTrafficPolicies - *out = make([]*apiv1alpha1.ClientTrafficPolicy, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(apiv1alpha1.ClientTrafficPolicy) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources. -func (in *Resources) DeepCopy() *Resources { - if in == nil { - return nil - } - out := new(Resources) - in.DeepCopyInto(out) - return out -} diff --git a/internal/infrastructure/kubernetes/proxy_infra_test.go b/internal/infrastructure/kubernetes/proxy_infra_test.go index d73d313a46f..9d3d2fe98ea 100644 --- a/internal/infrastructure/kubernetes/proxy_infra_test.go +++ b/internal/infrastructure/kubernetes/proxy_infra_test.go @@ -17,7 +17,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" @@ -56,7 +56,7 @@ func newTestInfraWithClient(t *testing.T, cli client.Client) *Infra { Redis: &egv1a1.RateLimitRedisSettings{ URL: "", TLS: &egv1a1.RedisTLSSettings{ - CertificateRef: &gwapiv1b1.SecretObjectReference{ + CertificateRef: &gwapiv1.SecretObjectReference{ Name: "ratelimit-cert", }, }, diff --git a/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go b/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go index 29fb4cbde75..02d8df7254c 100644 --- a/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go +++ b/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go @@ -17,7 +17,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/pointer" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/yaml" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -298,7 +298,7 @@ func TestDeployment(t *testing.T) { Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", TLS: &egv1a1.RedisTLSSettings{ - CertificateRef: &gwapiv1b1.SecretObjectReference{ + CertificateRef: &gwapiv1.SecretObjectReference{ Name: "ratelimit-cert", }, }, @@ -352,7 +352,7 @@ func TestDeployment(t *testing.T) { Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", TLS: &egv1a1.RedisTLSSettings{ - CertificateRef: &gwapiv1b1.SecretObjectReference{ + CertificateRef: &gwapiv1.SecretObjectReference{ Name: "ratelimit-cert", }, }, @@ -414,7 +414,7 @@ func TestDeployment(t *testing.T) { Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", TLS: &egv1a1.RedisTLSSettings{ - CertificateRef: &gwapiv1b1.SecretObjectReference{ + CertificateRef: &gwapiv1.SecretObjectReference{ Name: "ratelimit-cert-origin", }, }, diff --git a/internal/ir/zz_generated.deepcopy.go b/internal/ir/zz_generated.deepcopy.go deleted file mode 100644 index ec9ad1aa952..00000000000 --- a/internal/ir/zz_generated.deepcopy.go +++ /dev/null @@ -1,1151 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -// Code generated by controller-gen. DO NOT EDIT. - -package ir - -import ( - "github.com/envoyproxy/gateway/api/v1alpha1" - "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessLog) DeepCopyInto(out *AccessLog) { - *out = *in - if in.Text != nil { - in, out := &in.Text, &out.Text - *out = make([]*TextAccessLog, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(TextAccessLog) - (*in).DeepCopyInto(*out) - } - } - } - if in.JSON != nil { - in, out := &in.JSON, &out.JSON - *out = make([]*JSONAccessLog, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(JSONAccessLog) - (*in).DeepCopyInto(*out) - } - } - } - if in.OpenTelemetry != nil { - in, out := &in.OpenTelemetry, &out.OpenTelemetry - *out = make([]*OpenTelemetryAccessLog, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(OpenTelemetryAccessLog) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLog. -func (in *AccessLog) DeepCopy() *AccessLog { - if in == nil { - return nil - } - out := new(AccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddHeader) DeepCopyInto(out *AddHeader) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddHeader. -func (in *AddHeader) DeepCopy() *AddHeader { - if in == nil { - return nil - } - out := new(AddHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DestinationEndpoint) DeepCopyInto(out *DestinationEndpoint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationEndpoint. -func (in *DestinationEndpoint) DeepCopy() *DestinationEndpoint { - if in == nil { - return nil - } - out := new(DestinationEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DestinationSetting) DeepCopyInto(out *DestinationSetting) { - *out = *in - if in.Weight != nil { - in, out := &in.Weight, &out.Weight - *out = new(uint32) - **out = **in - } - if in.Endpoints != nil { - in, out := &in.Endpoints, &out.Endpoints - *out = make([]*DestinationEndpoint, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(DestinationEndpoint) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationSetting. -func (in *DestinationSetting) DeepCopy() *DestinationSetting { - if in == nil { - return nil - } - out := new(DestinationSetting) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DirectResponse) DeepCopyInto(out *DirectResponse) { - *out = *in - if in.Body != nil { - in, out := &in.Body, &out.Body - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DirectResponse. -func (in *DirectResponse) DeepCopy() *DirectResponse { - if in == nil { - return nil - } - out := new(DirectResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicy) DeepCopyInto(out *EnvoyPatchPolicy) { - *out = *in - in.EnvoyPatchPolicyStatus.DeepCopyInto(&out.EnvoyPatchPolicyStatus) - if in.JSONPatches != nil { - in, out := &in.JSONPatches, &out.JSONPatches - *out = make([]*JSONPatchConfig, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(JSONPatchConfig) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicy. -func (in *EnvoyPatchPolicy) DeepCopy() *EnvoyPatchPolicy { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicyStatus) DeepCopyInto(out *EnvoyPatchPolicyStatus) { - *out = *in - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(v1alpha1.EnvoyPatchPolicyStatus) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyStatus. -func (in *EnvoyPatchPolicyStatus) DeepCopy() *EnvoyPatchPolicyStatus { - if in == nil { - return nil - } - out := new(EnvoyPatchPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRateLimit) DeepCopyInto(out *GlobalRateLimit) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]*RateLimitRule, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(RateLimitRule) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. -func (in *GlobalRateLimit) DeepCopy() *GlobalRateLimit { - if in == nil { - return nil - } - out := new(GlobalRateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPListener) DeepCopyInto(out *HTTPListener) { - *out = *in - if in.Hostnames != nil { - in, out := &in.Hostnames, &out.Hostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = make([]*TLSListenerConfig, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(TLSListenerConfig) - (*in).DeepCopyInto(*out) - } - } - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]*HTTPRoute, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(HTTPRoute) - (*in).DeepCopyInto(*out) - } - } - } - if in.TCPKeepalive != nil { - in, out := &in.TCPKeepalive, &out.TCPKeepalive - *out = new(TCPKeepalive) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPListener. -func (in *HTTPListener) DeepCopy() *HTTPListener { - if in == nil { - return nil - } - out := new(HTTPListener) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPPathModifier) DeepCopyInto(out *HTTPPathModifier) { - *out = *in - if in.FullReplace != nil { - in, out := &in.FullReplace, &out.FullReplace - *out = new(string) - **out = **in - } - if in.PrefixMatchReplace != nil { - in, out := &in.PrefixMatchReplace, &out.PrefixMatchReplace - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPathModifier. -func (in *HTTPPathModifier) DeepCopy() *HTTPPathModifier { - if in == nil { - return nil - } - out := new(HTTPPathModifier) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPRoute) DeepCopyInto(out *HTTPRoute) { - *out = *in - if in.PathMatch != nil { - in, out := &in.PathMatch, &out.PathMatch - *out = new(StringMatch) - (*in).DeepCopyInto(*out) - } - if in.HeaderMatches != nil { - in, out := &in.HeaderMatches, &out.HeaderMatches - *out = make([]*StringMatch, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(StringMatch) - (*in).DeepCopyInto(*out) - } - } - } - if in.QueryParamMatches != nil { - in, out := &in.QueryParamMatches, &out.QueryParamMatches - *out = make([]*StringMatch, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(StringMatch) - (*in).DeepCopyInto(*out) - } - } - } - out.BackendWeights = in.BackendWeights - if in.AddRequestHeaders != nil { - in, out := &in.AddRequestHeaders, &out.AddRequestHeaders - *out = make([]AddHeader, len(*in)) - copy(*out, *in) - } - if in.RemoveRequestHeaders != nil { - in, out := &in.RemoveRequestHeaders, &out.RemoveRequestHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AddResponseHeaders != nil { - in, out := &in.AddResponseHeaders, &out.AddResponseHeaders - *out = make([]AddHeader, len(*in)) - copy(*out, *in) - } - if in.RemoveResponseHeaders != nil { - in, out := &in.RemoveResponseHeaders, &out.RemoveResponseHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DirectResponse != nil { - in, out := &in.DirectResponse, &out.DirectResponse - *out = new(DirectResponse) - (*in).DeepCopyInto(*out) - } - if in.Redirect != nil { - in, out := &in.Redirect, &out.Redirect - *out = new(Redirect) - (*in).DeepCopyInto(*out) - } - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]*RouteDestination, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(RouteDestination) - (*in).DeepCopyInto(*out) - } - } - } - if in.Destination != nil { - in, out := &in.Destination, &out.Destination - *out = new(RouteDestination) - (*in).DeepCopyInto(*out) - } - if in.URLRewrite != nil { - in, out := &in.URLRewrite, &out.URLRewrite - *out = new(URLRewrite) - (*in).DeepCopyInto(*out) - } - if in.RateLimit != nil { - in, out := &in.RateLimit, &out.RateLimit - *out = new(RateLimit) - (*in).DeepCopyInto(*out) - } - if in.RequestAuthentication != nil { - in, out := &in.RequestAuthentication, &out.RequestAuthentication - *out = new(RequestAuthentication) - (*in).DeepCopyInto(*out) - } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - if in.ExtensionRefs != nil { - in, out := &in.ExtensionRefs, &out.ExtensionRefs - *out = make([]*UnstructuredRef, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(UnstructuredRef) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRoute. -func (in *HTTPRoute) DeepCopy() *HTTPRoute { - if in == nil { - return nil - } - out := new(HTTPRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Infra) DeepCopyInto(out *Infra) { - *out = *in - if in.Proxy != nil { - in, out := &in.Proxy, &out.Proxy - *out = new(ProxyInfra) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Infra. -func (in *Infra) DeepCopy() *Infra { - if in == nil { - return nil - } - out := new(Infra) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InfraMetadata) DeepCopyInto(out *InfraMetadata) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfraMetadata. -func (in *InfraMetadata) DeepCopy() *InfraMetadata { - if in == nil { - return nil - } - out := new(InfraMetadata) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONAccessLog) DeepCopyInto(out *JSONAccessLog) { - *out = *in - if in.JSON != nil { - in, out := &in.JSON, &out.JSON - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONAccessLog. -func (in *JSONAccessLog) DeepCopy() *JSONAccessLog { - if in == nil { - return nil - } - out := new(JSONAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONPatchConfig) DeepCopyInto(out *JSONPatchConfig) { - *out = *in - in.Operation.DeepCopyInto(&out.Operation) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatchConfig. -func (in *JSONPatchConfig) DeepCopy() *JSONPatchConfig { - if in == nil { - return nil - } - out := new(JSONPatchConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONPatchOperation) DeepCopyInto(out *JSONPatchOperation) { - *out = *in - in.Value.DeepCopyInto(&out.Value) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatchOperation. -func (in *JSONPatchOperation) DeepCopy() *JSONPatchOperation { - if in == nil { - return nil - } - out := new(JSONPatchOperation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JwtRequestAuthentication) DeepCopyInto(out *JwtRequestAuthentication) { - *out = *in - if in.Providers != nil { - in, out := &in.Providers, &out.Providers - *out = make([]v1alpha1.JwtAuthenticationFilterProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JwtRequestAuthentication. -func (in *JwtRequestAuthentication) DeepCopy() *JwtRequestAuthentication { - if in == nil { - return nil - } - out := new(JwtRequestAuthentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ListenerPort) DeepCopyInto(out *ListenerPort) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerPort. -func (in *ListenerPort) DeepCopy() *ListenerPort { - if in == nil { - return nil - } - out := new(ListenerPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Metrics) DeepCopyInto(out *Metrics) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics. -func (in *Metrics) DeepCopy() *Metrics { - if in == nil { - return nil - } - out := new(Metrics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryAccessLog) DeepCopyInto(out *OpenTelemetryAccessLog) { - *out = *in - if in.Text != nil { - in, out := &in.Text, &out.Text - *out = new(string) - **out = **in - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryAccessLog. -func (in *OpenTelemetryAccessLog) DeepCopy() *OpenTelemetryAccessLog { - if in == nil { - return nil - } - out := new(OpenTelemetryAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyInfra) DeepCopyInto(out *ProxyInfra) { - *out = *in - if in.Metadata != nil { - in, out := &in.Metadata, &out.Metadata - *out = new(InfraMetadata) - (*in).DeepCopyInto(*out) - } - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(v1alpha1.EnvoyProxy) - (*in).DeepCopyInto(*out) - } - if in.Listeners != nil { - in, out := &in.Listeners, &out.Listeners - *out = make([]ProxyListener, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyInfra. -func (in *ProxyInfra) DeepCopy() *ProxyInfra { - if in == nil { - return nil - } - out := new(ProxyInfra) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyListener) DeepCopyInto(out *ProxyListener) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ListenerPort, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyListener. -func (in *ProxyListener) DeepCopy() *ProxyListener { - if in == nil { - return nil - } - out := new(ProxyListener) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimit) DeepCopyInto(out *RateLimit) { - *out = *in - if in.Global != nil { - in, out := &in.Global, &out.Global - *out = new(GlobalRateLimit) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimit. -func (in *RateLimit) DeepCopy() *RateLimit { - if in == nil { - return nil - } - out := new(RateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitRule) DeepCopyInto(out *RateLimitRule) { - *out = *in - if in.HeaderMatches != nil { - in, out := &in.HeaderMatches, &out.HeaderMatches - *out = make([]*StringMatch, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(StringMatch) - (*in).DeepCopyInto(*out) - } - } - } - if in.CIDRMatch != nil { - in, out := &in.CIDRMatch, &out.CIDRMatch - *out = new(CIDRMatch) - **out = **in - } - if in.Limit != nil { - in, out := &in.Limit, &out.Limit - *out = new(RateLimitValue) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitRule. -func (in *RateLimitRule) DeepCopy() *RateLimitRule { - if in == nil { - return nil - } - out := new(RateLimitRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitValue) DeepCopyInto(out *RateLimitValue) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitValue. -func (in *RateLimitValue) DeepCopy() *RateLimitValue { - if in == nil { - return nil - } - out := new(RateLimitValue) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Redirect) DeepCopyInto(out *Redirect) { - *out = *in - if in.Scheme != nil { - in, out := &in.Scheme, &out.Scheme - *out = new(string) - **out = **in - } - if in.Hostname != nil { - in, out := &in.Hostname, &out.Hostname - *out = new(string) - **out = **in - } - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(HTTPPathModifier) - (*in).DeepCopyInto(*out) - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(uint32) - **out = **in - } - if in.StatusCode != nil { - in, out := &in.StatusCode, &out.StatusCode - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Redirect. -func (in *Redirect) DeepCopy() *Redirect { - if in == nil { - return nil - } - out := new(Redirect) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestAuthentication) DeepCopyInto(out *RequestAuthentication) { - *out = *in - if in.JWT != nil { - in, out := &in.JWT, &out.JWT - *out = new(JwtRequestAuthentication) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestAuthentication. -func (in *RequestAuthentication) DeepCopy() *RequestAuthentication { - if in == nil { - return nil - } - out := new(RequestAuthentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteDestination) DeepCopyInto(out *RouteDestination) { - *out = *in - if in.Settings != nil { - in, out := &in.Settings, &out.Settings - *out = make([]*DestinationSetting, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(DestinationSetting) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination. -func (in *RouteDestination) DeepCopy() *RouteDestination { - if in == nil { - return nil - } - out := new(RouteDestination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StringMatch) DeepCopyInto(out *StringMatch) { - *out = *in - if in.Exact != nil { - in, out := &in.Exact, &out.Exact - *out = new(string) - **out = **in - } - if in.Prefix != nil { - in, out := &in.Prefix, &out.Prefix - *out = new(string) - **out = **in - } - if in.Suffix != nil { - in, out := &in.Suffix, &out.Suffix - *out = new(string) - **out = **in - } - if in.SafeRegex != nil { - in, out := &in.SafeRegex, &out.SafeRegex - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch. -func (in *StringMatch) DeepCopy() *StringMatch { - if in == nil { - return nil - } - out := new(StringMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TCPKeepalive) DeepCopyInto(out *TCPKeepalive) { - *out = *in - if in.Probes != nil { - in, out := &in.Probes, &out.Probes - *out = new(uint32) - **out = **in - } - if in.IdleTime != nil { - in, out := &in.IdleTime, &out.IdleTime - *out = new(uint32) - **out = **in - } - if in.Interval != nil { - in, out := &in.Interval, &out.Interval - *out = new(uint32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPKeepalive. -func (in *TCPKeepalive) DeepCopy() *TCPKeepalive { - if in == nil { - return nil - } - out := new(TCPKeepalive) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TCPListener) DeepCopyInto(out *TCPListener) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(TLS) - (*in).DeepCopyInto(*out) - } - if in.Destination != nil { - in, out := &in.Destination, &out.Destination - *out = new(RouteDestination) - (*in).DeepCopyInto(*out) - } - if in.TCPKeepalive != nil { - in, out := &in.TCPKeepalive, &out.TCPKeepalive - *out = new(TCPKeepalive) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPListener. -func (in *TCPListener) DeepCopy() *TCPListener { - if in == nil { - return nil - } - out := new(TCPListener) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLS) DeepCopyInto(out *TLS) { - *out = *in - if in.Passthrough != nil { - in, out := &in.Passthrough, &out.Passthrough - *out = new(TLSInspectorConfig) - (*in).DeepCopyInto(*out) - } - if in.Terminate != nil { - in, out := &in.Terminate, &out.Terminate - *out = make([]*TLSListenerConfig, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(TLSListenerConfig) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS. -func (in *TLS) DeepCopy() *TLS { - if in == nil { - return nil - } - out := new(TLS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSInspectorConfig) DeepCopyInto(out *TLSInspectorConfig) { - *out = *in - if in.SNIs != nil { - in, out := &in.SNIs, &out.SNIs - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSInspectorConfig. -func (in *TLSInspectorConfig) DeepCopy() *TLSInspectorConfig { - if in == nil { - return nil - } - out := new(TLSInspectorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSListenerConfig) DeepCopyInto(out *TLSListenerConfig) { - *out = *in - if in.ServerCertificate != nil { - in, out := &in.ServerCertificate, &out.ServerCertificate - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.PrivateKey != nil { - in, out := &in.PrivateKey, &out.PrivateKey - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSListenerConfig. -func (in *TLSListenerConfig) DeepCopy() *TLSListenerConfig { - if in == nil { - return nil - } - out := new(TLSListenerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TextAccessLog) DeepCopyInto(out *TextAccessLog) { - *out = *in - if in.Format != nil { - in, out := &in.Format, &out.Format - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TextAccessLog. -func (in *TextAccessLog) DeepCopy() *TextAccessLog { - if in == nil { - return nil - } - out := new(TextAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Tracing) DeepCopyInto(out *Tracing) { - *out = *in - in.ProxyTracing.DeepCopyInto(&out.ProxyTracing) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tracing. -func (in *Tracing) DeepCopy() *Tracing { - if in == nil { - return nil - } - out := new(Tracing) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UDPListener) DeepCopyInto(out *UDPListener) { - *out = *in - if in.Destination != nil { - in, out := &in.Destination, &out.Destination - *out = new(RouteDestination) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPListener. -func (in *UDPListener) DeepCopy() *UDPListener { - if in == nil { - return nil - } - out := new(UDPListener) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *URLRewrite) DeepCopyInto(out *URLRewrite) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(HTTPPathModifier) - (*in).DeepCopyInto(*out) - } - if in.Hostname != nil { - in, out := &in.Hostname, &out.Hostname - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new URLRewrite. -func (in *URLRewrite) DeepCopy() *URLRewrite { - if in == nil { - return nil - } - out := new(URLRewrite) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UnstructuredRef) DeepCopyInto(out *UnstructuredRef) { - *out = *in - if in.Object != nil { - in, out := &in.Object, &out.Object - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnstructuredRef. -func (in *UnstructuredRef) DeepCopy() *UnstructuredRef { - if in == nil { - return nil - } - out := new(UnstructuredRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Xds) DeepCopyInto(out *Xds) { - *out = *in - if in.AccessLog != nil { - in, out := &in.AccessLog, &out.AccessLog - *out = new(AccessLog) - (*in).DeepCopyInto(*out) - } - if in.Tracing != nil { - in, out := &in.Tracing, &out.Tracing - *out = new(Tracing) - (*in).DeepCopyInto(*out) - } - if in.Metrics != nil { - in, out := &in.Metrics, &out.Metrics - *out = new(Metrics) - **out = **in - } - if in.HTTP != nil { - in, out := &in.HTTP, &out.HTTP - *out = make([]*HTTPListener, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(HTTPListener) - (*in).DeepCopyInto(*out) - } - } - } - if in.TCP != nil { - in, out := &in.TCP, &out.TCP - *out = make([]*TCPListener, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(TCPListener) - (*in).DeepCopyInto(*out) - } - } - } - if in.UDP != nil { - in, out := &in.UDP, &out.UDP - *out = make([]*UDPListener, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(UDPListener) - (*in).DeepCopyInto(*out) - } - } - } - if in.EnvoyPatchPolicies != nil { - in, out := &in.EnvoyPatchPolicies, &out.EnvoyPatchPolicies - *out = make([]*EnvoyPatchPolicy, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(EnvoyPatchPolicy) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Xds. -func (in *Xds) DeepCopy() *Xds { - if in == nil { - return nil - } - out := new(Xds) - in.DeepCopyInto(out) - return out -} diff --git a/internal/kubernetes/secret.go b/internal/kubernetes/secret.go index 9a269c501e5..700c9b8a4d6 100644 --- a/internal/kubernetes/secret.go +++ b/internal/kubernetes/secret.go @@ -13,13 +13,13 @@ import ( corev1 "k8s.io/api/core/v1" k8smachinery "k8s.io/apimachinery/pkg/types" k8sclient "sigs.k8s.io/controller-runtime/pkg/client" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/internal/gatewayapi" ) // ValidateSecretObjectReference validate secret object reference for extension tls and ratelimit tls settings. -func ValidateSecretObjectReference(ctx context.Context, client k8sclient.Client, secretObjRef *gwapiv1b1.SecretObjectReference, namespace string) (*corev1.Secret, string, error) { +func ValidateSecretObjectReference(ctx context.Context, client k8sclient.Client, secretObjRef *gwapiv1.SecretObjectReference, namespace string) (*corev1.Secret, string, error) { if (secretObjRef.Group == nil || *secretObjRef.Group == corev1.GroupName) && (secretObjRef.Kind == nil || *secretObjRef.Kind == gatewayapi.KindSecret) { secret := &corev1.Secret{} diff --git a/internal/message/types.go b/internal/message/types.go index 7b38a5afa6e..4500ebf3950 100644 --- a/internal/message/types.go +++ b/internal/message/types.go @@ -8,8 +8,8 @@ package message import ( "github.com/telepresenceio/watchable" "k8s.io/apimachinery/pkg/types" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -59,8 +59,8 @@ func (p *ProviderResources) Close() { // GatewayAPIStatuses contains gateway API resources statuses type GatewayAPIStatuses struct { - GatewayStatuses watchable.Map[types.NamespacedName, *gwapiv1b1.GatewayStatus] - HTTPRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1b1.HTTPRouteStatus] + GatewayStatuses watchable.Map[types.NamespacedName, *gwapiv1.GatewayStatus] + HTTPRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1.HTTPRouteStatus] GRPCRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1a2.GRPCRouteStatus] TLSRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1a2.TLSRouteStatus] TCPRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1a2.TCPRouteStatus] diff --git a/internal/provider/kubernetes/controller.go b/internal/provider/kubernetes/controller.go index dc7f1b3e6d1..042067ab862 100644 --- a/internal/provider/kubernetes/controller.go +++ b/internal/provider/kubernetes/controller.go @@ -25,8 +25,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -64,7 +64,7 @@ type gatewayAPIReconciler struct { client client.Client log logging.Logger statusUpdater status.Updater - classController gwapiv1b1.GatewayController + classController gwapiv1.GatewayController store *kubernetesProviderStore namespace string namespaceLabels []string @@ -101,7 +101,7 @@ func newGatewayAPIController(mgr manager.Manager, cfg *config.Server, su status. r := &gatewayAPIReconciler{ client: mgr.GetClient(), log: cfg.Logger, - classController: gwapiv1b1.GatewayController(cfg.EnvoyGateway.Gateway.ControllerName), + classController: gwapiv1.GatewayController(cfg.EnvoyGateway.Gateway.ControllerName), namespace: cfg.Namespace, namespaceLabels: namespaceLabels, statusUpdater: su, @@ -131,7 +131,7 @@ type resourceMappings struct { // Map for storing namespaces for Route, Service and Gateway objects. allAssociatedNamespaces map[string]struct{} // Map for storing backendRefs' NamespaceNames referred by various Route objects. - allAssociatedBackendRefs map[gwapiv1b1.BackendObjectReference]struct{} + allAssociatedBackendRefs map[gwapiv1.BackendObjectReference]struct{} // Map for storing referenceGrant NamespaceNames for BackendRefs, SecretRefs. allAssociatedRefGrants map[types.NamespacedName]*gwapiv1a2.ReferenceGrant // authenFilters is a map of AuthenticationFilters, where the key is the @@ -149,7 +149,7 @@ type resourceMappings struct { func newResourceMapping() *resourceMappings { return &resourceMappings{ allAssociatedNamespaces: map[string]struct{}{}, - allAssociatedBackendRefs: map[gwapiv1b1.BackendObjectReference]struct{}{}, + allAssociatedBackendRefs: map[gwapiv1.BackendObjectReference]struct{}{}, allAssociatedRefGrants: map[types.NamespacedName]*gwapiv1a2.ReferenceGrant{}, authenFilters: map[types.NamespacedName]*egv1a1.AuthenticationFilter{}, rateLimitFilters: map[types.NamespacedName]*egv1a1.RateLimitFilter{}, @@ -163,7 +163,7 @@ func newResourceMapping() *resourceMappings { func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Request) (reconcile.Result, error) { r.log.Info("reconciling gateways") - var gatewayClasses gwapiv1b1.GatewayClassList + var gatewayClasses gwapiv1.GatewayClassList if err := r.client.List(ctx, &gatewayClasses); err != nil { return reconcile.Result{}, fmt.Errorf("error listing gatewayclasses: %v", err) } @@ -324,14 +324,14 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques // Process the parametersRef of the accepted GatewayClass. if err := r.processParamsRef(ctx, acceptedGC, resourceTree); err != nil { msg := fmt.Sprintf("%s: %v", status.MsgGatewayClassInvalidParams, err) - if err := r.gatewayClassUpdater(ctx, acceptedGC, false, string(gwapiv1b1.GatewayClassReasonInvalidParameters), msg); err != nil { + if err := r.gatewayClassUpdater(ctx, acceptedGC, false, string(gwapiv1.GatewayClassReasonInvalidParameters), msg); err != nil { r.log.Error(err, "unable to update GatewayClass status") } r.log.Error(err, "failed to process parametersRef for gatewayclass", "name", acceptedGC.Name) return reconcile.Result{}, err } - if err := r.gatewayClassUpdater(ctx, acceptedGC, true, string(gwapiv1b1.GatewayClassReasonAccepted), status.MsgValidGatewayClass); err != nil { + if err := r.gatewayClassUpdater(ctx, acceptedGC, true, string(gwapiv1.GatewayClassReasonAccepted), status.MsgValidGatewayClass); err != nil { r.log.Error(err, "unable to update GatewayClass status") return reconcile.Result{}, err } @@ -363,13 +363,13 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques return reconcile.Result{}, nil } -func (r *gatewayAPIReconciler) gatewayClassUpdater(ctx context.Context, gc *gwapiv1b1.GatewayClass, accepted bool, reason, msg string) error { +func (r *gatewayAPIReconciler) gatewayClassUpdater(ctx context.Context, gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) error { if r.statusUpdater != nil { r.statusUpdater.Send(status.Update{ NamespacedName: types.NamespacedName{Name: gc.Name}, - Resource: &gwapiv1b1.GatewayClass{}, + Resource: &gwapiv1.GatewayClass{}, Mutator: status.MutatorFunc(func(obj client.Object) client.Object { - gc, ok := obj.(*gwapiv1b1.GatewayClass) + gc, ok := obj.(*gwapiv1.GatewayClass) if !ok { panic(fmt.Sprintf("unsupported object type %T", obj)) } @@ -398,7 +398,7 @@ func (r *gatewayAPIReconciler) getNamespace(ctx context.Context, name string) (* return ns, nil } -func (r *gatewayAPIReconciler) statusUpdateForGateway(ctx context.Context, gtw *gwapiv1b1.Gateway) { +func (r *gatewayAPIReconciler) statusUpdateForGateway(ctx context.Context, gtw *gwapiv1.Gateway) { // nil check for unit tests. if r.statusUpdater == nil { return @@ -427,9 +427,9 @@ func (r *gatewayAPIReconciler) statusUpdateForGateway(ctx context.Context, gtw * // publish status r.statusUpdater.Send(status.Update{ NamespacedName: key, - Resource: new(gwapiv1b1.Gateway), + Resource: new(gwapiv1.Gateway), Mutator: status.MutatorFunc(func(obj client.Object) client.Object { - g, ok := obj.(*gwapiv1b1.Gateway) + g, ok := obj.(*gwapiv1.Gateway) if !ok { panic(fmt.Sprintf("unsupported object type %T", obj)) } @@ -482,10 +482,10 @@ func (r *gatewayAPIReconciler) findReferenceGrant(ctx context.Context, from, to return nil, nil } -func (r *gatewayAPIReconciler) processGateways(ctx context.Context, acceptedGC *gwapiv1b1.GatewayClass, resourceMap *resourceMappings, resourceTree *gatewayapi.Resources) error { +func (r *gatewayAPIReconciler) processGateways(ctx context.Context, acceptedGC *gwapiv1.GatewayClass, resourceMap *resourceMappings, resourceTree *gatewayapi.Resources) error { // Find gateways for the acceptedGC // Find the Gateways that reference this Class. - gatewayList := &gwapiv1b1.GatewayList{} + gatewayList := &gwapiv1.GatewayList{} if err := r.client.List(ctx, gatewayList, &client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(classGatewayIndex, acceptedGC.Name), }); err != nil { @@ -495,7 +495,7 @@ func (r *gatewayAPIReconciler) processGateways(ctx context.Context, acceptedGC * gateways := gatewayList.Items if len(r.namespaceLabels) != 0 { - var gtws []gwapiv1b1.Gateway + var gtws []gwapiv1.Gateway for _, gtw := range gateways { ns := gtw.GetNamespace() ok, err := r.checkObjectNamespaceLabels(ns) @@ -597,7 +597,7 @@ func (r *gatewayAPIReconciler) processGateways(ctx context.Context, acceptedGC * // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer - gtw.Status = gwapiv1b1.GatewayStatus{} + gtw.Status = gwapiv1.GatewayStatus{} resourceTree.Gateways = append(resourceTree.Gateways, >w) } return nil @@ -624,26 +624,26 @@ func addReferenceGrantIndexers(ctx context.Context, mgr manager.Manager) error { // `.spec.rules[].filters`. This helps in querying for HTTPRoutes that are affected by a // particular AuthenticationFilter CRUD. func addHTTPRouteIndexers(ctx context.Context, mgr manager.Manager) error { - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.HTTPRoute{}, gatewayHTTPRouteIndex, gatewayHTTPRouteIndexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.HTTPRoute{}, gatewayHTTPRouteIndex, gatewayHTTPRouteIndexFunc); err != nil { return err } - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc); err != nil { return err } - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.HTTPRoute{}, authenFilterHTTPRouteIndex, authenFilterHTTPRouteIndexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.HTTPRoute{}, authenFilterHTTPRouteIndex, authenFilterHTTPRouteIndexFunc); err != nil { return err } - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.HTTPRoute{}, rateLimitFilterHTTPRouteIndex, rateLimitFilterHTTPRouteIndexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.HTTPRoute{}, rateLimitFilterHTTPRouteIndex, rateLimitFilterHTTPRouteIndexFunc); err != nil { return err } return nil } func authenFilterHTTPRouteIndexFunc(rawObj client.Object) []string { - httproute := rawObj.(*gwapiv1b1.HTTPRoute) + httproute := rawObj.(*gwapiv1.HTTPRoute) var filters []string for _, rule := range httproute.Spec.Rules { for i := range rule.Filters { @@ -664,7 +664,7 @@ func authenFilterHTTPRouteIndexFunc(rawObj client.Object) []string { } func rateLimitFilterHTTPRouteIndexFunc(rawObj client.Object) []string { - httproute := rawObj.(*gwapiv1b1.HTTPRoute) + httproute := rawObj.(*gwapiv1.HTTPRoute) var filters []string for _, rule := range httproute.Spec.Rules { for i := range rule.Filters { @@ -685,7 +685,7 @@ func rateLimitFilterHTTPRouteIndexFunc(rawObj client.Object) []string { } func gatewayHTTPRouteIndexFunc(rawObj client.Object) []string { - httproute := rawObj.(*gwapiv1b1.HTTPRoute) + httproute := rawObj.(*gwapiv1.HTTPRoute) var gateways []string for _, parent := range httproute.Spec.ParentRefs { if parent.Kind == nil || string(*parent.Kind) == gatewayapi.KindGateway { @@ -703,7 +703,7 @@ func gatewayHTTPRouteIndexFunc(rawObj client.Object) []string { } func backendHTTPRouteIndexFunc(rawObj client.Object) []string { - httproute := rawObj.(*gwapiv1b1.HTTPRoute) + httproute := rawObj.(*gwapiv1.HTTPRoute) var backendRefs []string for _, rule := range httproute.Spec.Rules { for _, backend := range rule.BackendRefs { @@ -979,12 +979,12 @@ func backendUDPRouteIndexFunc(rawObj client.Object) []string { // referenced in Gateway objects. This helps in querying for Gateways that are // affected by a particular Secret CRUD. func addGatewayIndexers(ctx context.Context, mgr manager.Manager) error { - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.Gateway{}, secretGatewayIndex, secretGatewayIndexFunc); err != nil { + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.Gateway{}, secretGatewayIndex, secretGatewayIndexFunc); err != nil { return err } - if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1b1.Gateway{}, classGatewayIndex, func(rawObj client.Object) []string { - gateway := rawObj.(*gwapiv1b1.Gateway) + if err := mgr.GetFieldIndexer().IndexField(ctx, &gwapiv1.Gateway{}, classGatewayIndex, func(rawObj client.Object) []string { + gateway := rawObj.(*gwapiv1.Gateway) return []string{string(gateway.Spec.GatewayClassName)} }); err != nil { return err @@ -993,10 +993,10 @@ func addGatewayIndexers(ctx context.Context, mgr manager.Manager) error { } func secretGatewayIndexFunc(rawObj client.Object) []string { - gateway := rawObj.(*gwapiv1b1.Gateway) + gateway := rawObj.(*gwapiv1.Gateway) var secretReferences []string for _, listener := range gateway.Spec.Listeners { - if listener.TLS == nil || *listener.TLS.Mode != gwapiv1b1.TLSModeTerminate { + if listener.TLS == nil || *listener.TLS.Mode != gwapiv1.TLSModeTerminate { continue } for _, cert := range listener.TLS.CertificateRefs { @@ -1018,7 +1018,7 @@ func secretGatewayIndexFunc(rawObj client.Object) []string { // addGcFinalizer adds the gatewayclass or envoyproxy finalizer to the provided object, if it doesn't exist. func (r *gatewayAPIReconciler) addFinalizer(ctx context.Context, obj client.Object) error { switch objType := obj.(type) { - case *gwapiv1b1.GatewayClass: + case *gwapiv1.GatewayClass: if !slice.ContainsString(objType.Finalizers, gatewayClassFinalizer) { base := client.MergeFrom(objType.DeepCopy()) objType.Finalizers = append(objType.Finalizers, gatewayClassFinalizer) @@ -1044,7 +1044,7 @@ func (r *gatewayAPIReconciler) addFinalizer(ctx context.Context, obj client.Obje // removeFinalizer removes the gatewayclass or envoyproxy finalizer from the provided object, if it exists. func (r *gatewayAPIReconciler) removeFinalizer(ctx context.Context, obj client.Object) error { switch objType := obj.(type) { - case *gwapiv1b1.GatewayClass: + case *gwapiv1.GatewayClass: if slice.ContainsString(objType.Finalizers, gatewayClassFinalizer) { base := client.MergeFrom(objType.DeepCopy()) objType.Finalizers = slice.RemoveString(objType.Finalizers, gatewayClassFinalizer) @@ -1073,13 +1073,13 @@ func (r *gatewayAPIReconciler) subscribeAndUpdateStatus(ctx context.Context) { // Gateway object status updater go func() { message.HandleSubscription(r.resources.GatewayStatuses.Subscribe(ctx), - func(update message.Update[types.NamespacedName, *gwapiv1b1.GatewayStatus]) { + func(update message.Update[types.NamespacedName, *gwapiv1.GatewayStatus]) { // skip delete updates. if update.Delete { return } // Get gateway object - gtw := new(gwapiv1b1.Gateway) + gtw := new(gwapiv1.Gateway) if err := r.client.Get(ctx, update.Key, gtw); err != nil { r.log.Error(err, "gateway not found", "namespace", gtw.Namespace, "name", gtw.Name) return @@ -1095,7 +1095,7 @@ func (r *gatewayAPIReconciler) subscribeAndUpdateStatus(ctx context.Context) { // HTTPRoute object status updater go func() { message.HandleSubscription(r.resources.HTTPRouteStatuses.Subscribe(ctx), - func(update message.Update[types.NamespacedName, *gwapiv1b1.HTTPRouteStatus]) { + func(update message.Update[types.NamespacedName, *gwapiv1.HTTPRouteStatus]) { // skip delete updates. if update.Delete { return @@ -1104,9 +1104,9 @@ func (r *gatewayAPIReconciler) subscribeAndUpdateStatus(ctx context.Context) { val := update.Value r.statusUpdater.Send(status.Update{ NamespacedName: key, - Resource: new(gwapiv1b1.HTTPRoute), + Resource: new(gwapiv1.HTTPRoute), Mutator: status.MutatorFunc(func(obj client.Object) client.Object { - h, ok := obj.(*gwapiv1b1.HTTPRoute) + h, ok := obj.(*gwapiv1.HTTPRoute) if !ok { panic(fmt.Sprintf("unsupported object type %T", obj)) } @@ -1293,7 +1293,7 @@ func (r *gatewayAPIReconciler) subscribeAndUpdateStatus(ctx context.Context) { // watchResources watches gateway api resources. func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.Manager, c controller.Controller) error { if err := c.Watch( - source.Kind(mgr.GetCache(), &gwapiv1b1.GatewayClass{}), + source.Kind(mgr.GetCache(), &gwapiv1.GatewayClass{}), handler.EnqueueRequestsFromMapFunc(r.enqueueClass), predicate.NewPredicateFuncs(r.hasMatchingController), ); err != nil { @@ -1322,7 +1322,7 @@ func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.M gPredicates = append(gPredicates, predicate.NewPredicateFuncs(r.hasMatchingNamespaceLabels)) } if err := c.Watch( - source.Kind(mgr.GetCache(), &gwapiv1b1.Gateway{}), + source.Kind(mgr.GetCache(), &gwapiv1.Gateway{}), handler.EnqueueRequestsFromMapFunc(r.enqueueClass), gPredicates..., ); err != nil { @@ -1338,7 +1338,7 @@ func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.M httprPredicates = append(httprPredicates, predicate.NewPredicateFuncs(r.hasMatchingNamespaceLabels)) } if err := c.Watch( - source.Kind(mgr.GetCache(), &gwapiv1b1.HTTPRoute{}), + source.Kind(mgr.GetCache(), &gwapiv1.HTTPRoute{}), handler.EnqueueRequestsFromMapFunc(r.enqueueClass), httprPredicates..., ); err != nil { @@ -1607,7 +1607,7 @@ func (r *gatewayAPIReconciler) hasManagedClass(obj client.Object) bool { return false } - gcList := new(gwapiv1b1.GatewayClassList) + gcList := new(gwapiv1.GatewayClassList) err := r.client.List(context.TODO(), gcList) if err != nil { r.log.Error(err, "failed to list gatewayclasses") @@ -1628,7 +1628,7 @@ func (r *gatewayAPIReconciler) hasManagedClass(obj client.Object) bool { } // processParamsRef processes the parametersRef of the provided GatewayClass. -func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1b1.GatewayClass, resourceTree *gatewayapi.Resources) error { +func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1.GatewayClass, resourceTree *gatewayapi.Resources) error { if gc.Spec.ParametersRef != nil { if !refsEnvoyProxy(gc) { return fmt.Errorf("unsupported parametersRef for gatewayclass %s", gc.Name) diff --git a/internal/provider/kubernetes/controller_test.go b/internal/provider/kubernetes/controller_test.go index d6374c96645..18f9d251020 100644 --- a/internal/provider/kubernetes/controller_test.go +++ b/internal/provider/kubernetes/controller_test.go @@ -14,7 +14,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" @@ -26,16 +26,16 @@ import ( func TestAddGatewayClassFinalizer(t *testing.T) { testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass expect []string }{ { name: "gatewayclass with no finalizers", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -43,12 +43,12 @@ func TestAddGatewayClassFinalizer(t *testing.T) { }, { name: "gatewayclass with a different finalizer", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", Finalizers: []string{"fooFinalizer"}, }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -56,12 +56,12 @@ func TestAddGatewayClassFinalizer(t *testing.T) { }, { name: "gatewayclass with existing gatewayclass finalizer", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", Finalizers: []string{gatewayClassFinalizer}, }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -198,16 +198,16 @@ func TestRemoveEnvoyProxyFinalizer(t *testing.T) { func TestRemoveGatewayClassFinalizer(t *testing.T) { testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass expect []string }{ { name: "gatewayclass with no finalizers", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -215,12 +215,12 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { }, { name: "gatewayclass with a different finalizer", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", Finalizers: []string{"fooFinalizer"}, }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -228,12 +228,12 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { }, { name: "gatewayclass with existing gatewayclass finalizer", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", Finalizers: []string{gatewayClassFinalizer}, }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, }, @@ -260,12 +260,12 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { } func TestHasManagedClass(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string ep client.Object - classes []*gwapiv1b1.GatewayClass + classes []*gwapiv1.GatewayClass expected bool }{ { @@ -276,24 +276,24 @@ func TestHasManagedClass(t *testing.T) { Name: "test-envoyproxy", }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "SomeOtherController", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, }, @@ -310,24 +310,24 @@ func TestHasManagedClass(t *testing.T) { Name: "test-envoyproxy", }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, }, @@ -344,12 +344,12 @@ func TestHasManagedClass(t *testing.T) { Name: "test-envoyproxy", }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ControllerName: gcCtrlName}, + Spec: gwapiv1.GatewayClassSpec{ControllerName: gcCtrlName}, }, }, expected: false, @@ -362,24 +362,24 @@ func TestHasManagedClass(t *testing.T) { Name: "test-envoyproxy", }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "test-gc1", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, }, @@ -389,19 +389,19 @@ func TestHasManagedClass(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "test-gc2", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, }, }, @@ -445,25 +445,25 @@ func TestHasManagedClass(t *testing.T) { } func TestProcessParamsRef(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass ep *egv1a1.EnvoyProxy expected bool }{ { name: "valid envoyproxy reference", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -480,15 +480,15 @@ func TestProcessParamsRef(t *testing.T) { }, { name: "envoyproxy kind does not exist", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -498,15 +498,15 @@ func TestProcessParamsRef(t *testing.T) { }, { name: "referenced envoyproxy does not exist", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "non-exist", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -522,15 +522,15 @@ func TestProcessParamsRef(t *testing.T) { }, { name: "invalid gatewayclass parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group("UnSupportedGroup"), - Kind: gwapiv1b1.Kind("UnSupportedKind"), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group("UnSupportedGroup"), + Kind: gwapiv1.Kind("UnSupportedKind"), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, diff --git a/internal/provider/kubernetes/helpers.go b/internal/provider/kubernetes/helpers.go index 0eb497f1c35..40bcc964536 100644 --- a/internal/provider/kubernetes/helpers.go +++ b/internal/provider/kubernetes/helpers.go @@ -13,7 +13,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -23,7 +23,7 @@ import ( ) const ( - gatewayClassFinalizer = gwapiv1b1.GatewayClassFinalizerGatewaysExist + gatewayClassFinalizer = gwapiv1.GatewayClassFinalizerGatewaysExist ) type ObjectKindNamespacedName struct { @@ -36,16 +36,16 @@ type ObjectKindNamespacedName struct { // referenced Gateways managed by Envoy Gateway. The only supported parentRef // is a Gateway. func validateParentRefs(ctx context.Context, client client.Client, namespace string, - gatewayClassController gwapiv1b1.GatewayController, - routeParentReferences []gwapiv1b1.ParentReference) ([]gwapiv1b1.Gateway, error) { + gatewayClassController gwapiv1.GatewayController, + routeParentReferences []gwapiv1.ParentReference) ([]gwapiv1.Gateway, error) { - var gateways []gwapiv1b1.Gateway + var gateways []gwapiv1.Gateway for i := range routeParentReferences { ref := routeParentReferences[i] if ref.Kind != nil && *ref.Kind != "Gateway" { return nil, fmt.Errorf("invalid Kind %q", *ref.Kind) } - if ref.Group != nil && *ref.Group != gwapiv1b1.GroupName { + if ref.Group != nil && *ref.Group != gwapiv1.GroupName { return nil, fmt.Errorf("invalid Group %q", *ref.Group) } @@ -60,13 +60,13 @@ func validateParentRefs(ctx context.Context, client client.Client, namespace str Name: string(ref.Name), } - gw := new(gwapiv1b1.Gateway) + gw := new(gwapiv1.Gateway) if err := client.Get(ctx, gwKey, gw); err != nil { return nil, fmt.Errorf("failed to get gateway %s/%s: %v", gwKey.Namespace, gwKey.Name, err) } gcKey := types.NamespacedName{Name: string(gw.Spec.GatewayClassName)} - gc := new(gwapiv1b1.GatewayClass) + gc := new(gwapiv1.GatewayClass) if err := client.Get(ctx, gcKey, gc); err != nil { return nil, fmt.Errorf("failed to get gatewayclass %s: %v", gcKey.Name, err) } @@ -80,15 +80,15 @@ func validateParentRefs(ctx context.Context, client client.Client, namespace str type controlledClasses struct { // matchedClasses holds all GatewayClass objects with matching controllerName. - matchedClasses []*gwapiv1b1.GatewayClass + matchedClasses []*gwapiv1.GatewayClass // oldestClass stores the first GatewayClass encountered with matching // controllerName. This is maintained so that the oldestClass does not change // during reboots. - oldestClass *gwapiv1b1.GatewayClass + oldestClass *gwapiv1.GatewayClass } -func (cc *controlledClasses) addMatch(gc *gwapiv1b1.GatewayClass) { +func (cc *controlledClasses) addMatch(gc *gwapiv1.GatewayClass) { cc.matchedClasses = append(cc.matchedClasses, gc) switch { @@ -102,7 +102,7 @@ func (cc *controlledClasses) addMatch(gc *gwapiv1b1.GatewayClass) { } } -func (cc *controlledClasses) removeMatch(gc *gwapiv1b1.GatewayClass) { +func (cc *controlledClasses) removeMatch(gc *gwapiv1.GatewayClass) { // First remove gc from matchedClasses. for i, matchedGC := range cc.matchedClasses { if matchedGC.Name == gc.Name { @@ -133,12 +133,12 @@ func (cc *controlledClasses) removeMatch(gc *gwapiv1b1.GatewayClass) { } } -func (cc *controlledClasses) acceptedClass() *gwapiv1b1.GatewayClass { +func (cc *controlledClasses) acceptedClass() *gwapiv1.GatewayClass { return cc.oldestClass } -func (cc *controlledClasses) notAcceptedClasses() []*gwapiv1b1.GatewayClass { - var res []*gwapiv1b1.GatewayClass +func (cc *controlledClasses) notAcceptedClasses() []*gwapiv1.GatewayClass { + var res []*gwapiv1.GatewayClass for _, gc := range cc.matchedClasses { // skip the oldest one since it will be accepted. if gc.Name != cc.oldestClass.Name { @@ -151,12 +151,12 @@ func (cc *controlledClasses) notAcceptedClasses() []*gwapiv1b1.GatewayClass { // isAccepted returns true if the provided gatewayclass contains the Accepted=true // status condition. -func isAccepted(gc *gwapiv1b1.GatewayClass) bool { +func isAccepted(gc *gwapiv1.GatewayClass) bool { if gc == nil { return false } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -164,8 +164,8 @@ func isAccepted(gc *gwapiv1b1.GatewayClass) bool { } // gatewaysOfClass returns a list of gateways that reference gc from the provided gwList. -func gatewaysOfClass(gc *gwapiv1b1.GatewayClass, gwList *gwapiv1b1.GatewayList) []gwapiv1b1.Gateway { - var gateways []gwapiv1b1.Gateway +func gatewaysOfClass(gc *gwapiv1.GatewayClass, gwList *gwapiv1.GatewayList) []gwapiv1.Gateway { + var gateways []gwapiv1.Gateway if gwList == nil || gc == nil { return gateways } @@ -180,29 +180,29 @@ func gatewaysOfClass(gc *gwapiv1b1.GatewayClass, gwList *gwapiv1b1.GatewayList) // terminatesTLS returns true if the provided gateway contains a listener configured // for TLS termination. -func terminatesTLS(listener *gwapiv1b1.Listener) bool { +func terminatesTLS(listener *gwapiv1.Listener) bool { if listener.TLS != nil && - (listener.Protocol == gwapiv1b1.HTTPSProtocolType || - listener.Protocol == gwapiv1b1.TLSProtocolType) && + (listener.Protocol == gwapiv1.HTTPSProtocolType || + listener.Protocol == gwapiv1.TLSProtocolType) && listener.TLS.Mode != nil && - *listener.TLS.Mode == gwapiv1b1.TLSModeTerminate { + *listener.TLS.Mode == gwapiv1.TLSModeTerminate { return true } return false } // refsSecret returns true if ref refers to a Secret. -func refsSecret(ref *gwapiv1b1.SecretObjectReference) bool { +func refsSecret(ref *gwapiv1.SecretObjectReference) bool { return (ref.Group == nil || *ref.Group == corev1.GroupName) && (ref.Kind == nil || *ref.Kind == gatewayapi.KindSecret) } -func infraServiceName(gateway *gwapiv1b1.Gateway) string { +func infraServiceName(gateway *gwapiv1.Gateway) string { infraName := utils.GetHashedName(fmt.Sprintf("%s/%s", gateway.Namespace, gateway.Name)) return fmt.Sprintf("%s-%s", config.EnvoyPrefix, infraName) } -func infraDeploymentName(gateway *gwapiv1b1.Gateway) string { +func infraDeploymentName(gateway *gwapiv1.Gateway) string { infraName := utils.GetHashedName(fmt.Sprintf("%s/%s", gateway.Namespace, gateway.Name)) return fmt.Sprintf("%s-%s", config.EnvoyPrefix, infraName) } @@ -212,7 +212,7 @@ func infraDeploymentName(gateway *gwapiv1b1.Gateway) string { // - Validating weights. // - Validating ports. // - Referencing HTTPRoutes. -func validateBackendRef(ref *gwapiv1b1.BackendRef) error { +func validateBackendRef(ref *gwapiv1.BackendRef) error { switch { case ref == nil: return nil @@ -227,7 +227,7 @@ func validateBackendRef(ref *gwapiv1b1.BackendRef) error { } // classRefsEnvoyProxy returns true if the provided GatewayClass references the provided EnvoyProxy. -func classRefsEnvoyProxy(gc *gwapiv1b1.GatewayClass, ep *egv1a1.EnvoyProxy) bool { +func classRefsEnvoyProxy(gc *gwapiv1.GatewayClass, ep *egv1a1.EnvoyProxy) bool { if gc == nil || ep == nil { return false } @@ -238,7 +238,7 @@ func classRefsEnvoyProxy(gc *gwapiv1b1.GatewayClass, ep *egv1a1.EnvoyProxy) bool } // refsEnvoyProxy returns true if the provided GatewayClass references an EnvoyProxy. -func refsEnvoyProxy(gc *gwapiv1b1.GatewayClass) bool { +func refsEnvoyProxy(gc *gwapiv1.GatewayClass) bool { if gc == nil { return false } @@ -251,13 +251,13 @@ func refsEnvoyProxy(gc *gwapiv1b1.GatewayClass) bool { } // classAccepted returns true if the provided GatewayClass is accepted. -func classAccepted(gc *gwapiv1b1.GatewayClass) bool { +func classAccepted(gc *gwapiv1.GatewayClass) bool { if gc == nil { return false } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } diff --git a/internal/provider/kubernetes/helpers_test.go b/internal/provider/kubernetes/helpers_test.go index be30d2a5171..1d88c38f0e2 100644 --- a/internal/provider/kubernetes/helpers_test.go +++ b/internal/provider/kubernetes/helpers_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" @@ -19,26 +19,26 @@ import ( ) func TestGatewaysOfClass(t *testing.T) { - gc := &gwapiv1b1.GatewayClass{ + gc := &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, } testCases := []struct { name string - gws []gwapiv1b1.Gateway + gws []gwapiv1.Gateway expect int }{ { name: "no matching gateways", - gws: []gwapiv1b1.Gateway{ + gws: []gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName("no-match"), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName("no-match"), }, }, { @@ -46,8 +46,8 @@ func TestGatewaysOfClass(t *testing.T) { Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName("no-match2"), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName("no-match2"), }, }, }, @@ -55,14 +55,14 @@ func TestGatewaysOfClass(t *testing.T) { }, { name: "one of two matching gateways", - gws: []gwapiv1b1.Gateway{ + gws: []gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), }, }, { @@ -70,8 +70,8 @@ func TestGatewaysOfClass(t *testing.T) { Name: "test2", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName("no-match"), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName("no-match"), }, }, }, @@ -79,14 +79,14 @@ func TestGatewaysOfClass(t *testing.T) { }, { name: "two of two matching gateways", - gws: []gwapiv1b1.Gateway{ + gws: []gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), }, }, { @@ -94,8 +94,8 @@ func TestGatewaysOfClass(t *testing.T) { Name: "test2", Namespace: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), }, }, }, @@ -106,7 +106,7 @@ func TestGatewaysOfClass(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - gwList := &gwapiv1b1.GatewayList{Items: tc.gws} + gwList := &gwapiv1.GatewayList{Items: tc.gws} actual := gatewaysOfClass(gc, gwList) require.Equal(t, tc.expect, len(actual)) }) @@ -116,22 +116,22 @@ func TestGatewaysOfClass(t *testing.T) { func TestIsGatewayClassAccepted(t *testing.T) { testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass expect bool }{ { name: "gatewayclass accepted condition", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, }, @@ -141,17 +141,17 @@ func TestIsGatewayClassAccepted(t *testing.T) { }, { name: "gatewayclass not accepted condition", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, }, }, @@ -161,14 +161,14 @@ func TestIsGatewayClassAccepted(t *testing.T) { }, { name: "no gatewayclass accepted condition type", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { Type: "SomeOtherType", @@ -195,13 +195,13 @@ func TestIsGatewayClassAccepted(t *testing.T) { } func TestGatewayOldestClass(t *testing.T) { - createGatewayClass := func(name string, creationTime time.Time) *gwapiv1b1.GatewayClass { - return &gwapiv1b1.GatewayClass{ + createGatewayClass := func(name string, creationTime time.Time) *gwapiv1.GatewayClass { + return &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: name, CreationTimestamp: metav1.NewTime(creationTime), }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: egv1a1.GatewayControllerName, }, } @@ -291,7 +291,7 @@ func TestGatewayOldestClass(t *testing.T) { func TestRefsEnvoyProxy(t *testing.T) { testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass expect bool }{ { @@ -301,16 +301,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "valid envoyproxy parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -320,12 +320,12 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "unspecified parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", }, }, @@ -333,16 +333,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "unsupported group parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group("Unsupported"), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group("Unsupported"), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -352,16 +352,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "unsupported group parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind("Unsupported"), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind("Unsupported"), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -371,16 +371,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "unsupported group parameters ref", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind("Unsupported"), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind("Unsupported"), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -390,16 +390,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "empty parameters ref name", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -409,16 +409,16 @@ func TestRefsEnvoyProxy(t *testing.T) { }, { name: "unspecified parameters ref namespace", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: "test", - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test", }, }, @@ -437,11 +437,11 @@ func TestRefsEnvoyProxy(t *testing.T) { } func TestClassRefsEnvoyProxy(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass ep *egv1a1.EnvoyProxy expected bool }{ @@ -453,15 +453,15 @@ func TestClassRefsEnvoyProxy(t *testing.T) { }, { name: "gatewayclass references envoyproxy", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -477,15 +477,15 @@ func TestClassRefsEnvoyProxy(t *testing.T) { }, { name: "gatewayclass does not reference envoyproxy", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "not-test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -501,15 +501,15 @@ func TestClassRefsEnvoyProxy(t *testing.T) { }, { name: "gatewayclass references invalid kind", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind("UnsupportedKind"), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind("UnsupportedKind"), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -525,15 +525,15 @@ func TestClassRefsEnvoyProxy(t *testing.T) { }, { name: "gatewayclass references invalid group", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group("UnsupportedGroup"), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group("UnsupportedGroup"), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -549,15 +549,15 @@ func TestClassRefsEnvoyProxy(t *testing.T) { }, { name: "gatewayclass references envoyproxy without namespace", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, - ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + ParametersRef: &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", }, }, @@ -585,11 +585,11 @@ func TestClassRefsEnvoyProxy(t *testing.T) { } func TestClassAccepted(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string - gc *gwapiv1b1.GatewayClass + gc *gwapiv1.GatewayClass expected bool }{ { @@ -599,17 +599,17 @@ func TestClassAccepted(t *testing.T) { }, { name: "gatewayclass accepted", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, }, @@ -619,17 +619,17 @@ func TestClassAccepted(t *testing.T) { }, { name: "gatewayclass not accepted", - gc: &gwapiv1b1.GatewayClass{ + gc: &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test-gc", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, }, - Status: gwapiv1b1.GatewayClassStatus{ + Status: gwapiv1.GatewayClassStatus{ Conditions: []metav1.Condition{ { - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, }, }, diff --git a/internal/provider/kubernetes/kubernetes_test.go b/internal/provider/kubernetes/kubernetes_test.go index 7158fd477cf..01f05f34a73 100644 --- a/internal/provider/kubernetes/kubernetes_test.go +++ b/internal/provider/kubernetes/kubernetes_test.go @@ -28,8 +28,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" @@ -132,7 +132,7 @@ func testGatewayClassAcceptedStatus(ctx context.Context, t *testing.T, provider } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -170,9 +170,9 @@ func testGatewayClassWithParamRef(ctx context.Context, t *testing.T, provider *P }() gc := test.GetGatewayClass("gc-with-param-ref", egv1a1.GatewayControllerName) - gc.Spec.ParametersRef = &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), + gc.Spec.ParametersRef = &gwapiv1.ParametersReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindEnvoyProxy), Name: epName, Namespace: gatewayapi.NamespacePtr(testNs), } @@ -189,7 +189,7 @@ func testGatewayClassWithParamRef(ctx context.Context, t *testing.T, provider *P } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -230,7 +230,7 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -246,18 +246,18 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test-gw-of-class"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "scheduled-status-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -326,7 +326,7 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro for _, cond := range gw.Status.Conditions { fmt.Printf("Condition: %v\n", cond) - if cond.Type == string(gwapiv1b1.GatewayConditionAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayConditionAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -383,7 +383,7 @@ func testLongNameHashedResources(ctx context.Context, t *testing.T, provider *Pr } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -399,18 +399,18 @@ func testLongNameHashedResources(ctx context.Context, t *testing.T, provider *Pr ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "envoy-gateway"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "gatewaywithaverylongnamethatwillresultinhashedresources", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -427,7 +427,7 @@ func testLongNameHashedResources(ctx context.Context, t *testing.T, provider *Pr for _, cond := range gw.Status.Conditions { fmt.Printf("Condition: %v\n", cond) - if cond.Type == string(gwapiv1b1.GatewayConditionProgrammed) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayConditionProgrammed) && cond.Status == metav1.ConditionTrue { ready = true } } @@ -485,7 +485,7 @@ func testRateLimitFilter(ctx context.Context, t *testing.T, provider *Provider, } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -501,18 +501,18 @@ func testRateLimitFilter(ctx context.Context, t *testing.T, provider *Provider, ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "ratelimit-test"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "ratelimit-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -544,50 +544,50 @@ func testRateLimitFilter(ctx context.Context, t *testing.T, provider *Provider, var testCases = []struct { name string - route gwapiv1b1.HTTPRoute + route gwapiv1.HTTPRoute }{ { name: "ratelimit-test-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "ratelimit-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/ratelimitfilter/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindRateLimitFilter), - Name: gwapiv1b1.ObjectName("ratelimit-test"), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindRateLimitFilter), + Name: gwapiv1.ObjectName("ratelimit-test"), }, }, }, @@ -661,7 +661,7 @@ func testAuthenFilter(ctx context.Context, t *testing.T, provider *Provider, res } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -677,18 +677,18 @@ func testAuthenFilter(ctx context.Context, t *testing.T, provider *Provider, res ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "authen-test"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "authen-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -720,50 +720,50 @@ func testAuthenFilter(ctx context.Context, t *testing.T, provider *Provider, res var testCases = []struct { name string - route gwapiv1b1.HTTPRoute + route gwapiv1.HTTPRoute }{ { name: "authenfilter-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-authenfilter-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/authenfilter/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName(authenFilter.Name), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName(authenFilter.Name), }, }, }, @@ -837,7 +837,7 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -853,18 +853,18 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "httproute-test"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -894,46 +894,46 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour require.NoError(t, cli.Delete(ctx, authenFilter)) }() - redirectHostname := gwapiv1b1.PreciseHostname("redirect.hostname.local") - redirectPort := gwapiv1b1.PortNumber(8443) + redirectHostname := gwapiv1.PreciseHostname("redirect.hostname.local") + redirectPort := gwapiv1.PortNumber(8443) redirectStatus := 301 - rewriteHostname := gwapiv1b1.PreciseHostname("rewrite.hostname.local") + rewriteHostname := gwapiv1.PreciseHostname("rewrite.hostname.local") var testCases = []struct { name string - route gwapiv1b1.HTTPRoute + route gwapiv1.HTTPRoute }{ { name: "destination-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, @@ -946,47 +946,47 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "redirect-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-redirect-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/redirect/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("RequestRedirect"), - RequestRedirect: &gwapiv1b1.HTTPRequestRedirectFilter{ + Type: gwapiv1.HTTPRouteFilterType("RequestRedirect"), + RequestRedirect: &gwapiv1.HTTPRequestRedirectFilter{ Scheme: ptr.To("https"), Hostname: &redirectHostname, - Path: &gwapiv1b1.HTTPPathModifier{ - Type: gwapiv1b1.HTTPPathModifierType("ReplaceFullPath"), + Path: &gwapiv1.HTTPPathModifier{ + Type: gwapiv1.HTTPPathModifierType("ReplaceFullPath"), ReplaceFullPath: ptr.To("/newpath"), }, Port: &redirectPort, @@ -1001,46 +1001,46 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "rewrite-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-rewrite-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/rewrite/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("URLRewrite"), - URLRewrite: &gwapiv1b1.HTTPURLRewriteFilter{ + Type: gwapiv1.HTTPRouteFilterType("URLRewrite"), + URLRewrite: &gwapiv1.HTTPURLRewriteFilter{ Hostname: &rewriteHostname, - Path: &gwapiv1b1.HTTPPathModifier{ - Type: gwapiv1b1.HTTPPathModifierType("ReplaceFullPath"), + Path: &gwapiv1.HTTPPathModifier{ + Type: gwapiv1.HTTPPathModifierType("ReplaceFullPath"), ReplaceFullPath: ptr.To("/newpath"), }, }, @@ -1053,56 +1053,56 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "add-request-header-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-add-request-header-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/addheader/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("RequestHeaderModifier"), - RequestHeaderModifier: &gwapiv1b1.HTTPHeaderFilter{ - Add: []gwapiv1b1.HTTPHeader{ + Type: gwapiv1.HTTPRouteFilterType("RequestHeaderModifier"), + RequestHeaderModifier: &gwapiv1.HTTPHeaderFilter{ + Add: []gwapiv1.HTTPHeader{ { - Name: gwapiv1b1.HTTPHeaderName("header-1"), + Name: gwapiv1.HTTPHeaderName("header-1"), Value: "value-1", }, { - Name: gwapiv1b1.HTTPHeaderName("header-2"), + Name: gwapiv1.HTTPHeaderName("header-2"), Value: "value-2", }, }, - Set: []gwapiv1b1.HTTPHeader{ + Set: []gwapiv1.HTTPHeader{ { - Name: gwapiv1b1.HTTPHeaderName("header-3"), + Name: gwapiv1.HTTPHeaderName("header-3"), Value: "value-3", }, }, @@ -1116,43 +1116,43 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "remove-request-header-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-remove-request-header-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/remheader/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("RequestHeaderModifier"), - RequestHeaderModifier: &gwapiv1b1.HTTPHeaderFilter{ + Type: gwapiv1.HTTPRouteFilterType("RequestHeaderModifier"), + RequestHeaderModifier: &gwapiv1.HTTPHeaderFilter{ Remove: []string{ "example-header-1", "test-header", @@ -1168,56 +1168,56 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "add-response-header-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-add-response-header-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/addheader/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("ResponseHeaderModifier"), - ResponseHeaderModifier: &gwapiv1b1.HTTPHeaderFilter{ - Add: []gwapiv1b1.HTTPHeader{ + Type: gwapiv1.HTTPRouteFilterType("ResponseHeaderModifier"), + ResponseHeaderModifier: &gwapiv1.HTTPHeaderFilter{ + Add: []gwapiv1.HTTPHeader{ { - Name: gwapiv1b1.HTTPHeaderName("header-1"), + Name: gwapiv1.HTTPHeaderName("header-1"), Value: "value-1", }, { - Name: gwapiv1b1.HTTPHeaderName("header-2"), + Name: gwapiv1.HTTPHeaderName("header-2"), Value: "value-2", }, }, - Set: []gwapiv1b1.HTTPHeader{ + Set: []gwapiv1.HTTPHeader{ { - Name: gwapiv1b1.HTTPHeaderName("header-3"), + Name: gwapiv1.HTTPHeaderName("header-3"), Value: "value-3", }, }, @@ -1231,43 +1231,43 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "remove-response-header-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-remove-response-header-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/remheader/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("ResponseHeaderModifier"), - ResponseHeaderModifier: &gwapiv1b1.HTTPHeaderFilter{ + Type: gwapiv1.HTTPRouteFilterType("ResponseHeaderModifier"), + ResponseHeaderModifier: &gwapiv1.HTTPHeaderFilter{ Remove: []string{ "example-header-1", "test-header", @@ -1283,44 +1283,44 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour }, { name: "mirror-httproute", - route: gwapiv1b1.HTTPRoute{ + route: gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-mirror-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Name: gwapiv1b1.ObjectName(gw.Name), + Name: gwapiv1.ObjectName(gw.Name), }, }, }, - Hostnames: []gwapiv1b1.Hostname{"test.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{ + Hostnames: []gwapiv1.Hostname{"test.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/mirror/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test", }, }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterType("RequestMirror"), - RequestMirror: &gwapiv1b1.HTTPRequestMirrorFilter{ - BackendRef: gwapiv1b1.BackendObjectReference{ + Type: gwapiv1.HTTPRouteFilterType("RequestMirror"), + RequestMirror: &gwapiv1.HTTPRequestMirrorFilter{ + BackendRef: gwapiv1.BackendObjectReference{ Name: "test", }, }, @@ -1405,18 +1405,18 @@ func testTLSRoute(ctx context.Context, t *testing.T, provider *Provider, resourc ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "tlsroute-test"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "tlsroute-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.TLSProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.TLSProtocolType, }, }, }, @@ -1545,23 +1545,23 @@ func testServiceCleanupForMultipleRoutes(ctx context.Context, t *testing.T, prov ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "service-cleanup-test"}} require.NoError(t, cli.Create(ctx, ns)) - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Name: "service-cleanup-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "httptest", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, { Name: "tlstest", - Port: gwapiv1b1.PortNumber(int32(8043)), - Protocol: gwapiv1b1.TLSProtocolType, + Port: gwapiv1.PortNumber(int32(8043)), + Protocol: gwapiv1.TLSProtocolType, }, }, }, @@ -1602,28 +1602,28 @@ func testServiceCleanupForMultipleRoutes(ctx context.Context, t *testing.T, prov }, } - httpRoute := gwapiv1b1.HTTPRoute{ + httpRoute := gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Name: "httproute-test", Namespace: ns.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{{ - Name: gwapiv1b1.ObjectName(gw.Name), + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{{ + Name: gwapiv1.ObjectName(gw.Name), }}, }, - Hostnames: []gwapiv1b1.Hostname{"test-http.hostname.local"}, - Rules: []gwapiv1b1.HTTPRouteRule{{ - Matches: []gwapiv1b1.HTTPRouteMatch{{ - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Hostnames: []gwapiv1.Hostname{"test-http.hostname.local"}, + Rules: []gwapiv1.HTTPRouteRule{{ + Matches: []gwapiv1.HTTPRouteMatch{{ + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }}, - BackendRefs: []gwapiv1b1.HTTPBackendRef{{ - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRefs: []gwapiv1.HTTPBackendRef{{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Name: "test-common-svc", }, }, @@ -1730,7 +1730,7 @@ func TestNamespacedProvider(t *testing.T) { require.NoError(t, cli.Create(ctx, gw3)) // Ensure only 2 gateways are reconciled - gatewayList := &gwapiv1b1.GatewayList{} + gatewayList := &gwapiv1.GatewayList{} require.NoError(t, cli.List(ctx, gatewayList)) assert.Equal(t, len(gatewayList.Items), 2) @@ -1789,7 +1789,7 @@ func TestNamespaceSelectorsProvider(t *testing.T) { } for _, cond := range gc.Status.Conditions { - if cond.Type == string(gwapiv1b1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { + if cond.Type == string(gwapiv1.GatewayClassConditionStatusAccepted) && cond.Status == metav1.ConditionTrue { return true } } @@ -1875,21 +1875,21 @@ func TestNamespaceSelectorsProvider(t *testing.T) { }, watchedGateway.Name, types.NamespacedName{Name: watchedSvc.Name}) - watchedHTTPRoute.Spec.Rules[0].Filters = []gwapiv1b1.HTTPRouteFilter{ + watchedHTTPRoute.Spec.Rules[0].Filters = []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName(watchedAuthenFilter.Name), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName(watchedAuthenFilter.Name), }, }, { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindRateLimitFilter), - Name: gwapiv1b1.ObjectName(watchedRateLimitFilter.Name), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindRateLimitFilter), + Name: gwapiv1.ObjectName(watchedRateLimitFilter.Name), }, }, } @@ -1905,21 +1905,21 @@ func TestNamespaceSelectorsProvider(t *testing.T) { }, nonWatchedGateway.Name, types.NamespacedName{Name: nonWatchedSvc.Name}) - nonWatchedHTTPRoute.Spec.Rules[0].Filters = []gwapiv1b1.HTTPRouteFilter{ + nonWatchedHTTPRoute.Spec.Rules[0].Filters = []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName(nonWatchedAuthenFilter.Name), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName(nonWatchedAuthenFilter.Name), }, }, { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindRateLimitFilter), - Name: gwapiv1b1.ObjectName(nonWatchedRateLimitFilter.Name), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindRateLimitFilter), + Name: gwapiv1.ObjectName(nonWatchedRateLimitFilter.Name), }, }, } diff --git a/internal/provider/kubernetes/predicates.go b/internal/provider/kubernetes/predicates.go index 746f99c5ee3..6ef95122ecf 100644 --- a/internal/provider/kubernetes/predicates.go +++ b/internal/provider/kubernetes/predicates.go @@ -15,8 +15,8 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -28,7 +28,7 @@ import ( // with a Spec.Controller string matching this Envoy Gateway's controller string, // or false otherwise. func (r *gatewayAPIReconciler) hasMatchingController(obj client.Object) bool { - gc, ok := obj.(*gwapiv1b1.GatewayClass) + gc, ok := obj.(*gwapiv1.GatewayClass) if !ok { r.log.Info("bypassing reconciliation due to unexpected object type", "type", obj) return false @@ -105,13 +105,13 @@ func contains(m map[string]string, i string) bool { // validateGatewayForReconcile returns true if the provided object is a Gateway // using a GatewayClass matching the configured gatewayclass controller name. func (r *gatewayAPIReconciler) validateGatewayForReconcile(obj client.Object) bool { - gw, ok := obj.(*gwapiv1b1.Gateway) + gw, ok := obj.(*gwapiv1.Gateway) if !ok { r.log.Info("unexpected object type, bypassing reconciliation", "object", obj) return false } - gc := &gwapiv1b1.GatewayClass{} + gc := &gwapiv1.GatewayClass{} key := types.NamespacedName{Name: string(gw.Spec.GatewayClassName)} if err := r.client.Get(context.Background(), key, gc); err != nil { r.log.Error(err, "failed to get gatewayclass", "name", gw.Spec.GatewayClassName) @@ -136,7 +136,7 @@ func (r *gatewayAPIReconciler) validateSecretForReconcile(obj client.Object) boo return false } - gwList := &gwapiv1b1.GatewayList{} + gwList := &gwapiv1.GatewayList{} if err := r.client.List(context.Background(), gwList, &client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(secretGatewayIndex, utils.NamespacedName(secret).String()), }); err != nil { @@ -198,7 +198,7 @@ func (r *gatewayAPIReconciler) validateServiceImportForReconcile(obj client.Obje // in the system, else returns false. func (r *gatewayAPIReconciler) isRouteReferencingBackend(nsName *types.NamespacedName) bool { ctx := context.Background() - httpRouteList := &gwapiv1b1.HTTPRouteList{} + httpRouteList := &gwapiv1.HTTPRouteList{} if err := r.client.List(ctx, httpRouteList, &client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(backendHTTPRouteIndex, nsName.String()), }); err != nil { @@ -312,7 +312,7 @@ func (r *gatewayAPIReconciler) httpRoutesForAuthenticationFilter(obj client.Obje } // Check if the AuthenticationFilter belongs to a managed HTTPRoute. - httpRouteList := &gwapiv1b1.HTTPRouteList{} + httpRouteList := &gwapiv1.HTTPRouteList{} if err := r.client.List(ctx, httpRouteList, &client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(authenFilterHTTPRouteIndex, utils.NamespacedName(filter).String()), }); err != nil { @@ -336,7 +336,7 @@ func (r *gatewayAPIReconciler) httpRoutesForRateLimitFilter(obj client.Object) b } // Check if the RateLimitFilter belongs to a managed HTTPRoute. - httpRouteList := &gwapiv1b1.HTTPRouteList{} + httpRouteList := &gwapiv1.HTTPRouteList{} if err := r.client.List(ctx, httpRouteList, &client.ListOptions{ FieldSelector: fields.OneTermEqualSelector(rateLimitFilterHTTPRouteIndex, utils.NamespacedName(filter).String()), }); err != nil { @@ -349,12 +349,12 @@ func (r *gatewayAPIReconciler) httpRoutesForRateLimitFilter(obj client.Object) b return len(httpRoutes) != 0 } -func (r *gatewayAPIReconciler) filterHTTPRoutesByNamespaceLabels(httpRoutes []gwapiv1b1.HTTPRoute) []gwapiv1b1.HTTPRoute { +func (r *gatewayAPIReconciler) filterHTTPRoutesByNamespaceLabels(httpRoutes []gwapiv1.HTTPRoute) []gwapiv1.HTTPRoute { if len(r.namespaceLabels) == 0 { return httpRoutes } - var routes []gwapiv1b1.HTTPRoute + var routes []gwapiv1.HTTPRoute for _, route := range httpRoutes { ns := route.GetNamespace() ok, err := r.checkObjectNamespaceLabels(ns) @@ -374,7 +374,7 @@ func (r *gatewayAPIReconciler) filterHTTPRoutesByNamespaceLabels(httpRoutes []gw } // envoyDeploymentForGateway returns the Envoy Deployment, returning nil if the Deployment doesn't exist. -func (r *gatewayAPIReconciler) envoyDeploymentForGateway(ctx context.Context, gateway *gwapiv1b1.Gateway) (*appsv1.Deployment, error) { +func (r *gatewayAPIReconciler) envoyDeploymentForGateway(ctx context.Context, gateway *gwapiv1.Gateway) (*appsv1.Deployment, error) { key := types.NamespacedName{ Namespace: r.namespace, Name: infraDeploymentName(gateway), @@ -390,7 +390,7 @@ func (r *gatewayAPIReconciler) envoyDeploymentForGateway(ctx context.Context, ga } // envoyServiceForGateway returns the Envoy service, returning nil if the service doesn't exist. -func (r *gatewayAPIReconciler) envoyServiceForGateway(ctx context.Context, gateway *gwapiv1b1.Gateway) (*corev1.Service, error) { +func (r *gatewayAPIReconciler) envoyServiceForGateway(ctx context.Context, gateway *gwapiv1.Gateway) (*corev1.Service, error) { key := types.NamespacedName{ Namespace: r.namespace, Name: infraServiceName(gateway), @@ -406,7 +406,7 @@ func (r *gatewayAPIReconciler) envoyServiceForGateway(ctx context.Context, gatew } // findOwningGateway attempts finds a Gateway using "labels". -func (r *gatewayAPIReconciler) findOwningGateway(ctx context.Context, labels map[string]string) *gwapiv1b1.Gateway { +func (r *gatewayAPIReconciler) findOwningGateway(ctx context.Context, labels map[string]string) *gwapiv1.Gateway { gwName, ok := labels[gatewayapi.OwningGatewayNameLabel] if !ok { return nil @@ -418,7 +418,7 @@ func (r *gatewayAPIReconciler) findOwningGateway(ctx context.Context, labels map } gatewayKey := types.NamespacedName{Namespace: gwNamespace, Name: gwName} - gtw := new(gwapiv1b1.Gateway) + gtw := new(gwapiv1.Gateway) if err := r.client.Get(ctx, gatewayKey, gtw); err != nil { r.log.Info("gateway not found", "namespace", gtw.Namespace, "name", gtw.Name) return nil diff --git a/internal/provider/kubernetes/predicates_test.go b/internal/provider/kubernetes/predicates_test.go index 6d156f083ed..71d9dfd60c2 100644 --- a/internal/provider/kubernetes/predicates_test.go +++ b/internal/provider/kubernetes/predicates_test.go @@ -14,8 +14,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" @@ -229,7 +229,7 @@ func TestValidateSecretForReconcile(t *testing.T) { r.client = fakeclient.NewClientBuilder(). WithScheme(envoygateway.GetScheme()). WithObjects(tc.configs...). - WithIndex(&gwapiv1b1.Gateway{}, secretGatewayIndex, secretGatewayIndexFunc). + WithIndex(&gwapiv1.Gateway{}, secretGatewayIndex, secretGatewayIndexFunc). Build() t.Run(tc.name, func(t *testing.T) { res := r.validateSecretForReconcile(tc.secret) @@ -293,7 +293,7 @@ func TestValidateEndpointSliceForReconcile(t *testing.T) { r.client = fakeclient.NewClientBuilder(). WithScheme(envoygateway.GetScheme()). WithObjects(tc.configs...). - WithIndex(&gwapiv1b1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc). + WithIndex(&gwapiv1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc). WithIndex(&gwapiv1a2.GRPCRoute{}, backendGRPCRouteIndex, backendGRPCRouteIndexFunc). WithIndex(&gwapiv1a2.TLSRoute{}, backendTLSRouteIndex, backendTLSRouteIndexFunc). WithIndex(&gwapiv1a2.TCPRoute{}, backendTCPRouteIndex, backendTCPRouteIndexFunc). @@ -433,7 +433,7 @@ func TestValidateServiceForReconcile(t *testing.T) { r.client = fakeclient.NewClientBuilder(). WithScheme(envoygateway.GetScheme()). WithObjects(tc.configs...). - WithIndex(&gwapiv1b1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc). + WithIndex(&gwapiv1.HTTPRoute{}, backendHTTPRouteIndex, backendHTTPRouteIndexFunc). WithIndex(&gwapiv1a2.GRPCRoute{}, backendGRPCRouteIndex, backendGRPCRouteIndexFunc). WithIndex(&gwapiv1a2.TLSRoute{}, backendTLSRouteIndex, backendTLSRouteIndexFunc). WithIndex(&gwapiv1a2.TCPRoute{}, backendTCPRouteIndex, backendTCPRouteIndexFunc). diff --git a/internal/provider/kubernetes/routes.go b/internal/provider/kubernetes/routes.go index 6edaec0b6b6..d8447b9917b 100644 --- a/internal/provider/kubernetes/routes.go +++ b/internal/provider/kubernetes/routes.go @@ -14,8 +14,8 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -66,7 +66,7 @@ func (r *gatewayAPIReconciler) processTLSRoutes(ctx context.Context, gatewayName } backendNamespace := gatewayapi.NamespaceDerefOrAlpha(backendRef.Namespace, tlsRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: backendRef.BackendObjectReference.Group, Kind: backendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), @@ -166,7 +166,7 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam } backendNamespace := gatewayapi.NamespaceDerefOr(backendRef.Namespace, grpcRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: backendRef.BackendObjectReference.Group, Kind: backendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), @@ -269,7 +269,7 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam // the backend references and pushes the HTTPRoutes to the resourceTree. func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNamespaceName string, resourceMap *resourceMappings, resourceTree *gatewayapi.Resources) error { - httpRouteList := &gwapiv1b1.HTTPRouteList{} + httpRouteList := &gwapiv1.HTTPRouteList{} // An HTTPRoute may reference an AuthenticationFilter, RateLimitFilter, or a filter managed // by an extension so add them to the resource map first (if they exist). @@ -309,7 +309,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam httpRoutes := httpRouteList.Items if len(r.namespaceLabels) != 0 { - var hrs []gwapiv1b1.HTTPRoute + var hrs []gwapiv1.HTTPRoute for _, hr := range httpRoutes { ns := hr.GetNamespace() ok, err := r.checkObjectNamespaceLabels(ns) @@ -338,7 +338,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } backendNamespace := gatewayapi.NamespaceDerefOr(backendRef.Namespace, httpRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: backendRef.BackendObjectReference.Group, Kind: backendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), @@ -383,7 +383,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } // Load in the backendRefs from any requestMirrorFilters on the HTTPRoute - if filter.Type == gwapiv1b1.HTTPRouteFilterRequestMirror { + if filter.Type == gwapiv1.HTTPRouteFilterRequestMirror { // Make sure the config actually exists mirrorFilter := filter.RequestMirror if mirrorFilter == nil { @@ -394,7 +394,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam mirrorBackendObj := mirrorFilter.BackendRef // Wrap the filter's BackendObjectReference into a BackendRef so we can use existing tooling to check it weight := int32(1) - mirrorBackendRef := gwapiv1b1.BackendRef{ + mirrorBackendRef := gwapiv1.BackendRef{ BackendObjectReference: mirrorBackendObj, Weight: &weight, } @@ -405,7 +405,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } backendNamespace := gatewayapi.NamespaceDerefOr(mirrorBackendRef.Namespace, httpRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: mirrorBackendRef.BackendObjectReference.Group, Kind: mirrorBackendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), @@ -436,7 +436,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam "name", refGrant.Name) } } - } else if filter.Type == gwapiv1b1.HTTPRouteFilterExtensionRef { + } else if filter.Type == gwapiv1.HTTPRouteFilterExtensionRef { // NOTE: filters must be in the same namespace as the HTTPRoute switch string(filter.ExtensionRef.Kind) { case egv1a1.KindAuthenticationFilter: @@ -485,7 +485,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam resourceMap.allAssociatedNamespaces[httpRoute.Namespace] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer - httpRoute.Status = gwapiv1b1.HTTPRouteStatus{} + httpRoute.Status = gwapiv1.HTTPRouteStatus{} resourceTree.HTTPRoutes = append(resourceTree.HTTPRoutes, &httpRoute) } @@ -537,7 +537,7 @@ func (r *gatewayAPIReconciler) processTCPRoutes(ctx context.Context, gatewayName } backendNamespace := gatewayapi.NamespaceDerefOrAlpha(backendRef.Namespace, tcpRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: backendRef.BackendObjectReference.Group, Kind: backendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), @@ -618,7 +618,7 @@ func (r *gatewayAPIReconciler) processUDPRoutes(ctx context.Context, gatewayName } backendNamespace := gatewayapi.NamespaceDerefOrAlpha(backendRef.Namespace, udpRoute.Namespace) - resourceMap.allAssociatedBackendRefs[gwapiv1b1.BackendObjectReference{ + resourceMap.allAssociatedBackendRefs[gwapiv1.BackendObjectReference{ Group: backendRef.BackendObjectReference.Group, Kind: backendRef.BackendObjectReference.Kind, Namespace: gatewayapi.NamespacePtrV1Alpha2(backendNamespace), diff --git a/internal/provider/kubernetes/routes_test.go b/internal/provider/kubernetes/routes_test.go index 6d29eb9d096..a0a01346986 100644 --- a/internal/provider/kubernetes/routes_test.go +++ b/internal/provider/kubernetes/routes_test.go @@ -18,8 +18,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" @@ -31,29 +31,29 @@ import ( func TestProcessHTTPRoutes(t *testing.T) { // The gatewayclass configured for the reconciler and referenced by test cases. - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) - gc := &gwapiv1b1.GatewayClass{ + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) + gc := &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, }, } // The gateway referenced by test cases. - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "http", - Protocol: gwapiv1b1.HTTPProtocolType, - Port: gwapiv1b1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), }, }, }, @@ -62,7 +62,7 @@ func TestProcessHTTPRoutes(t *testing.T) { testCases := []struct { name string - routes []*gwapiv1b1.HTTPRoute + routes []*gwapiv1.HTTPRoute authenFilters []*egv1a1.AuthenticationFilter rateLimitFilters []*egv1a1.RateLimitFilter extensionFilters []*unstructured.Unstructured @@ -71,34 +71,34 @@ func TestProcessHTTPRoutes(t *testing.T) { }{ { name: "valid httproute", - routes: []*gwapiv1b1.HTTPRoute{ + routes: []*gwapiv1.HTTPRoute{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -115,44 +115,44 @@ func TestProcessHTTPRoutes(t *testing.T) { }, { name: "httproute with one authenticationfilter", - routes: []*gwapiv1b1.HTTPRoute{ + routes: []*gwapiv1.HTTPRoute{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName("test"), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName("test"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -194,44 +194,44 @@ func TestProcessHTTPRoutes(t *testing.T) { }, { name: "httproute with one rateLimitfilter", - routes: []*gwapiv1b1.HTTPRoute{ + routes: []*gwapiv1.HTTPRoute{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindRateLimitFilter), - Name: gwapiv1b1.ObjectName("test"), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindRateLimitFilter), + Name: gwapiv1.ObjectName("test"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -283,44 +283,44 @@ func TestProcessHTTPRoutes(t *testing.T) { }, { name: "httproute with one authenticationfilter and ratelimitfilter", - routes: []*gwapiv1b1.HTTPRoute{ + routes: []*gwapiv1.HTTPRoute{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName("test"), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName("test"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -397,44 +397,44 @@ func TestProcessHTTPRoutes(t *testing.T) { }, { name: "httproute with one filter_from_extension", - routes: []*gwapiv1b1.HTTPRoute{ + routes: []*gwapiv1.HTTPRoute{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - Matches: []gwapiv1b1.HTTPRouteMatch{ + Matches: []gwapiv1.HTTPRouteMatch{ { - Path: &gwapiv1b1.HTTPPathMatch{ - Type: ptr.To(gwapiv1b1.PathMatchPathPrefix), + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), Value: ptr.To("/"), }, }, }, - Filters: []gwapiv1b1.HTTPRouteFilter{ + Filters: []gwapiv1.HTTPRouteFilter{ { - Type: gwapiv1b1.HTTPRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group("gateway.example.io"), - Kind: gwapiv1b1.Kind("Foo"), - Name: gwapiv1b1.ObjectName("test"), + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group("gateway.example.io"), + Kind: gwapiv1.Kind("Foo"), + Name: gwapiv1.ObjectName("test"), }, }, }, - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -506,7 +506,7 @@ func TestProcessHTTPRoutes(t *testing.T) { r.client = fakeclient.NewClientBuilder(). WithScheme(envoygateway.GetScheme()). WithObjects(objs...). - WithIndex(&gwapiv1b1.HTTPRoute{}, gatewayHTTPRouteIndex, gatewayHTTPRouteIndexFunc). + WithIndex(&gwapiv1.HTTPRoute{}, gatewayHTTPRouteIndex, gatewayHTTPRouteIndexFunc). Build() // Process the test case httproutes. @@ -554,29 +554,29 @@ func TestProcessHTTPRoutes(t *testing.T) { func TestProcessGRPCRoutes(t *testing.T) { // The gatewayclass configured for the reconciler and referenced by test cases. - gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) - gc := &gwapiv1b1.GatewayClass{ + gcCtrlName := gwapiv1.GatewayController(egv1a1.GatewayControllerName) + gc := &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: gcCtrlName, }, } // The gateway referenced by test cases. - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gc.Name), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gc.Name), + Listeners: []gwapiv1.Listener{ { Name: "http", - Protocol: gwapiv1b1.HTTPProtocolType, - Port: gwapiv1b1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), }, }, }, @@ -600,8 +600,8 @@ func TestProcessGRPCRoutes(t *testing.T) { Name: "test", }, Spec: gwapiv1a2.GRPCRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, @@ -618,8 +618,8 @@ func TestProcessGRPCRoutes(t *testing.T) { }, BackendRefs: []gwapiv1a2.GRPCBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -643,8 +643,8 @@ func TestProcessGRPCRoutes(t *testing.T) { Name: "test", }, Spec: gwapiv1a2.GRPCRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, @@ -662,17 +662,17 @@ func TestProcessGRPCRoutes(t *testing.T) { Filters: []gwapiv1a2.GRPCRouteFilter{ { Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindAuthenticationFilter), - Name: gwapiv1b1.ObjectName("test"), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindAuthenticationFilter), + Name: gwapiv1.ObjectName("test"), }, }, }, BackendRefs: []gwapiv1a2.GRPCBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -721,8 +721,8 @@ func TestProcessGRPCRoutes(t *testing.T) { Name: "test", }, Spec: gwapiv1a2.GRPCRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Name: "test", }, @@ -740,17 +740,17 @@ func TestProcessGRPCRoutes(t *testing.T) { Filters: []gwapiv1a2.GRPCRouteFilter{ { Type: gwapiv1a2.GRPCRouteFilterExtensionRef, - ExtensionRef: &gwapiv1b1.LocalObjectReference{ - Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egv1a1.KindRateLimitFilter), - Name: gwapiv1b1.ObjectName("test"), + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1.Kind(egv1a1.KindRateLimitFilter), + Name: gwapiv1.ObjectName("test"), }, }, }, BackendRefs: []gwapiv1a2.GRPCBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ Group: gatewayapi.GroupPtr(corev1.GroupName), Kind: gatewayapi.KindPtr(gatewayapi.KindService), Name: "test", @@ -875,24 +875,24 @@ func TestProcessGRPCRoutes(t *testing.T) { func TestValidateHTTPRouteParentRefs(t *testing.T) { testCases := []struct { name string - route *gwapiv1b1.HTTPRoute - gateways []*gwapiv1b1.Gateway - classes []*gwapiv1b1.GatewayClass - expect []gwapiv1b1.Gateway + route *gwapiv1.HTTPRoute + gateways []*gwapiv1.Gateway + classes []*gwapiv1.GatewayClass + expect []gwapiv1.Gateway expected bool }{ { name: "valid parentRef", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test", }, @@ -900,39 +900,39 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, }, }, - gateways: []*gwapiv1b1.Gateway{ + gateways: []*gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "gc1", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, }, }, - expect: []gwapiv1b1.Gateway{ + expect: []gwapiv1.Gateway{ { TypeMeta: metav1.TypeMeta{ Kind: "Gateway", - APIVersion: gwapiv1b1.GroupVersion.String(), + APIVersion: gwapiv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", ResourceVersion: "999", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, @@ -941,14 +941,14 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "invalid parentRef group", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { Group: gatewayapi.GroupPtr("unsupported.group"), Kind: gatewayapi.KindPtr("Gateway"), @@ -962,16 +962,16 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "invalid parentRef kind", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("UnsupportedKind"), Name: "test", }, @@ -983,16 +983,16 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "non-existent parentRef name", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "no-existent", }, @@ -1004,21 +1004,21 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "valid parentRefs", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test", }, { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test2", }, @@ -1026,13 +1026,13 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, }, }, - gateways: []*gwapiv1b1.Gateway{ + gateways: []*gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, @@ -1041,47 +1041,47 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { Namespace: "test", Name: "test2", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "gc1", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, }, }, - expect: []gwapiv1b1.Gateway{ + expect: []gwapiv1.Gateway{ { TypeMeta: metav1.TypeMeta{ Kind: "Gateway", - APIVersion: gwapiv1b1.GroupVersion.String(), + APIVersion: gwapiv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", ResourceVersion: "999", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, { TypeMeta: metav1.TypeMeta{ Kind: "Gateway", - APIVersion: gwapiv1b1.GroupVersion.String(), + APIVersion: gwapiv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test2", ResourceVersion: "999", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, @@ -1090,21 +1090,21 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "one of two parentRefs are managed", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test", }, { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test2", }, @@ -1112,13 +1112,13 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, }, }, - gateways: []*gwapiv1b1.Gateway{ + gateways: []*gwapiv1.Gateway{ { ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, @@ -1127,41 +1127,41 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { Namespace: "test", Name: "test2", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc2", }, }, }, - classes: []*gwapiv1b1.GatewayClass{ + classes: []*gwapiv1.GatewayClass{ { ObjectMeta: metav1.ObjectMeta{ Name: "gc1", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController(egv1a1.GatewayControllerName), }, }, { ObjectMeta: metav1.ObjectMeta{ Name: "gc2", }, - Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController("unmanaged.controller"), + Spec: gwapiv1.GatewayClassSpec{ + ControllerName: gwapiv1.GatewayController("unmanaged.controller"), }, }, }, - expect: []gwapiv1b1.Gateway{ + expect: []gwapiv1.Gateway{ { TypeMeta: metav1.TypeMeta{ Kind: "Gateway", - APIVersion: gwapiv1b1.GroupVersion.String(), + APIVersion: gwapiv1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", ResourceVersion: "999", }, - Spec: gwapiv1b1.GatewaySpec{ + Spec: gwapiv1.GatewaySpec{ GatewayClassName: "gc1", }, }, @@ -1170,21 +1170,21 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { }, { name: "one of two valid parentRefs kind", - route: &gwapiv1b1.HTTPRoute{ + route: &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Gateway"), Name: "test", }, { - Group: gatewayapi.GroupPtr(gwapiv1b1.GroupName), + Group: gatewayapi.GroupPtr(gwapiv1.GroupName), Kind: gatewayapi.KindPtr("Unsupported"), Name: "test2", }, @@ -1197,7 +1197,7 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { } // Create the reconciler. - r := &gatewayAPIReconciler{classController: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName)} + r := &gatewayAPIReconciler{classController: gwapiv1.GatewayController(egv1a1.GatewayControllerName)} ctx := context.Background() for _, tc := range testCases { diff --git a/internal/provider/kubernetes/test/utils.go b/internal/provider/kubernetes/test/utils.go index eb0653a10d6..877e173bc29 100644 --- a/internal/provider/kubernetes/test/utils.go +++ b/internal/provider/kubernetes/test/utils.go @@ -11,8 +11,8 @@ import ( discoveryv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/utils/ptr" @@ -35,31 +35,31 @@ func NewEnvoyProxy(ns, name string) *egv1a1.EnvoyProxy { } // GetGatewayClass returns a sample GatewayClass. -func GetGatewayClass(name string, controller gwapiv1b1.GatewayController) *gwapiv1b1.GatewayClass { - return &gwapiv1b1.GatewayClass{ +func GetGatewayClass(name string, controller gwapiv1.GatewayController) *gwapiv1.GatewayClass { + return &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: gwapiv1b1.GatewayClassSpec{ + Spec: gwapiv1.GatewayClassSpec{ ControllerName: controller, }, } } // GetGateway returns a sample Gateway with single listener. -func GetGateway(nsname types.NamespacedName, gwclass string) *gwapiv1b1.Gateway { - return &gwapiv1b1.Gateway{ +func GetGateway(nsname types.NamespacedName, gwclass string) *gwapiv1.Gateway { + return &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: nsname.Namespace, Name: nsname.Name, }, - Spec: gwapiv1b1.GatewaySpec{ - GatewayClassName: gwapiv1b1.ObjectName(gwclass), - Listeners: []gwapiv1b1.Listener{ + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(gwclass), + Listeners: []gwapiv1.Listener{ { Name: "test", - Port: gwapiv1b1.PortNumber(int32(8080)), - Protocol: gwapiv1b1.HTTPProtocolType, + Port: gwapiv1.PortNumber(int32(8080)), + Protocol: gwapiv1.HTTPProtocolType, }, }, }, @@ -67,14 +67,14 @@ func GetGateway(nsname types.NamespacedName, gwclass string) *gwapiv1b1.Gateway } // GetSecureGateway returns a sample Gateway with single TLS listener. -func GetSecureGateway(nsname types.NamespacedName, gwclass string, secretKindNSName ObjectKindNamespacedName) *gwapiv1b1.Gateway { +func GetSecureGateway(nsname types.NamespacedName, gwclass string, secretKindNSName ObjectKindNamespacedName) *gwapiv1.Gateway { secureGateway := GetGateway(nsname, gwclass) - secureGateway.Spec.Listeners[0].TLS = &gwapiv1b1.GatewayTLSConfig{ - Mode: ptr.To(gwapiv1b1.TLSModeTerminate), - CertificateRefs: []gwapiv1b1.SecretObjectReference{{ - Kind: (*gwapiv1b1.Kind)(&secretKindNSName.Kind), - Namespace: (*gwapiv1b1.Namespace)(&secretKindNSName.Namespace), - Name: gwapiv1b1.ObjectName(secretKindNSName.Name), + secureGateway.Spec.Listeners[0].TLS = &gwapiv1.GatewayTLSConfig{ + Mode: ptr.To(gwapiv1.TLSModeTerminate), + CertificateRefs: []gwapiv1.SecretObjectReference{{ + Kind: (*gwapiv1.Kind)(&secretKindNSName.Kind), + Namespace: (*gwapiv1.Namespace)(&secretKindNSName.Namespace), + Name: gwapiv1.ObjectName(secretKindNSName.Name), }}, } @@ -92,25 +92,25 @@ func GetSecret(nsname types.NamespacedName) *corev1.Secret { } // GetHTTPRoute returns a sample HTTPRoute with a parent reference. -func GetHTTPRoute(nsName types.NamespacedName, parent string, serviceName types.NamespacedName) *gwapiv1b1.HTTPRoute { - return &gwapiv1b1.HTTPRoute{ +func GetHTTPRoute(nsName types.NamespacedName, parent string, serviceName types.NamespacedName) *gwapiv1.HTTPRoute { + return &gwapiv1.HTTPRoute{ ObjectMeta: metav1.ObjectMeta{ Namespace: nsName.Namespace, Name: nsName.Name, }, - Spec: gwapiv1b1.HTTPRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ - {Name: gwapiv1b1.ObjectName(parent)}, + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ + {Name: gwapiv1.ObjectName(parent)}, }, }, - Rules: []gwapiv1b1.HTTPRouteRule{ + Rules: []gwapiv1.HTTPRouteRule{ { - BackendRefs: []gwapiv1b1.HTTPBackendRef{ + BackendRefs: []gwapiv1.HTTPBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ - Name: gwapiv1b1.ObjectName(serviceName.Name), + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ + Name: gwapiv1.ObjectName(serviceName.Name), }, }, }, @@ -129,18 +129,18 @@ func GetGRPCRoute(nsName types.NamespacedName, parent string, serviceName types. Name: nsName.Name, }, Spec: gwapiv1a2.GRPCRouteSpec{ - CommonRouteSpec: gwapiv1b1.CommonRouteSpec{ - ParentRefs: []gwapiv1b1.ParentReference{ - {Name: gwapiv1b1.ObjectName(parent)}, + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ + {Name: gwapiv1.ObjectName(parent)}, }, }, Rules: []gwapiv1a2.GRPCRouteRule{ { BackendRefs: []gwapiv1a2.GRPCBackendRef{ { - BackendRef: gwapiv1b1.BackendRef{ - BackendObjectReference: gwapiv1b1.BackendObjectReference{ - Name: gwapiv1b1.ObjectName(serviceName.Name), + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ + Name: gwapiv1.ObjectName(serviceName.Name), }, }, }, @@ -385,14 +385,14 @@ func GetRateLimitGlobalRule(val string) egv1a1.RateLimitRule { } } -func ContainsAuthenFilter(hroute *gwapiv1b1.HTTPRoute) bool { +func ContainsAuthenFilter(hroute *gwapiv1.HTTPRoute) bool { if hroute == nil { return false } for _, rule := range hroute.Spec.Rules { for _, filter := range rule.Filters { - if filter.Type == gwapiv1b1.HTTPRouteFilterExtensionRef && + if filter.Type == gwapiv1.HTTPRouteFilterExtensionRef && filter.ExtensionRef != nil && string(filter.ExtensionRef.Group) == egv1a1.GroupVersion.Group && filter.ExtensionRef.Kind == egv1a1.KindAuthenticationFilter { diff --git a/internal/status/conditions.go b/internal/status/conditions.go index ecb341f2739..bd4b3114b5e 100644 --- a/internal/status/conditions.go +++ b/internal/status/conditions.go @@ -19,11 +19,11 @@ import ( appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" ) const ( - ReasonOlderGatewayClassExists gwapiv1b1.GatewayClassConditionReason = "OlderGatewayClassExists" + ReasonOlderGatewayClassExists gwapiv1.GatewayClassConditionReason = "OlderGatewayClassExists" MsgOlderGatewayClassExists = "Invalid GatewayClass: another older GatewayClass with the same Spec.Controller exists" MsgValidGatewayClass = "Valid GatewayClass" @@ -31,13 +31,13 @@ const ( ) // computeGatewayClassAcceptedCondition computes the GatewayClass Accepted status condition. -func computeGatewayClassAcceptedCondition(gatewayClass *gwapiv1b1.GatewayClass, +func computeGatewayClassAcceptedCondition(gatewayClass *gwapiv1.GatewayClass, accepted bool, reason, msg string) metav1.Condition { switch accepted { case true: return metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, Reason: reason, Message: msg, @@ -46,7 +46,7 @@ func computeGatewayClassAcceptedCondition(gatewayClass *gwapiv1b1.GatewayClass, } default: return metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, Reason: reason, Message: msg, @@ -57,25 +57,25 @@ func computeGatewayClassAcceptedCondition(gatewayClass *gwapiv1b1.GatewayClass, } // computeGatewayAcceptedCondition computes the Gateway Accepted status condition. -func computeGatewayAcceptedCondition(gw *gwapiv1b1.Gateway, accepted bool) metav1.Condition { +func computeGatewayAcceptedCondition(gw *gwapiv1.Gateway, accepted bool) metav1.Condition { switch accepted { case true: - return newCondition(string(gwapiv1b1.GatewayReasonAccepted), metav1.ConditionTrue, - string(gwapiv1b1.GatewayReasonAccepted), + return newCondition(string(gwapiv1.GatewayReasonAccepted), metav1.ConditionTrue, + string(gwapiv1.GatewayReasonAccepted), "The Gateway has been scheduled by Envoy Gateway", time.Now(), gw.Generation) default: - return newCondition(string(gwapiv1b1.GatewayReasonAccepted), metav1.ConditionFalse, - string(gwapiv1b1.GatewayReasonAccepted), + return newCondition(string(gwapiv1.GatewayReasonAccepted), metav1.ConditionFalse, + string(gwapiv1.GatewayReasonAccepted), "The Gateway has not been scheduled by Envoy Gateway", time.Now(), gw.Generation) } } // computeGatewayProgrammedCondition computes the Gateway Programmed status condition. // Programmed condition surfaces true when the Envoy Deployment status is ready. -func computeGatewayProgrammedCondition(gw *gwapiv1b1.Gateway, deployment *appsv1.Deployment) metav1.Condition { +func computeGatewayProgrammedCondition(gw *gwapiv1.Gateway, deployment *appsv1.Deployment) metav1.Condition { if len(gw.Status.Addresses) == 0 { - return newCondition(string(gwapiv1b1.GatewayConditionProgrammed), metav1.ConditionFalse, - string(gwapiv1b1.GatewayReasonAddressNotAssigned), + return newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionFalse, + string(gwapiv1.GatewayReasonAddressNotAssigned), "No addresses have been assigned to the Gateway", time.Now(), gw.Generation) } @@ -83,15 +83,15 @@ func computeGatewayProgrammedCondition(gw *gwapiv1b1.Gateway, deployment *appsv1 // mark the Gateway as ready yet. if deployment == nil || deployment.Status.AvailableReplicas == 0 { - return newCondition(string(gwapiv1b1.GatewayConditionProgrammed), metav1.ConditionFalse, - string(gwapiv1b1.GatewayReasonNoResources), + return newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionFalse, + string(gwapiv1.GatewayReasonNoResources), "Deployment replicas unavailable", time.Now(), gw.Generation) } message := fmt.Sprintf("Address assigned to the Gateway, %d/%d envoy Deployment replicas available", deployment.Status.AvailableReplicas, deployment.Status.Replicas) - return newCondition(string(gwapiv1b1.GatewayConditionProgrammed), metav1.ConditionTrue, - string(gwapiv1b1.GatewayConditionProgrammed), message, time.Now(), gw.Generation) + return newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionTrue, + string(gwapiv1.GatewayConditionProgrammed), message, time.Now(), gw.Generation) } // MergeConditions adds or updates matching conditions, and updates the transition diff --git a/internal/status/conditions_test.go b/internal/status/conditions_test.go index f00aad25529..69a67590add 100644 --- a/internal/status/conditions_test.go +++ b/internal/status/conditions_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilclock "k8s.io/utils/clock" fakeclock "k8s.io/utils/clock/testing" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) @@ -39,9 +39,9 @@ func TestComputeGatewayClassAcceptedCondition(t *testing.T) { name: "accepted gatewayclass", accepted: true, expect: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, - Reason: string(gwapiv1b1.GatewayClassReasonAccepted), + Reason: string(gwapiv1.GatewayClassReasonAccepted), Message: MsgValidGatewayClass, }, }, @@ -49,7 +49,7 @@ func TestComputeGatewayClassAcceptedCondition(t *testing.T) { name: "not accepted gatewayclass", accepted: false, expect: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, Reason: string(ReasonOlderGatewayClassExists), Message: MsgOlderGatewayClassExists, @@ -59,16 +59,16 @@ func TestComputeGatewayClassAcceptedCondition(t *testing.T) { name: "invalid parameters gatewayclass", accepted: false, expect: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, - Reason: string(gwapiv1b1.GatewayClassReasonInvalidParameters), + Reason: string(gwapiv1.GatewayClassReasonInvalidParameters), Message: MsgGatewayClassInvalidParams, }, }, } for _, tc := range testCases { - gc := &gwapiv1b1.GatewayClass{ + gc := &gwapiv1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Generation: 7, }, @@ -93,7 +93,7 @@ func TestComputeGatewayScheduledCondition(t *testing.T) { name: "scheduled gateway", sched: true, expect: metav1.Condition{ - Type: string(gwapiv1b1.GatewayReasonAccepted), + Type: string(gwapiv1.GatewayReasonAccepted), Status: metav1.ConditionTrue, }, }, @@ -101,14 +101,14 @@ func TestComputeGatewayScheduledCondition(t *testing.T) { name: "not scheduled gateway", sched: false, expect: metav1.Condition{ - Type: string(gwapiv1b1.GatewayReasonAccepted), + Type: string(gwapiv1.GatewayReasonAccepted), Status: metav1.ConditionFalse, }, }, } for _, tc := range testCases { - gw := &gwapiv1b1.Gateway{ + gw := &gwapiv1.Gateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", @@ -143,12 +143,12 @@ func TestConditionChanged(t *testing.T) { name: "condition LastTransitionTime should be ignored", expected: false, a: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, LastTransitionTime: metav1.Unix(0, 0), }, b: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, LastTransitionTime: metav1.Unix(1, 0), }, @@ -157,12 +157,12 @@ func TestConditionChanged(t *testing.T) { name: "check condition reason differs", expected: true, a: metav1.Condition{ - Type: string(gwapiv1b1.GatewayConditionProgrammed), + Type: string(gwapiv1.GatewayConditionProgrammed), Status: metav1.ConditionFalse, Reason: "foo", }, b: metav1.Condition{ - Type: string(gwapiv1b1.GatewayConditionProgrammed), + Type: string(gwapiv1.GatewayConditionProgrammed), Status: metav1.ConditionFalse, Reason: "bar", }, @@ -171,11 +171,11 @@ func TestConditionChanged(t *testing.T) { name: "condition status differs", expected: true, a: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionTrue, }, b: metav1.Condition{ - Type: string(gwapiv1b1.GatewayClassConditionStatusAccepted), + Type: string(gwapiv1.GatewayClassConditionStatusAccepted), Status: metav1.ConditionFalse, }, }, @@ -293,7 +293,7 @@ func TestGatewayReadyCondition(t *testing.T) { deploymentStatus: appsv1.DeploymentStatus{AvailableReplicas: 1}, expect: metav1.Condition{ Status: metav1.ConditionTrue, - Reason: string(gwapiv1b1.GatewayConditionProgrammed), + Reason: string(gwapiv1.GatewayConditionProgrammed), }, }, { @@ -302,7 +302,7 @@ func TestGatewayReadyCondition(t *testing.T) { deploymentStatus: appsv1.DeploymentStatus{AvailableReplicas: 1}, expect: metav1.Condition{ Status: metav1.ConditionFalse, - Reason: string(gwapiv1b1.GatewayReasonAddressNotAssigned), + Reason: string(gwapiv1.GatewayReasonAddressNotAssigned), }, }, { @@ -311,7 +311,7 @@ func TestGatewayReadyCondition(t *testing.T) { deploymentStatus: appsv1.DeploymentStatus{AvailableReplicas: 0}, expect: metav1.Condition{ Status: metav1.ConditionFalse, - Reason: string(gwapiv1b1.GatewayReasonNoResources), + Reason: string(gwapiv1.GatewayReasonNoResources), }, }, } @@ -320,12 +320,12 @@ func TestGatewayReadyCondition(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() - gtw := &gwapiv1b1.Gateway{} + gtw := &gwapiv1.Gateway{} if tc.serviceAddress { - gtw.Status = gwapiv1b1.GatewayStatus{ - Addresses: []gwapiv1b1.GatewayStatusAddress{ + gtw.Status = gwapiv1.GatewayStatus{ + Addresses: []gwapiv1.GatewayStatusAddress{ { - Type: ptr.To(gwapiv1b1.IPAddressType), + Type: ptr.To(gwapiv1.IPAddressType), Value: "1.1.1.1", }, }, @@ -335,7 +335,7 @@ func TestGatewayReadyCondition(t *testing.T) { deployment := &appsv1.Deployment{Status: tc.deploymentStatus} got := computeGatewayProgrammedCondition(gtw, deployment) - assert.Equal(t, string(gwapiv1b1.GatewayConditionProgrammed), got.Type) + assert.Equal(t, string(gwapiv1.GatewayConditionProgrammed), got.Type) assert.Equal(t, tc.expect.Status, got.Status) assert.Equal(t, tc.expect.Reason, got.Reason) }) diff --git a/internal/status/gateway.go b/internal/status/gateway.go index 94fb938e258..7d7e96203f0 100644 --- a/internal/status/gateway.go +++ b/internal/status/gateway.go @@ -8,13 +8,13 @@ package status import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) // UpdateGatewayStatusAcceptedCondition updates the status condition for the provided Gateway based on the accepted state. -func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1b1.Gateway, accepted bool) *gwapiv1b1.Gateway { +func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1.Gateway, accepted bool) *gwapiv1.Gateway { gw.Status.Conditions = MergeConditions(gw.Status.Conditions, computeGatewayAcceptedCondition(gw, accepted)) return gw } @@ -22,7 +22,7 @@ func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1b1.Gateway, accepted bool) // UpdateGatewayStatusProgrammedCondition updates the status addresses for the provided gateway // based on the status IP/Hostname of svc and updates the Programmed condition based on the // service and deployment state. -func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1b1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, nodeAddresses ...string) { +func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, nodeAddresses ...string) { var addresses, hostnames []string // Update the status addresses field. if svc != nil { @@ -64,18 +64,18 @@ func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1b1.Gateway, svc *corev1.S } } - var gwAddresses []gwapiv1b1.GatewayStatusAddress + var gwAddresses []gwapiv1.GatewayStatusAddress for i := range addresses { - addr := gwapiv1b1.GatewayStatusAddress{ - Type: ptr.To(gwapiv1b1.IPAddressType), + addr := gwapiv1.GatewayStatusAddress{ + Type: ptr.To(gwapiv1.IPAddressType), Value: addresses[i], } gwAddresses = append(gwAddresses, addr) } for i := range hostnames { - addr := gwapiv1b1.GatewayStatusAddress{ - Type: ptr.To(gwapiv1b1.HostnameAddressType), + addr := gwapiv1.GatewayStatusAddress{ + Type: ptr.To(gwapiv1.HostnameAddressType), Value: hostnames[i], } gwAddresses = append(gwAddresses, addr) diff --git a/internal/status/gateway_test.go b/internal/status/gateway_test.go index 58da78a8e3e..c93ea62bef7 100644 --- a/internal/status/gateway_test.go +++ b/internal/status/gateway_test.go @@ -13,17 +13,17 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { type args struct { - gw *gwapiv1b1.Gateway + gw *gwapiv1.Gateway svc *corev1.Service deployment *appsv1.Deployment - addresses []gwapiv1b1.GatewayStatusAddress + addresses []gwapiv1.GatewayStatusAddress } tests := []struct { name string @@ -32,7 +32,7 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { { name: "nil svc", args: args{ - gw: &gwapiv1b1.Gateway{}, + gw: &gwapiv1.Gateway{}, svc: nil, addresses: nil, }, @@ -40,7 +40,7 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { { name: "LoadBalancer svc with ingress ip", args: args{ - gw: &gwapiv1b1.Gateway{}, + gw: &gwapiv1.Gateway{}, svc: &corev1.Service{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, @@ -58,9 +58,9 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { }, }, }, - addresses: []gwapiv1b1.GatewayStatusAddress{ + addresses: []gwapiv1.GatewayStatusAddress{ { - Type: ptr.To(gwapiv1b1.IPAddressType), + Type: ptr.To(gwapiv1.IPAddressType), Value: "127.0.0.1", }, }, @@ -69,7 +69,7 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { { name: "LoadBalancer svc with ingress hostname", args: args{ - gw: &gwapiv1b1.Gateway{}, + gw: &gwapiv1.Gateway{}, svc: &corev1.Service{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, @@ -87,13 +87,13 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { }, }, }, - addresses: []gwapiv1b1.GatewayStatusAddress{ + addresses: []gwapiv1.GatewayStatusAddress{ { - Type: ptr.To(gwapiv1b1.IPAddressType), + Type: ptr.To(gwapiv1.IPAddressType), Value: "127.0.0.1", }, { - Type: ptr.To(gwapiv1b1.HostnameAddressType), + Type: ptr.To(gwapiv1.HostnameAddressType), Value: "localhost", }, }, @@ -102,7 +102,7 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { { name: "ClusterIP svc", args: args{ - gw: &gwapiv1b1.Gateway{}, + gw: &gwapiv1.Gateway{}, svc: &corev1.Service{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, @@ -111,9 +111,9 @@ func TestUpdateGatewayStatusProgrammedCondition(t *testing.T) { Type: corev1.ServiceTypeClusterIP, }, }, - addresses: []gwapiv1b1.GatewayStatusAddress{ + addresses: []gwapiv1.GatewayStatusAddress{ { - Type: ptr.To(gwapiv1b1.IPAddressType), + Type: ptr.To(gwapiv1.IPAddressType), Value: "127.0.0.1", }, }, diff --git a/internal/status/gatewayclass.go b/internal/status/gatewayclass.go index ba7168d2a21..7a71ab23646 100644 --- a/internal/status/gatewayclass.go +++ b/internal/status/gatewayclass.go @@ -14,12 +14,12 @@ package status import ( - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" ) // SetGatewayClassAccepted inserts or updates the Accepted condition // for the provided GatewayClass. -func SetGatewayClassAccepted(gc *gwapiv1b1.GatewayClass, accepted bool, reason, msg string) *gwapiv1b1.GatewayClass { +func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass { gc.Status.Conditions = MergeConditions(gc.Status.Conditions, computeGatewayClassAcceptedCondition(gc, accepted, reason, msg)) return gc } diff --git a/internal/status/status.go b/internal/status/status.go index 876a074030d..cd7df4110da 100644 --- a/internal/status/status.go +++ b/internal/status/status.go @@ -24,8 +24,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" + gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" - gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) @@ -172,20 +172,20 @@ func (u *UpdateWriter) Send(update Update) { func isStatusEqual(objA, objB interface{}) bool { opts := cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime") switch a := objA.(type) { - case *gwapiv1b1.GatewayClass: - if b, ok := objB.(*gwapiv1b1.GatewayClass); ok { + case *gwapiv1.GatewayClass: + if b, ok := objB.(*gwapiv1.GatewayClass); ok { if cmp.Equal(a.Status, b.Status, opts) { return true } } - case *gwapiv1b1.Gateway: - if b, ok := objB.(*gwapiv1b1.Gateway); ok { + case *gwapiv1.Gateway: + if b, ok := objB.(*gwapiv1.Gateway); ok { if cmp.Equal(a.Status, b.Status, opts) { return true } } - case *gwapiv1b1.HTTPRoute: - if b, ok := objB.(*gwapiv1b1.HTTPRoute); ok { + case *gwapiv1.HTTPRoute: + if b, ok := objB.(*gwapiv1.HTTPRoute); ok { if cmp.Equal(a.Status, b.Status, opts) { return true } diff --git a/site/content/en/latest/design/watching.md b/site/content/en/latest/design/watching.md index 72a955043e0..5eabad7b3f9 100644 --- a/site/content/en/latest/design/watching.md +++ b/site/content/en/latest/design/watching.md @@ -22,12 +22,12 @@ the IR translator: ```go type ResourceTable struct { // gateway classes are cluster-scoped; no namespace - GatewayClasses watchable.Map[string, *gwapiv1b1.GatewayClass] + GatewayClasses watchable.Map[string, *gwapiv1.GatewayClass] // gateways are namespace-scoped, so use a k8s.io/apimachinery/pkg/types.NamespacedName as the map key. - Gateways watchable.Map[types.NamespacedName, *gwapiv1b1.Gateway] + Gateways watchable.Map[types.NamespacedName, *gwapiv1.Gateway] - HTTPRoutes watchable.Map[types.NamespacedName, *gwapiv1b1.HTTPRoute] + HTTPRoutes watchable.Map[types.NamespacedName, *gwapiv1.HTTPRoute] } ``` diff --git a/test/config/gatewayclass.yaml b/test/config/gatewayclass.yaml index aed59334ef4..24985fa0874 100644 --- a/test/config/gatewayclass.yaml +++ b/test/config/gatewayclass.yaml @@ -1,5 +1,5 @@ kind: GatewayClass -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 metadata: name: envoy-gateway spec: diff --git a/test/conformance/conformance_test.go b/test/conformance/conformance_test.go index a46d251a8c5..eacf3ff4e95 100644 --- a/test/conformance/conformance_test.go +++ b/test/conformance/conformance_test.go @@ -17,7 +17,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/gateway-api/conformance/tests" "sigs.k8s.io/gateway-api/conformance/utils/flags" "sigs.k8s.io/gateway-api/conformance/utils/suite" @@ -36,7 +36,7 @@ func TestGatewayAPIConformance(t *testing.T) { require.NoError(t, err) require.NoError(t, v1alpha2.AddToScheme(client.Scheme())) - require.NoError(t, v1beta1.AddToScheme(client.Scheme())) + require.NoError(t, v1.AddToScheme(client.Scheme())) cSuite := suite.New(suite.Options{ Client: client, diff --git a/test/conformance/experimental_conformance_test.go b/test/conformance/experimental_conformance_test.go index ee6f061944a..f057794f617 100644 --- a/test/conformance/experimental_conformance_test.go +++ b/test/conformance/experimental_conformance_test.go @@ -21,7 +21,7 @@ import ( "sigs.k8s.io/yaml" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" confv1a1 "sigs.k8s.io/gateway-api/conformance/apis/v1alpha1" "sigs.k8s.io/gateway-api/conformance/tests" "sigs.k8s.io/gateway-api/conformance/utils/flags" @@ -53,7 +53,7 @@ func TestExperimentalConformance(t *testing.T) { err = v1alpha2.AddToScheme(mgrClient.Scheme()) assert.NoError(t, err) - err = v1beta1.AddToScheme(mgrClient.Scheme()) + err = v1.AddToScheme(mgrClient.Scheme()) assert.NoError(t, err) // experimental conformance flags diff --git a/test/e2e/base/manifests.yaml b/test/e2e/base/manifests.yaml index b89746b8ffb..a4f39429e50 100644 --- a/test/e2e/base/manifests.yaml +++ b/test/e2e/base/manifests.yaml @@ -14,7 +14,7 @@ metadata: labels: gateway-conformance: infra --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: same-namespace @@ -29,7 +29,7 @@ spec: namespaces: from: Same --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: all-namespaces @@ -44,7 +44,7 @@ spec: namespaces: from: All --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: backend-namespaces diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 7ba69f3f252..4f8bdc65048 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -16,7 +16,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/gateway-api/apis/v1alpha2" - "sigs.k8s.io/gateway-api/apis/v1beta1" + "sigs.k8s.io/gateway-api/apis/v1" "sigs.k8s.io/gateway-api/conformance/utils/flags" "sigs.k8s.io/gateway-api/conformance/utils/suite" @@ -34,7 +34,7 @@ func TestE2E(t *testing.T) { require.NoError(t, err) require.NoError(t, v1alpha2.AddToScheme(client.Scheme())) - require.NoError(t, v1beta1.AddToScheme(client.Scheme())) + require.NoError(t, v1.AddToScheme(client.Scheme())) require.NoError(t, egv1a1.AddToScheme(client.Scheme())) t.Logf("Running E2E tests with %s GatewayClass\n cleanup: %t\n debug: %t\n supported features: [%v]\n exempt features: [%v]", diff --git a/test/e2e/testdata/accesslog-file.yaml b/test/e2e/testdata/accesslog-file.yaml index 18d164fc608..a6ab4998c7c 100644 --- a/test/e2e/testdata/accesslog-file.yaml +++ b/test/e2e/testdata/accesslog-file.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: accesslog-file diff --git a/test/e2e/testdata/accesslog-otel.yaml b/test/e2e/testdata/accesslog-otel.yaml index 8f9e4924080..a4a58cc3b37 100644 --- a/test/e2e/testdata/accesslog-otel.yaml +++ b/test/e2e/testdata/accesslog-otel.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: accesslog-otel diff --git a/test/e2e/testdata/envoy-patch-policy.yaml b/test/e2e/testdata/envoy-patch-policy.yaml index fa63ead7c80..e8f56215278 100644 --- a/test/e2e/testdata/envoy-patch-policy.yaml +++ b/test/e2e/testdata/envoy-patch-policy.yaml @@ -1,5 +1,5 @@ --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: http-envoy-patch-policy diff --git a/test/e2e/testdata/metric.yaml b/test/e2e/testdata/metric.yaml index 9417bd0c670..2d2c26311dc 100644 --- a/test/e2e/testdata/metric.yaml +++ b/test/e2e/testdata/metric.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: metric-prometheus diff --git a/test/e2e/testdata/ratelimit-based-jwt-claims.yaml b/test/e2e/testdata/ratelimit-based-jwt-claims.yaml index 5787c3c21ca..a7f4e375b97 100644 --- a/test/e2e/testdata/ratelimit-based-jwt-claims.yaml +++ b/test/e2e/testdata/ratelimit-based-jwt-claims.yaml @@ -30,7 +30,7 @@ spec: requests: 3 unit: Hour --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: http-ratelimit-based-jwt-claims diff --git a/test/e2e/testdata/ratelimit-block-all-ips.yaml b/test/e2e/testdata/ratelimit-block-all-ips.yaml index 67fc95ab3df..3935e6a6c20 100644 --- a/test/e2e/testdata/ratelimit-block-all-ips.yaml +++ b/test/e2e/testdata/ratelimit-block-all-ips.yaml @@ -15,7 +15,7 @@ spec: requests: 3 unit: Hour --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: http-ratelimit diff --git a/test/e2e/testdata/tracing-otel.yaml b/test/e2e/testdata/tracing-otel.yaml index b02e4943a12..f5b896a91c8 100644 --- a/test/e2e/testdata/tracing-otel.yaml +++ b/test/e2e/testdata/tracing-otel.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: tracing-otel diff --git a/tools/crd-ref-docs/config.yaml b/tools/crd-ref-docs/config.yaml index ef9d10c0b9f..e69de29bb2d 100644 --- a/tools/crd-ref-docs/config.yaml +++ b/tools/crd-ref-docs/config.yaml @@ -1,16 +0,0 @@ -processor: - # RE2 regular expressions describing types that should be excluded from the generated documentation. - ignoreTypes: - - "(EnvoyProxy|AuthenticationFilter|RateLimitFilter)List$" - # RE2 regular expressions describing type fields that should be excluded from the generated documentation. - ignoreFields: - - "status$" - - "TypeMeta$" - -render: - # Version of Kubernetes to use when generating links to Kubernetes API documentation. - kubernetesVersion: 1.26 - knownTypes: - - name: SecretObjectReference - package: sigs.k8s.io/gateway-api/apis/v1beta1 - link: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference