From 7ffa89f87e3286129e8bbe5c2681347a97863de1 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Tue, 11 Jun 2024 23:36:03 -0700 Subject: [PATCH] [release/v1.0] Cherry-pick fixes for v1.0.2 (#3593) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use - for naming service and container ports (#3130) * Use - for naming service and container ports Takes inspiration from https://github.com/envoyproxy/gateway/pull/2973 to name port, not off the listener but off the port-proto ensuring that patch (during updates) also works Fixes: https://github.com/envoyproxy/gateway/issues/3111 Signed-off-by: Arko Dasgupta * testdata Signed-off-by: Arko Dasgupta * fix test Signed-off-by: Arko Dasgupta * move to helper pkg Signed-off-by: Arko Dasgupta * fix e2e Signed-off-by: Arko Dasgupta * lint Signed-off-by: Arko Dasgupta * fix e2e Signed-off-by: Arko Dasgupta --------- Signed-off-by: Arko Dasgupta (cherry picked from commit c41247bb16d3ea01552656af90388e249575804b) Signed-off-by: Arko Dasgupta * bug: Tests are failing due to an expired certificate in one of the translator tests (#3476) Replaced a certificate in the test that had expired. The old certificate expired May 24 2024: Certificate: Data: Version: 1 (0x0) Serial Number: ca:7c:5c:b7:25:5d:bb:f9 Signature Algorithm: ecdsa-with-SHA256 Issuer: CN=test.example.com Validity Not Before: May 25 14:10:42 2023 GMT Not After : May 24 14:10:42 2024 GMT Subject: CN=test.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (384 bit) pub: 04:78:cb:47:0b:78:48:7a:ad:90:b1:d9:2d:4a:2f: d9:35:1f:cc:28:d6:af:4a:6d:c7:36:7e:ed:1a:88: 1f:a9:aa:a7:f0:04:a0:1c:86:bb:c9:45:3e:f8:fb: 28:0c:3e:a4:7f:ef:82:7b:bb:ac:77:49:90:3b:54: a7:75:82:16:8f:64:0b:88:8c:f4:35:91:fc:07:f4: 2b:e2:2e:c9:d0:82:b0:b1:09:54:9e:e9:d9:aa:fe: 4a:63:d4:cb:41:ad:27 ASN1 OID: secp384r1 NIST CURVE: P-384 Signature Algorithm: ecdsa-with-SHA256 Signature Value: 30:65:02:31:00:86:4e:33:e4:86:37:4c:26:a7:be:57:51:44: 8e:6c:88:ea:3c:03:58:00:a3:5e:7a:53:9e:2c:54:b3:ab:82: 25:fe:4c:e4:be:4d:8c:56:e2:da:d8:de:d2:20:ca:13:55:02: 30:0c:2a:27:a7:fd:2b:a9:87:4f:06:ea:4e:2d:cc:48:4d:9d: d7:cf:73:88:6d:98:54:18:83:6d:e5:a9:c3:84:75:c9:ee:c6: 0d:1a:15:a2:8c:68:86:88:83:17:b9:7a:9b The new certificate is good for 10 years. Certificate: Data: Version: 3 (0x2) Serial Number: 42:29:94:01:e1:cb:32:dc:f8:b4:64:6d:9e:1e:28:8d:7b:5a:53:3b Signature Algorithm: ecdsa-with-SHA256 Issuer: CN=test.example.com Validity Not Before: May 25 09:11:37 2024 GMT Not After : May 23 09:11:37 2034 GMT Subject: CN=test.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (384 bit) pub: 04:78:cb:47:0b:78:48:7a:ad:90:b1:d9:2d:4a:2f: d9:35:1f:cc:28:d6:af:4a:6d:c7:36:7e:ed:1a:88: 1f:a9:aa:a7:f0:04:a0:1c:86:bb:c9:45:3e:f8:fb: 28:0c:3e:a4:7f:ef:82:7b:bb:ac:77:49:90:3b:54: a7:75:82:16:8f:64:0b:88:8c:f4:35:91:fc:07:f4: 2b:e2:2e:c9:d0:82:b0:b1:09:54:9e:e9:d9:aa:fe: 4a:63:d4:cb:41:ad:27 ASN1 OID: secp384r1 NIST CURVE: P-384 X509v3 extensions: X509v3 Subject Key Identifier: DA:49:EA:13:99:CA:DE:10:D2:70:2B:27:E2:60:AA:E0:F4:7B:EA:50 X509v3 Authority Key Identifier: DA:49:EA:13:99:CA:DE:10:D2:70:2B:27:E2:60:AA:E0:F4:7B:EA:50 X509v3 Basic Constraints: critical CA:TRUE Signature Algorithm: ecdsa-with-SHA256 Signature Value: 30:65:02:30:6d:4e:25:4f:84:f4:38:7e:c4:de:c8:d1:55:0c: af:4b:e4:c0:a1:f3:59:de:fb:48:0a:96:07:65:29:9f:fe:7c: 3c:ee:f0:c9:ca:17:bc:cd:bd:a4:31:38:24:4f:c6:e5:02:31: 00:e6:9a:ce:52:60:4b:b8:0e:e7:23:6d:8a:69:a0:21:e5:d1: bb:e8:e9:09:6a:32:d6:8c:58:49:f4:76:86:e6:c1:b8:24:d3: 44:08:fa:1c:ef:34:70:c1:24:76:a9:35:8f Signed-off-by: Lior Okman (cherry picked from commit c2c9b43173895f65583fc9e087b8abac4db1c6be) Signed-off-by: Arko Dasgupta * fix: use Patch API for infra-client (#3034) * fix(infrastructure): use Patch API instead Signed-off-by: Ardika Bagus * chore: add interceptor for ApplyPatch on fake client Signed-off-by: Ardika Bagus * chore: trigger make generate Signed-off-by: Ardika Bagus * chore: remove update verb Signed-off-by: Ardika Bagus * chore: SetUID no longer needed Signed-off-by: Ardika Bagus --------- Signed-off-by: Ardika Bagus (cherry picked from commit cc01bf5ea9e962f82314d85e84b7a00b8314a34c) Signed-off-by: Arko Dasgupta * refactor: infra client CreateOrUpdate to ServerSideApply (#3134) * refactor(infra-client): CreateOrUpdate to ServerSideApply Signed-off-by: Ardika Bagus * test(infra-client): add e2e test for ServerSideApply Signed-off-by: Ardika Bagus * chore: remove comment Signed-off-by: Ardika Bagus * chore: fix linter Signed-off-by: Ardika Bagus --------- Signed-off-by: Ardika Bagus (cherry picked from commit 81108f2b5ff4e1bbabfdc60446f2052f77e4f029) Signed-off-by: Arko Dasgupta * fix: duplicated xroutes are added to gatewayapi.Resources (#3282) fix duplicated xroutes Signed-off-by: Dingkang Li (cherry picked from commit 32c6876f0bc825a9a1b46c499d4d898b2f65a0c4) Signed-off-by: Arko Dasgupta * fix: add proxy protocol always as first listenerFilter (#3332) * add proxy protocol always as first listenerFilter Signed-off-by: Jesse Haka * add test Signed-off-by: Jesse Haka --------- Signed-off-by: Jesse Haka (cherry picked from commit 6d8f2dce78381a9e3480cb174ee7ed3fbe390991) Signed-off-by: Arko Dasgupta * fix: security policy reference grant from field type (#3386) fix: security policy reference grant from field Signed-off-by: Eguzki Astiz Lezaun (cherry picked from commit bd72474a1ff02b1e8c96efa6ea16f9b5ccb9b2e9) Signed-off-by: Arko Dasgupta * bug: Route extension filters with different types but the same name and namespace aren't correctly cached (#3388) * Route extension filters are unstructured.Unstructured instances, so caching them should be done with both the name and type as a key. Signed-off-by: Lior Okman * Moved NamespacedNameAndType to the Kubernetes helpers, and renamed it to be clearer about what it has. Signed-off-by: Lior Okman * Also renamed the helper function. Signed-off-by: Lior Okman * Moved to the 'utils' package to be beside NamespacedName. Signed-off-by: Lior Okman * Renamed structure according to review, and updated the comments Signed-off-by: Lior Okman --------- Signed-off-by: Lior Okman (cherry picked from commit 95e2e3569953f5f4be74f55d9b1e6777d6e9d241) Signed-off-by: Arko Dasgupta * fix(translator): set ignoreCase for header matchers in extAuth (#3420) fix: set ignoreCase for header matchers in extAuth Signed-off-by: haoqixu (cherry picked from commit 8206e11d7ed3a04722b847f936437af66552cdef) Signed-off-by: Arko Dasgupta * fix secrets/configmap updates do not trigger a controller reconcile (#3499) * ensure both secrets and config map reconcile upon changes ensure secret/config map changes trigger a reconcile Signed-off-by: Alex Volchok * Update controller.go Signed-off-by: Alex Volchok * Update controller.go Signed-off-by: Alex Volchok --------- Signed-off-by: Alex Volchok (cherry picked from commit ff2c598bd657d724ed73b67b6520df2e4f765776) Signed-off-by: Arko Dasgupta * feat: backend TLS SAN validation (#3507) * BTLS: enforce SAN validation Signed-off-by: Guy Daich * use dedicated cert for ext-proc e2e test Signed-off-by: Guy Daich * fix ext-proc server client tls settings Signed-off-by: Guy Daich --------- Signed-off-by: Guy Daich (cherry picked from commit dc201ba00dad4b493d205680c245be0c18f91722) Signed-off-by: Arko Dasgupta * fix: ReplaceFullPath not working for root path (/) (#3530) * fix: ReplaceFullPath not working for root path (/) Takes https://github.com/envoyproxy/gateway/pull/2817 forward Signed-off-by: Arko Dasgupta (cherry picked from commit 8f83c3deef13e73c2db5f3a0cbd85eff74206833) Signed-off-by: Arko Dasgupta * chore: Remove namespace restriction for EnvoyProxy parametersRef reso… (#3544) chore: Remove namespace restriction for EnvoyProxy parametersRef resource (cherry picked from commit b870e3908a72fbefebadd1ae018cf289bb91e99a) Signed-off-by: Arko Dasgupta * fix test rm invalid diff related to https://github.com/envoyproxy/gateway/pull/3134 Signed-off-by: Arko Dasgupta * fix GatewayInfraResourceTest Signed-off-by: Arko Dasgupta --------- Signed-off-by: Arko Dasgupta Signed-off-by: Lior Okman Signed-off-by: Ardika Bagus Signed-off-by: Dingkang Li Signed-off-by: Jesse Haka Signed-off-by: Eguzki Astiz Lezaun Signed-off-by: haoqixu Signed-off-by: Alex Volchok Signed-off-by: Guy Daich Co-authored-by: Lior Okman Co-authored-by: Ardika Co-authored-by: Dingkang Li Co-authored-by: Jesse Haka Co-authored-by: Eguzki Astiz Lezaun Co-authored-by: xu0o0 Co-authored-by: Alex Volchok Co-authored-by: Guy Daich Co-authored-by: zou rui --- .../templates/infra-manager-rbac.yaml | 6 +- .../translate/out/quickstart.all.yaml | 2 +- internal/gatewayapi/helpers.go | 4 + internal/gatewayapi/listener.go | 6 +- .../backendtlspolicy-ca-only.out.yaml | 2 +- .../backendtlspolicy-default-ns.out.yaml | 2 +- .../backendtlspolicy-invalid-ca.out.yaml | 2 +- ...ackendtlspolicy-system-truststore.out.yaml | 2 +- ...dtlspolicy-without-referencegrant.out.yaml | 2 +- ...endtrafficpolicy-override-replace.out.yaml | 2 +- ...ndtrafficpolicy-status-conditions.out.yaml | 8 +- ...fficpolicy-status-fault-injection.out.yaml | 4 +- ...policy-with-circuitbreakers-error.out.yaml | 4 +- ...rafficpolicy-with-circuitbreakers.out.yaml | 4 +- ...endtrafficpolicy-with-healthcheck.out.yaml | 4 +- ...ndtrafficpolicy-with-loadbalancer.out.yaml | 4 +- ...telimit-default-route-level-limit.out.yaml | 2 +- ...ocal-ratelimit-invalid-limit-unit.out.yaml | 2 +- ...ocal-ratelimit-invalid-match-type.out.yaml | 2 +- ...valid-multiple-route-level-limits.out.yaml | 2 +- ...rafficpolicy-with-local-ratelimit.out.yaml | 2 +- ...dtrafficpolicy-with-proxyprotocol.out.yaml | 4 +- ...licy-with-ratelimit-invalid-regex.out.yaml | 2 +- ...ckendtrafficpolicy-with-ratelimit.out.yaml | 4 +- ...backendtrafficpolicy-with-retries.out.yaml | 4 +- ...olicy-with-same-prefix-httproutes.out.yaml | 2 +- ...ndtrafficpolicy-with-tcpkeepalive.out.yaml | 4 +- ...dtrafficpolicy-with-timeout-error.out.yaml | 2 +- ...backendtrafficpolicy-with-timeout.out.yaml | 4 +- ...trafficpolicy-client-ip-detection.out.yaml | 8 +- .../clienttrafficpolicy-headers.out.yaml | 4 +- .../clienttrafficpolicy-http10.out.yaml | 6 +- .../clienttrafficpolicy-http3.out.yaml | 2 +- .../clienttrafficpolicy-mtls.out.yaml | 6 +- ...clienttrafficpolicy-path-settings.out.yaml | 4 +- ...clienttrafficpolicy-preserve-case.out.yaml | 4 +- ...clienttrafficpolicy-proxyprotocol.out.yaml | 4 +- ...nttrafficpolicy-status-conditions.out.yaml | 10 +- ...clienttrafficpolicy-tcp-keepalive.out.yaml | 4 +- ...ttrafficpolicy-timeout-with-error.out.yaml | 2 +- .../clienttrafficpolicy-timeout.out.yaml | 4 +- .../clienttrafficpolicy-tls-settings.out.yaml | 4 +- .../clienttrafficpolicy-trailers.out.yaml | 4 +- .../testdata/conflicting-policies.out.yaml | 2 +- .../testdata/disable-accesslog.out.yaml | 2 +- .../envoypatchpolicy-cross-ns-target.out.yaml | 2 +- ...chpolicy-invalid-feature-disabled.out.yaml | 2 +- ...nvalid-target-kind-merge-gateways.out.yaml | 2 +- ...oypatchpolicy-invalid-target-kind.out.yaml | 2 +- ...ypatchpolicy-valid-merge-gateways.out.yaml | 2 +- .../testdata/envoypatchpolicy-valid.out.yaml | 2 +- ...oxy-accesslog-file-json-no-format.out.yaml | 2 +- .../envoyproxy-accesslog-file-json.out.yaml | 2 +- ...voyproxy-accesslog-with-bad-sinks.out.yaml | 2 +- .../testdata/envoyproxy-accesslog.out.yaml | 2 +- .../testdata/envoyproxy-valid.out.yaml | 2 +- ...th-extension-filter-invalid-group.out.yaml | 2 +- ...ith-non-matching-extension-filter.out.yaml | 2 +- ...with-unsupported-extension-filter.out.yaml | 2 +- ...route-with-valid-extension-filter.out.yaml | 2 +- ...-namespace-with-allowed-httproute.out.yaml | 2 +- ...mespace-with-disallowed-httproute.out.yaml | 2 +- .../testdata/gateway-infrastructure.out.yaml | 2 +- ...way-with-addresses-with-ipaddress.out.yaml | 2 +- ...route-with-mismatch-port-protocol.out.yaml | 2 +- ...h-tcproute-with-multiple-backends.out.yaml | 2 +- ...with-tcproute-with-multiple-rules.out.yaml | 2 +- ...her-namespace-allowed-by-refgrant.out.yaml | 2 +- ...ith-tls-terminate-and-passthrough.out.yaml | 4 +- ...route-with-mismatch-port-protocol.out.yaml | 2 +- ...h-udproute-with-multiple-backends.out.yaml | 2 +- ...with-udproute-with-multiple-rules.out.yaml | 2 +- ...-listener-with-unmatched-tcproute.out.yaml | 2 +- ...-listener-with-unmatched-udproute.out.yaml | 2 +- ...with-same-algorithm-different-fqdn.in.yaml | 2 +- ...ith-same-algorithm-different-fqdn.out.yaml | 4 +- ...-valid-multiple-tls-configuration.out.yaml | 2 +- ...ener-with-valid-tls-configuration.out.yaml | 2 +- ...with-preexisting-status-condition.out.yaml | 2 +- ...-listener-with-multiple-tcproutes.out.yaml | 2 +- ...-listener-with-multiple-udproutes.out.yaml | 2 +- ...teway-with-stale-status-condition.out.yaml | 2 +- ...listeners-on-same-tcp-or-tls-port.out.yaml | 2 +- ...th-two-listeners-on-same-udp-port.out.yaml | 2 +- ...isteners-with-multiple-httproutes.out.yaml | 4 +- ...-with-same-port-http-tcp-protocol.out.yaml | 4 +- ...-with-same-port-http-udp-protocol.out.yaml | 4 +- ...s-with-tcproutes-with-sectionname.out.yaml | 4 +- ...ith-tcproutes-without-sectionname.out.yaml | 4 +- ...s-with-udproutes-with-sectionname.out.yaml | 4 +- ...ith-udproutes-without-sectionname.out.yaml | 4 +- .../grpcroute-with-empty-backends.out.yaml | 2 +- .../grpcroute-with-header-match.out.yaml | 2 +- ...ute-with-method-and-service-match.out.yaml | 2 +- .../grpcroute-with-method-match.out.yaml | 2 +- ...oute-with-request-header-modifier.out.yaml | 2 +- .../grpcroute-with-service-match.out.yaml | 2 +- ...dtrafficpolicy-with-timeout-error.out.yaml | 2 +- ...backendtrafficpolicy-with-timeout.out.yaml | 4 +- ...way-with-more-different-listeners.out.yaml | 16 +- ...ng-to-gateway-with-more-listeners.out.yaml | 2 +- ...wo-listeners-with-different-ports.out.yaml | 4 +- ...ing-to-gateway-with-two-listeners.out.yaml | 2 +- .../httproute-attaching-to-gateway.out.yaml | 2 +- ...taching-to-listener-matching-port.out.yaml | 2 +- ...ner-on-gateway-with-two-listeners.out.yaml | 2 +- ...ort-backendrefs-diff-address-type.out.yaml | 2 +- ...ort-backendrefs-same-address-type.out.yaml | 2 +- ...port-backendref-fqdn-address-type.out.yaml | 2 +- ...ort-backendref-mixed-address-type.out.yaml | 2 +- ...ner-with-serviceimport-backendref.out.yaml | 2 +- .../httproute-attaching-to-listener.out.yaml | 2 +- ...httproute-backend-request-timeout.out.yaml | 2 +- ...ing-to-listener-non-matching-port.out.yaml | 2 +- .../httproute-request-timeout.out.yaml | 2 +- ...ith-empty-backends-and-no-filters.out.yaml | 2 +- ...-multiple-backends-and-no-weights.out.yaml | 2 +- ...ith-multiple-backends-and-weights.out.yaml | 2 +- ...her-namespace-allowed-by-refgrant.out.yaml | 2 +- ...her-namespace-allowed-by-refgrant.out.yaml | 2 +- .../httproute-with-empty-matches.out.yaml | 2 +- ...er-duplicate-add-multiple-filters.out.yaml | 2 +- ...with-header-filter-duplicate-adds.out.yaml | 2 +- ...duplicate-remove-multiple-filters.out.yaml | 2 +- ...h-header-filter-duplicate-removes.out.yaml | 2 +- ...header-filter-empty-header-values.out.yaml | 2 +- ...-with-header-filter-empty-headers.out.yaml | 2 +- ...ith-header-filter-invalid-headers.out.yaml | 2 +- ...ute-with-header-filter-no-headers.out.yaml | 2 +- ...th-header-filter-no-valid-headers.out.yaml | 2 +- ...tproute-with-header-filter-remove.out.yaml | 2 +- ...with-invalid-backend-ref-bad-port.out.yaml | 2 +- ...invalid-backend-ref-invalid-group.out.yaml | 2 +- ...-invalid-backend-ref-invalid-kind.out.yaml | 2 +- ...-with-invalid-backend-ref-no-port.out.yaml | 2 +- ...lid-backend-ref-no-service.import.out.yaml | 2 +- ...th-invalid-backend-ref-no-service.out.yaml | 2 +- ...id-backend-ref-unsupported-filter.out.yaml | 2 +- ...lid-backendref-in-other-namespace.out.yaml | 2 +- .../httproute-with-invalid-regex.out.yaml | 4 +- ...ute-with-mirror-filter-duplicates.out.yaml | 2 +- ...route-with-mirror-filter-multiple.out.yaml | 2 +- ...ith-mirror-filter-service-no-port.out.yaml | 2 +- ...h-mirror-filter-service-not-found.out.yaml | 2 +- .../httproute-with-mirror-filter.out.yaml | 2 +- ...to-gateway-with-wildcard-hostname.out.yaml | 2 +- ...ct-filter-full-path-replace-https.out.yaml | 2 +- ...ute-with-redirect-filter-hostname.out.yaml | 2 +- ...direct-filter-invalid-filter-type.out.yaml | 2 +- ...th-redirect-filter-invalid-scheme.out.yaml | 2 +- ...th-redirect-filter-invalid-status.out.yaml | 2 +- ...ter-prefix-replace-with-port-http.out.yaml | 2 +- ...-with-response-header-filter-adds.out.yaml | 2 +- ...er-duplicate-add-multiple-filters.out.yaml | 2 +- ...onse-header-filter-duplicate-adds.out.yaml | 2 +- ...duplicate-remove-multiple-filters.out.yaml | 2 +- ...e-header-filter-duplicate-removes.out.yaml | 2 +- ...header-filter-empty-header-values.out.yaml | 2 +- ...ponse-header-filter-empty-headers.out.yaml | 2 +- ...nse-header-filter-invalid-headers.out.yaml | 2 +- ...response-header-filter-no-headers.out.yaml | 2 +- ...se-header-filter-no-valid-headers.out.yaml | 2 +- ...ith-response-header-filter-remove.out.yaml | 2 +- ...single-rule-with-exact-path-match.out.yaml | 2 +- ...ingle-rule-with-http-method-match.out.yaml | 2 +- ...h-single-rule-with-multiple-rules.out.yaml | 2 +- ...h-prefix-and-exact-header-matches.out.yaml | 2 +- ...e-invalid-backend-refs-no-service.out.yaml | 2 +- ...to-gateway-with-wildcard-hostname.out.yaml | 2 +- ...to-gateway-with-wildcard-hostname.out.yaml | 2 +- ...ite-filter-full-path-replace-http.out.yaml | 2 +- ...te-filter-hostname-prefix-replace.out.yaml | 2 +- ...e-with-urlrewrite-filter-hostname.out.yaml | 2 +- ...ewrite-filter-invalid-filter-type.out.yaml | 2 +- ...rlrewrite-filter-invalid-hostname.out.yaml | 2 +- ...e-filter-invalid-multiple-filters.out.yaml | 2 +- ...lrewrite-filter-invalid-path-type.out.yaml | 2 +- ...th-urlrewrite-filter-invalid-path.out.yaml | 2 +- ...th-urlrewrite-filter-missing-path.out.yaml | 2 +- ...ewrite-filter-prefix-replace-http.out.yaml | 2 +- ...ng-to-gateway-with-unset-hostname.out.yaml | 2 +- .../httproutes-with-multiple-matches.out.yaml | 2 +- .../merge-invalid-multiple-gateways.out.yaml | 4 +- ...ays-multiple-listeners-same-ports.out.yaml | 4 +- ...multiple-gateways-multiple-routes.out.yaml | 4 +- .../merge-valid-multiple-gateways.out.yaml | 4 +- .../merge-with-isolated-policies-2.out.yaml | 4 +- .../merge-with-isolated-policies.out.yaml | 4 +- ...curitypolicy-invalid-cross-ns-ref.out.yaml | 2 +- .../securitypolicy-override-replace.out.yaml | 2 +- .../securitypolicy-status-conditions.out.yaml | 6 +- .../securitypolicy-with-basic-auth.out.yaml | 2 +- .../securitypolicy-with-cors.out.yaml | 6 +- ...-extauth-invalid-no-matching-port.out.yaml | 2 +- ...licy-with-extauth-invalid-no-port.out.yaml | 2 +- ...xtauth-invalid-no-reference-grant.out.yaml | 2 +- ...y-with-extauth-invalid-no-service.out.yaml | 2 +- ...ith-extauth-with-backendtlspolicy.out.yaml | 2 +- .../securitypolicy-with-extauth.out.yaml | 2 +- ...ypolicy-with-jwt-and-invalid-oidc.out.yaml | 2 +- ...cy-with-jwt-with-custom-extractor.out.yaml | 4 +- .../testdata/securitypolicy-with-jwt.out.yaml | 4 +- ...typolicy-with-oidc-invalid-issuer.out.yaml | 2 +- ...olicy-with-oidc-invalid-secretref.out.yaml | 6 +- .../securitypolicy-with-oidc.out.yaml | 2 +- ...teway-with-listener-tls-terminate.out.yaml | 2 +- .../tlsroute-attaching-to-gateway.out.yaml | 2 +- .../testdata/tlsroute-multiple.out.yaml | 2 +- ...her-namespace-allowed-by-refgrant.out.yaml | 2 +- .../tlsroute-with-empty-hostname.out.yaml | 2 +- ...oute-with-empty-listener-hostname.out.yaml | 2 +- .../infrastructure/kubernetes/infra_client.go | 28 +-- .../kubernetes/infra_resource.go | 65 +------ .../kubernetes/proxy/resource.go | 3 +- .../kubernetes/proxy/resource_provider.go | 4 +- .../proxy/testdata/deployments/bootstrap.yaml | 4 +- .../testdata/deployments/component-level.yaml | 4 +- .../proxy/testdata/deployments/custom.yaml | 4 +- .../custom_with_initcontainers.yaml | 4 +- .../testdata/deployments/default-env.yaml | 4 +- .../proxy/testdata/deployments/default.yaml | 4 +- .../deployments/disable-prometheus.yaml | 4 +- .../testdata/deployments/extension-env.yaml | 4 +- .../override-labels-and-annotations.yaml | 4 +- .../deployments/patch-deployment.yaml | 4 +- .../deployments/shutdown-manager.yaml | 4 +- .../proxy/testdata/deployments/volumes.yaml | 4 +- .../deployments/with-annotations.yaml | 4 +- .../deployments/with-concurrency.yaml | 4 +- .../testdata/deployments/with-extra-args.yaml | 4 +- .../deployments/with-image-pull-secrets.yaml | 4 +- .../deployments/with-node-selector.yaml | 4 +- .../with-topology-spread-constraints.yaml | 4 +- .../services/clusterIP-custom-addresses.yaml | 4 +- .../proxy/testdata/services/custom.yaml | 4 +- .../proxy/testdata/services/default.yaml | 4 +- .../services/override-annotations.yaml | 4 +- .../testdata/services/patch-service.yaml | 4 +- .../testdata/services/with-annotations.yaml | 4 +- .../kubernetes/proxy_configmap_test.go | 11 +- .../kubernetes/proxy_deployment_test.go | 17 +- .../kubernetes/proxy_infra_test.go | 39 +++- .../kubernetes/proxy_serviceaccount_test.go | 11 +- .../kubernetes/ratelimit_deployment_test.go | 11 +- .../ratelimit_serviceaccount_test.go | 11 +- internal/provider/kubernetes/controller.go | 33 +++- internal/provider/kubernetes/routes.go | 62 +++++- internal/provider/kubernetes/routes_test.go | 110 ++++++++++- internal/utils/misc.go | 20 ++ internal/xds/translator/extauth.go | 2 + internal/xds/translator/proxy_protocol.go | 3 +- .../xds/translator/proxy_protocol_test.go | 58 ++++++ internal/xds/translator/route.go | 2 +- .../out/xds-ir/ext-auth.listeners.yaml | 4 + ...ttp-route-rewrite-url-fullpath.routes.yaml | 2 +- ...e-with-tls-system-truststore.clusters.yaml | 4 + ...ith-tlsbundle-multiple-certs.clusters.yaml | 48 +++-- .../http-route-with-tlsbundle.clusters.yaml | 16 +- ...port-with-different-filters.listeners.yaml | 4 + internal/xds/translator/translator.go | 32 +++- .../clienttrafficpolicy_test.go | 3 +- .../testdata/httproute-rewrite-full-path.yaml | 22 +++ test/e2e/tests/gateway_infra_resource.go | 176 ++++++++++++++++++ test/e2e/tests/httproute-rewrite-full-path.go | 59 ++++++ 264 files changed, 1042 insertions(+), 476 deletions(-) create mode 100644 internal/xds/translator/proxy_protocol_test.go create mode 100644 test/e2e/testdata/httproute-rewrite-full-path.yaml create mode 100644 test/e2e/tests/gateway_infra_resource.go create mode 100644 test/e2e/tests/httproute-rewrite-full-path.go diff --git a/charts/gateway-helm/templates/infra-manager-rbac.yaml b/charts/gateway-helm/templates/infra-manager-rbac.yaml index 3929524f484..ad8aa5e5b0b 100644 --- a/charts/gateway-helm/templates/infra-manager-rbac.yaml +++ b/charts/gateway-helm/templates/infra-manager-rbac.yaml @@ -14,8 +14,8 @@ rules: verbs: - create - get - - update - delete + - patch - apiGroups: - apps resources: @@ -23,8 +23,8 @@ rules: verbs: - create - get - - update - delete + - patch - apiGroups: - autoscaling resources: @@ -32,8 +32,8 @@ rules: verbs: - create - get - - update - delete + - patch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml b/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml index 3f2009bccf3..3ea1f3f2bc7 100644 --- a/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml @@ -80,7 +80,7 @@ infraIR: name: envoy-gateway-system/eg/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/helpers.go b/internal/gatewayapi/helpers.go index 9fb98f591c7..bd0aaf4b192 100644 --- a/internal/gatewayapi/helpers.go +++ b/internal/gatewayapi/helpers.go @@ -359,6 +359,10 @@ func irUDPListenerName(listener *ListenerContext, udpRoute *UDPRouteContext) str return fmt.Sprintf("%s/%s/%s/%s", listener.gateway.Namespace, listener.gateway.Name, listener.Name, udpRoute.Name) } +func irListenerPortName(proto ir.ProtocolType, port int32) string { + return strings.ToLower(fmt.Sprintf("%s-%d", proto, port)) +} + func irRoutePrefix(route RouteContext) string { // add a "/" at the end of the prefix to prevent mismatching routes with the // same prefix. For example, route prefix "/foo/" should not match a route "/foobar". diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index de94aaf27e9..d5ee13bd056 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -144,12 +144,8 @@ func (t *Translator) processInfraIRListener(listener *ListenerContext, infraIR I proto = ir.UDPProtocolType } - infraPortName := string(listener.Name) - if t.MergeGateways { - infraPortName = irHTTPListenerName(listener) - } infraPort := ir.ListenerPort{ - Name: infraPortName, + Name: irListenerPortName(proto, servicePort.port), Protocol: proto, ServicePort: servicePort.port, ContainerPort: servicePortToContainerPort(servicePort.port), diff --git a/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml index b38d38425b9..36887849504 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml @@ -119,7 +119,7 @@ infraIR: name: envoy-gateway/gateway-btls/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml index 8b258dac8db..ab976df8c4f 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml @@ -118,7 +118,7 @@ infraIR: name: envoy-gateway/gateway-btls/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-invalid-ca.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-invalid-ca.out.yaml index ae583f55e47..47e7c66c07e 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-invalid-ca.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-invalid-ca.out.yaml @@ -119,7 +119,7 @@ infraIR: name: envoy-gateway/gateway-btls/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml index 760e7864048..300718931e5 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml @@ -115,7 +115,7 @@ infraIR: name: envoy-gateway/gateway-btls/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-without-referencegrant.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-without-referencegrant.out.yaml index d2f92086f1a..38794ab9df8 100755 --- a/internal/gatewayapi/testdata/backendtlspolicy-without-referencegrant.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-without-referencegrant.out.yaml @@ -120,7 +120,7 @@ infraIR: name: envoy-gateway/gateway-btls/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml index 23c2e1c1f5c..18879240a3c 100755 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml @@ -196,7 +196,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml index 2adaa229dd6..64c6932c2a3 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml @@ -505,7 +505,7 @@ infraIR: name: another-namespace/not-same-namespace-gateway/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -520,7 +520,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -535,14 +535,14 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/tcp ports: - containerPort: 10053 - name: tcp + name: tcp-53 protocol: TCP servicePort: 53 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml index 7cbbb266058..b322ce55192 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml @@ -303,7 +303,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -318,7 +318,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml index 867a99f85bc..45d95e8aaf9 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml @@ -285,7 +285,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -300,7 +300,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml index 1324a75e0ef..1c0c622624e 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml @@ -226,7 +226,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -241,7 +241,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml index 34b5a13021e..2205a1cc1b6 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml @@ -436,7 +436,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -451,7 +451,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml index f47f84a874a..f3836170e44 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml @@ -325,7 +325,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -340,7 +340,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml index 26e2ac288e9..4f4cb6d5165 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml @@ -137,7 +137,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml index 3100a7e26df..0b81c2dd0de 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml @@ -141,7 +141,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml index 853a1ac1c5f..68ed3affde6 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml @@ -137,7 +137,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml index 7acba1f616b..32d1661ea55 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml @@ -144,7 +144,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml index 624ffa15384..11012aa6940 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml @@ -140,7 +140,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml index b43f116ef08..2344cae4a31 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml @@ -218,7 +218,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -233,7 +233,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml index 50bf055b039..360544da250 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml @@ -123,7 +123,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml index 21a149aa542..750b4243777 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml @@ -238,7 +238,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -253,7 +253,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml index b3c699e39a3..206b93b9f6a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml @@ -237,7 +237,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -252,7 +252,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml index aa69f61da8e..130958f4d46 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml @@ -156,7 +156,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml index 0610f61fb9c..ea98b67e005 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml @@ -222,7 +222,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -237,7 +237,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml index d54df2b9e25..3adff744df7 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml @@ -114,7 +114,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml index 4af65e3ca35..58ea2d64060 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml @@ -226,7 +226,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -241,7 +241,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-client-ip-detection.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-client-ip-detection.out.yaml index 308d12d7948..61ff96bfeca 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-client-ip-detection.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-client-ip-detection.out.yaml @@ -230,28 +230,28 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 8081 - name: http-1 + name: http-8081 protocol: HTTP servicePort: 8081 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8082 - name: http-2 + name: http-8082 protocol: HTTP servicePort: 8082 - address: null name: envoy-gateway/gateway-1/http-3 ports: - containerPort: 8083 - name: http-3 + name: http-8083 protocol: HTTP servicePort: 8083 - address: null name: envoy-gateway/gateway-1/http-4 ports: - containerPort: 8084 - name: http-4 + name: http-8084 protocol: HTTP servicePort: 8084 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-headers.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-headers.out.yaml index a3bf3ad5ce2..80989aefa44 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-headers.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-headers.out.yaml @@ -105,14 +105,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml index 1165ba87e91..df2e0592b6b 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml @@ -199,21 +199,21 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 - address: null name: envoy-gateway/gateway-1/http-3 ports: - containerPort: 8081 - name: http-3 + name: http-8081 protocol: HTTP servicePort: 8081 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml index bfdd73846a2..a58801dd58b 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml @@ -118,7 +118,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-mtls.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-mtls.out.yaml index e5ee7a11a3c..eb75fd79c30 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-mtls.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-mtls.out.yaml @@ -197,14 +197,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10443 - name: http-1 + name: https-443 protocol: HTTPS servicePort: 443 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: @@ -219,7 +219,7 @@ infraIR: name: envoy-gateway/gateway-2/http-1 ports: - containerPort: 10443 - name: http-1 + name: https-443 protocol: HTTPS servicePort: 443 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml index 419fbf076aa..e16a5cf2344 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml @@ -106,14 +106,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-preserve-case.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-preserve-case.out.yaml index 7deea550663..af97e2397ca 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-preserve-case.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-preserve-case.out.yaml @@ -106,14 +106,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml index dd61eb7fe89..7b57484d3df 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml @@ -106,14 +106,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml index 5527116ad7d..fddae6e6c9e 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml @@ -458,7 +458,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -473,14 +473,14 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/tcp ports: - containerPort: 10053 - name: tcp + name: tcp-53 protocol: TCP servicePort: 53 metadata: @@ -495,7 +495,7 @@ infraIR: name: envoy-gateway/gateway-3/bar-foo ports: - containerPort: 10080 - name: bar-foo + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -510,7 +510,7 @@ infraIR: name: not-same-namespace/not-same-namespace-gateway/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml index fa977c27444..c7557020382 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml @@ -142,14 +142,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-timeout-with-error.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-timeout-with-error.out.yaml index 245a10810b3..eaf13c0af18 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-timeout-with-error.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-timeout-with-error.out.yaml @@ -77,7 +77,7 @@ infraIR: name: envoy-gateway/gateway/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-timeout.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-timeout.out.yaml index d4fedc92372..9c83084ce76 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-timeout.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-timeout.out.yaml @@ -108,14 +108,14 @@ infraIR: name: envoy-gateway/gateway/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml index e4fcd514d15..924a9a14920 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml @@ -123,14 +123,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10443 - name: http-1 + name: https-443 protocol: HTTPS servicePort: 443 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-trailers.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-trailers.out.yaml index cf3abc4f51d..b2c1145c06c 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-trailers.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-trailers.out.yaml @@ -105,14 +105,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8080 - name: http-2 + name: http-8080 protocol: HTTP servicePort: 8080 metadata: diff --git a/internal/gatewayapi/testdata/conflicting-policies.out.yaml b/internal/gatewayapi/testdata/conflicting-policies.out.yaml index d8b882d368a..89d53e73bb9 100644 --- a/internal/gatewayapi/testdata/conflicting-policies.out.yaml +++ b/internal/gatewayapi/testdata/conflicting-policies.out.yaml @@ -215,7 +215,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: default/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/disable-accesslog.out.yaml b/internal/gatewayapi/testdata/disable-accesslog.out.yaml index c181084ce7c..5e21c8da8a1 100644 --- a/internal/gatewayapi/testdata/disable-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/disable-accesslog.out.yaml @@ -108,7 +108,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml index 1abf6f7b392..f8f19bea288 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-feature-disabled.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-feature-disabled.out.yaml index 711b21017b2..2ca7aebf74e 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-feature-disabled.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-feature-disabled.out.yaml @@ -58,7 +58,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml index bccd6afd479..704229e1ca3 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml @@ -58,7 +58,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml index 9db1977241c..666505048fb 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml index 714ecafe2ed..557d4479be3 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml @@ -58,7 +58,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml index 0b958297b20..175494af945 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 38dc310911b..cb6ead4197b 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 @@ -114,7 +114,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml index 938b626c7a2..5b2a0c5a529 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml @@ -117,7 +117,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 380b27a715a..0ff70786f0e 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml @@ -115,7 +115,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml index 0b7a942a01c..8ea9e2e4fad 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml @@ -122,7 +122,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml index 92f6d9b5580..bb432530148 100644 --- a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml @@ -105,7 +105,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b772bd943c9..0607032af8f 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 @@ -95,7 +95,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8bab973f1e6..0a691324cda 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 4f318617bed..2f8e19d300e 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b468c423db5..ed697a91ad0 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 4b5c58da3f1..7ec08cdd2c8 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 @@ -82,7 +82,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 4d0863926db..e04a9abcc61 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 @@ -82,7 +82,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml index 2eac73861c6..2cca7a21513 100644 --- a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml +++ b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml @@ -95,7 +95,7 @@ infraIR: name: default/gateway-1/https ports: - containerPort: 10443 - name: https + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 7424d6332bf..1001026c2be 100644 --- a/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-addresses-with-ipaddress.out.yaml @@ -52,7 +52,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10080 - name: tcp + name: tcp-80 protocol: TCP servicePort: 80 metadata: 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 9ad4d5f2eb1..00a01a90dfe 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10162 - name: tcp + name: tcp-162 protocol: TCP servicePort: 162 metadata: 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 d68f758d473..d87a590cc69 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10080 - name: tcp + name: tcp-80 protocol: TCP servicePort: 80 metadata: 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 73accd49f5b..0298d8e8bc7 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10080 - name: tcp + name: tcp-80 protocol: TCP servicePort: 80 metadata: 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 b1f4d6530d0..a501e2a7ccd 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 @@ -89,7 +89,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 88856e37f64..bb6c6d082bb 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 @@ -119,14 +119,14 @@ infraIR: name: envoy-gateway/gateway-1/tls-passthrough ports: - containerPort: 10090 - name: tls-passthrough + name: tls-90 protocol: TLS servicePort: 90 - address: null name: envoy-gateway/gateway-1/tls-terminate ports: - containerPort: 10443 - name: tls-terminate + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 86546252947..ddbf1400ee6 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/udp ports: - containerPort: 10162 - name: udp + name: udp-162 protocol: UDP servicePort: 162 metadata: 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 bed2cc4aa37..69ece808c6b 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/udp ports: - containerPort: 10080 - name: udp + name: udp-80 protocol: UDP servicePort: 80 metadata: 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 51b01238520..56d9c366b02 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/udp ports: - containerPort: 10080 - name: udp + name: udp-80 protocol: UDP servicePort: 80 metadata: 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 74e11eb415a..dd31bd501ea 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10080 - name: tcp + name: tcp-80 protocol: TCP servicePort: 80 metadata: 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 cee2e52e84e..27d949d622e 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/udp ports: - containerPort: 10080 - name: udp + name: udp-80 protocol: UDP servicePort: 80 metadata: 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 82743664172..bfe07030233 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 @@ -35,7 +35,7 @@ secrets: name: tls-secret-ecdsa-2 type: kubernetes.io/tls data: - tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJZakNCNlFJSkFNcDhYTGNsWGJ2NU1Bb0dDQ3FHU000OUJBTUNNQnN4R1RBWEJnTlZCQU1NRUhSbGMzUXUKWlhoaGJYQnNaUzVqYjIwd0hoY05Nak13TlRJMU1UUXhNRFF5V2hjTk1qUXdOVEkwTVRReE1EUXlXakFiTVJrdwpGd1lEVlFRRERCQjBaWE4wTG1WNFlXMXdiR1V1WTI5dE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFCmVNdEhDM2hJZXEyUXNka3RTaS9aTlIvTUtOYXZTbTNITm43dEdvZ2ZxYXFuOEFTZ0hJYTd5VVUrK1Bzb0RENmsKZisrQ2U3dXNkMG1RTzFTbmRZSVdqMlFMaUl6ME5aSDhCL1FyNGk3SjBJS3dzUWxVbnVuWnF2NUtZOVRMUWEwbgpNQW9HQ0NxR1NNNDlCQU1DQTJnQU1HVUNNUUNHVGpQa2hqZE1KcWUrVjFGRWpteUk2andEV0FDalhucFRuaXhVCnM2dUNKZjVNNUw1TmpGYmkydGplMGlES0UxVUNNQXdxSjZmOUs2bUhUd2JxVGkzTVNFMmQxODl6aUcyWVZCaUQKYmVXcHc0UjF5ZTdHRFJvVm9veG9ob2lERjdsNm13PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ5RENDQVU2Z0F3SUJBZ0lVUWltVUFlSExNdHo0dEdSdG5oNG9qWHRhVXpzd0NnWUlLb1pJemowRUF3SXcKR3pFWk1CY0dBMVVFQXd3UWRHVnpkQzVsZUdGdGNHeGxMbU52YlRBZUZ3MHlOREExTWpVd09URXhNemRhRncwegpOREExTWpNd09URXhNemRhTUJzeEdUQVhCZ05WQkFNTUVIUmxjM1F1WlhoaGJYQnNaUzVqYjIwd2RqQVFCZ2NxCmhrak9QUUlCQmdVcmdRUUFJZ05pQUFSNHkwY0xlRWg2clpDeDJTMUtMOWsxSDh3bzFxOUtiY2MyZnUwYWlCK3AKcXFmd0JLQWNocnZKUlQ3NCt5Z01QcVIvNzRKN3U2eDNTWkE3VktkMWdoYVBaQXVJalBRMWtmd0g5Q3ZpTHNuUQpnckN4Q1ZTZTZkbXEva3BqMU10QnJTZWpVekJSTUIwR0ExVWREZ1FXQkJUYVNlb1RtY3JlRU5Kd0t5ZmlZS3JnCjlIdnFVREFmQmdOVkhTTUVHREFXZ0JUYVNlb1RtY3JlRU5Kd0t5ZmlZS3JnOUh2cVVEQVBCZ05WSFJNQkFmOEUKQlRBREFRSC9NQW9HQ0NxR1NNNDlCQU1DQTJnQU1HVUNNRzFPSlUrRTlEaCt4TjdJMFZVTXIwdmt3S0h6V2Q3NwpTQXFXQjJVcG4vNThQTzd3eWNvWHZNMjlwREU0SkUvRzVRSXhBT2FhemxKZ1M3Z081eU50aW1tZ0llWFJ1K2pwCkNXb3kxb3hZU2ZSMmh1YkJ1Q1RUUkFqNkhPODBjTUVrZHFrMWp3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= tls.key: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1JR2tBZ0VCQkRDUUE5VWo0SkR5c0Q0MlJIMGI2cjU5NTlXTmlXU2ZKZlMxK2RvTjk0TzZCUGdaQUJiUTI4eTIKUTZsM3pZdklLeFNnQndZRks0RUVBQ0toWkFOaUFBUjR5MGNMZUVoNnJaQ3gyUzFLTDlrMUg4d28xcTlLYmNjMgpmdTBhaUIrcHFxZndCS0FjaHJ2SlJUNzQreWdNUHFSLzc0Sjd1NngzU1pBN1ZLZDFnaGFQWkF1SWpQUTFrZndICjlDdmlMc25RZ3JDeENWU2U2ZG1xL2twajFNdEJyU2M9Ci0tLS0tRU5EIEVDIFBSSVZBVEUgS0VZLS0tLS0K httpRoutes: - apiVersion: gateway.networking.k8s.io/v1 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 6d6ac8724c6..76e4558dfbe 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 @@ -91,7 +91,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: @@ -141,4 +141,4 @@ xdsIR: serverCertificate: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJnVENDQVNlZ0F3SUJBZ0lVRm1sOExCRzBvL1FLNFErWjdrODI0c0MyaUZ3d0NnWUlLb1pJemowRUF3SXcKRmpFVU1CSUdBMVVFQXd3TFptOXZMbUpoY2k1amIyMHdIaGNOTWpRd01qSTVNRGt6TURFd1doY05NelF3TWpJMgpNRGt6TURFd1dqQVdNUlF3RWdZRFZRUUREQXRtYjI4dVltRnlMbU52YlRCWk1CTUdCeXFHU000OUFnRUdDQ3FHClNNNDlBd0VIQTBJQUJMYVl2cUt1VlZveERvNTJlV3p2WUI1anc3RU1GODZybXlvaTVadWF5emRNdnBnNHpCcjgKUktCak5zK1QxakI4T0t1Y1MvN1JVRHgwcHorOTc2ek0zaU9qVXpCUk1CMEdBMVVkRGdRV0JCVE82K2NnMFIwZAp3dHJ6SlFQRzZnNzZoQkJVelRBZkJnTlZIU01FR0RBV2dCVE82K2NnMFIwZHd0cnpKUVBHNmc3NmhCQlV6VEFQCkJnTlZIUk1CQWY4RUJUQURBUUgvTUFvR0NDcUdTTTQ5QkFNQ0EwZ0FNRVVDSVFDMlhwUFFnUXpXYWUzYjVwWnQKR2N1TWZESjBjME9QS2NuZWdrWFoyQzRCM2dJZ1Uvc1Jrd0lwTFFOUlYrRWFZdzRQNVQ1Z1BFNlkrVnBtQzk4aApvVmpaL3pRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t - name: envoy-gateway/tls-secret-ecdsa-2 privateKey: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1JR2tBZ0VCQkRDUUE5VWo0SkR5c0Q0MlJIMGI2cjU5NTlXTmlXU2ZKZlMxK2RvTjk0TzZCUGdaQUJiUTI4eTIKUTZsM3pZdklLeFNnQndZRks0RUVBQ0toWkFOaUFBUjR5MGNMZUVoNnJaQ3gyUzFLTDlrMUg4d28xcTlLYmNjMgpmdTBhaUIrcHFxZndCS0FjaHJ2SlJUNzQreWdNUHFSLzc0Sjd1NngzU1pBN1ZLZDFnaGFQWkF1SWpQUTFrZndICjlDdmlMc25RZ3JDeENWU2U2ZG1xL2twajFNdEJyU2M9Ci0tLS0tRU5EIEVDIFBSSVZBVEUgS0VZLS0tLS0K - serverCertificate: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJZakNCNlFJSkFNcDhYTGNsWGJ2NU1Bb0dDQ3FHU000OUJBTUNNQnN4R1RBWEJnTlZCQU1NRUhSbGMzUXUKWlhoaGJYQnNaUzVqYjIwd0hoY05Nak13TlRJMU1UUXhNRFF5V2hjTk1qUXdOVEkwTVRReE1EUXlXakFiTVJrdwpGd1lEVlFRRERCQjBaWE4wTG1WNFlXMXdiR1V1WTI5dE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFCmVNdEhDM2hJZXEyUXNka3RTaS9aTlIvTUtOYXZTbTNITm43dEdvZ2ZxYXFuOEFTZ0hJYTd5VVUrK1Bzb0RENmsKZisrQ2U3dXNkMG1RTzFTbmRZSVdqMlFMaUl6ME5aSDhCL1FyNGk3SjBJS3dzUWxVbnVuWnF2NUtZOVRMUWEwbgpNQW9HQ0NxR1NNNDlCQU1DQTJnQU1HVUNNUUNHVGpQa2hqZE1KcWUrVjFGRWpteUk2andEV0FDalhucFRuaXhVCnM2dUNKZjVNNUw1TmpGYmkydGplMGlES0UxVUNNQXdxSjZmOUs2bUhUd2JxVGkzTVNFMmQxODl6aUcyWVZCaUQKYmVXcHc0UjF5ZTdHRFJvVm9veG9ob2lERjdsNm13PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + serverCertificate: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ5RENDQVU2Z0F3SUJBZ0lVUWltVUFlSExNdHo0dEdSdG5oNG9qWHRhVXpzd0NnWUlLb1pJemowRUF3SXcKR3pFWk1CY0dBMVVFQXd3UWRHVnpkQzVsZUdGdGNHeGxMbU52YlRBZUZ3MHlOREExTWpVd09URXhNemRhRncwegpOREExTWpNd09URXhNemRhTUJzeEdUQVhCZ05WQkFNTUVIUmxjM1F1WlhoaGJYQnNaUzVqYjIwd2RqQVFCZ2NxCmhrak9QUUlCQmdVcmdRUUFJZ05pQUFSNHkwY0xlRWg2clpDeDJTMUtMOWsxSDh3bzFxOUtiY2MyZnUwYWlCK3AKcXFmd0JLQWNocnZKUlQ3NCt5Z01QcVIvNzRKN3U2eDNTWkE3VktkMWdoYVBaQXVJalBRMWtmd0g5Q3ZpTHNuUQpnckN4Q1ZTZTZkbXEva3BqMU10QnJTZWpVekJSTUIwR0ExVWREZ1FXQkJUYVNlb1RtY3JlRU5Kd0t5ZmlZS3JnCjlIdnFVREFmQmdOVkhTTUVHREFXZ0JUYVNlb1RtY3JlRU5Kd0t5ZmlZS3JnOUh2cVVEQVBCZ05WSFJNQkFmOEUKQlRBREFRSC9NQW9HQ0NxR1NNNDlCQU1DQTJnQU1HVUNNRzFPSlUrRTlEaCt4TjdJMFZVTXIwdmt3S0h6V2Q3NwpTQXFXQjJVcG4vNThQTzd3eWNvWHZNMjlwREU0SkUvRzVRSXhBT2FhemxKZ1M3Z081eU50aW1tZ0llWFJ1K2pwCkNXb3kxb3hZU2ZSMmh1YkJ1Q1RUUkFqNkhPODBjTUVrZHFrMWp3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= 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 a4499bc066e..e9534d5bd7b 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 @@ -91,7 +91,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 9380a03ce6c..cdc613c4a9a 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 @@ -88,7 +88,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 d2dce6e0af7..aefd53705de 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml @@ -82,7 +82,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 f332997f2c5..0bd36bdaac1 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10162 - name: tcp + name: tcp-162 protocol: TCP servicePort: 162 metadata: 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 708916becce..22e840d232a 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 @@ -45,7 +45,7 @@ infraIR: name: envoy-gateway/gateway-1/udp ports: - containerPort: 10162 - name: udp + name: udp-162 protocol: UDP servicePort: 162 metadata: 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 05ae433a1a5..acb517c5b82 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml @@ -88,7 +88,7 @@ infraIR: name: default/gateway-1/https ports: - containerPort: 10443 - name: https + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 532e03227db..0e65142eb85 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 @@ -74,7 +74,7 @@ infraIR: name: envoy-gateway/gateway-1/tcp1 ports: - containerPort: 10162 - name: tcp1 + name: tcp-162 protocol: TCP servicePort: 162 metadata: 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 64b52d04f8e..68f755e99ab 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 @@ -72,7 +72,7 @@ infraIR: name: envoy-gateway/gateway-1/udp1 ports: - containerPort: 10162 - name: udp1 + name: udp-162 protocol: UDP servicePort: 162 metadata: 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 267296982ad..e43457681d5 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 @@ -147,14 +147,14 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 10081 - name: http-2 + name: http-81 protocol: HTTP servicePort: 81 metadata: 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 61119e9b76a..0233225bb98 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 @@ -110,14 +110,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/tcp ports: - containerPort: 10080 - name: tcp + name: tcp-80 protocol: TCP servicePort: 80 metadata: 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 fb19c1102f6..7ac4c4e14b3 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 @@ -110,14 +110,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/udp ports: - containerPort: 10080 - name: udp + name: udp-80 protocol: UDP servicePort: 80 metadata: 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 246d53aa32f..bf49b0dafaa 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 @@ -72,14 +72,14 @@ infraIR: name: envoy-gateway/gateway-1/tcp1 ports: - containerPort: 10162 - name: tcp1 + name: tcp-162 protocol: TCP servicePort: 162 - address: null name: envoy-gateway/gateway-1/tcp2 ports: - containerPort: 10163 - name: tcp2 + name: tcp-163 protocol: TCP servicePort: 163 metadata: 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 1ee22061b3d..733f4e76b16 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 @@ -72,14 +72,14 @@ infraIR: name: envoy-gateway/gateway-1/tcp1 ports: - containerPort: 10161 - name: tcp1 + name: tcp-161 protocol: TCP servicePort: 161 - address: null name: envoy-gateway/gateway-1/tcp2 ports: - containerPort: 10162 - name: tcp2 + name: tcp-162 protocol: TCP servicePort: 162 metadata: 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 b9a54af4594..418f7a0ad4e 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 @@ -72,14 +72,14 @@ infraIR: name: envoy-gateway/gateway-1/udp1 ports: - containerPort: 10162 - name: udp1 + name: udp-162 protocol: UDP servicePort: 162 - address: null name: envoy-gateway/gateway-1/udp2 ports: - containerPort: 10163 - name: udp2 + name: udp-163 protocol: UDP servicePort: 163 metadata: 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 12fe93bd326..17b9d4e2253 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 @@ -72,14 +72,14 @@ infraIR: name: envoy-gateway/gateway-1/udp1 ports: - containerPort: 10161 - name: udp1 + name: udp-161 protocol: UDP servicePort: 161 - address: null name: envoy-gateway/gateway-1/udp2 ports: - containerPort: 10162 - name: udp2 + name: udp-162 protocol: UDP servicePort: 162 metadata: diff --git a/internal/gatewayapi/testdata/grpcroute-with-empty-backends.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-empty-backends.out.yaml index 57d5ad03bf5..23d899faad6 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-empty-backends.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-empty-backends.out.yaml @@ -82,7 +82,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml index d2abc957458..2c5ecc13bf0 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 45acfd7e614..eb7ce849a96 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 @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml index 67ed17a35f4..82a2584d195 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml @@ -88,7 +88,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 76f8148dce5..ad5e96b684b 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml @@ -87,7 +87,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml index ca598b9d046..aa2ef46b259 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml @@ -88,7 +88,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml index 001de5ea84e..88becd8a82a 100644 --- a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml +++ b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml @@ -121,7 +121,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml index 5ca518d493d..6ece1834d62 100644 --- a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml @@ -227,7 +227,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -242,7 +242,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 9d0c0d570c9..197503b51c5 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 @@ -293,56 +293,56 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10081 - name: http-1 + name: http-81 protocol: HTTP servicePort: 81 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 10082 - name: http-2 + name: http-82 protocol: HTTP servicePort: 82 - address: null name: envoy-gateway/gateway-1/http-3 ports: - containerPort: 10083 - name: http-3 + name: http-83 protocol: HTTP servicePort: 83 - address: null name: envoy-gateway/gateway-1/http-4 ports: - containerPort: 10084 - name: http-4 + name: http-84 protocol: HTTP servicePort: 84 - address: null name: envoy-gateway/gateway-1/http-5 ports: - containerPort: 10085 - name: http-5 + name: http-85 protocol: HTTP servicePort: 85 - address: null name: envoy-gateway/gateway-1/http-6 ports: - containerPort: 10086 - name: http-6 + name: http-86 protocol: HTTP servicePort: 86 - address: null name: envoy-gateway/gateway-1/http-7 ports: - containerPort: 10087 - name: http-7 + name: http-87 protocol: HTTP servicePort: 87 - address: null name: envoy-gateway/gateway-1/http-8 ports: - containerPort: 10088 - name: http-8 + name: http-88 protocol: HTTP servicePort: 88 metadata: 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 90041233336..1c238cdf039 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 @@ -293,7 +293,7 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 2fd05635ddf..e16ff66b0ea 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 @@ -117,14 +117,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/tls ports: - containerPort: 10443 - name: tls + name: https-443 protocol: HTTPS servicePort: 443 metadata: 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 cda246ecc6c..1d39beaf5e7 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 @@ -113,7 +113,7 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml index 39834ebc86e..352a6da41a5 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml @@ -82,7 +82,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 813d9250277..6ddbd88af2a 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 bbc2f85502a..3e2ef78a015 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 @@ -115,7 +115,7 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml index 967713517a0..e2a3401c217 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml index 2a60e150ec6..a1e080d6482 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml index 369959e0c7d..134162f6b5c 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml index cd98ee93cc8..8a3c4a0587a 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8ffa5793822..c1bb62b6797 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml index 55c1ac1b83d..0d0d1755ef4 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml @@ -84,7 +84,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml index e448a02bf2d..f56835ccb2e 100644 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 783b3be7b30..e7474693b36 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 @@ -85,7 +85,7 @@ infraIR: name: envoy-gateway/gateway-1/http-1 ports: - containerPort: 10080 - name: http-1 + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml index ec80e30e1e8..3d3f73076ee 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-rule-with-empty-backends-and-no-filters.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-empty-backends-and-no-filters.out.yaml index d49bb265d46..6a99fbe90e3 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-empty-backends-and-no-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-empty-backends-and-no-filters.out.yaml @@ -79,7 +79,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 048b705766e..8a8b799c552 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 53038b2348b..b962d108c8b 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 @@ -92,7 +92,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b827af53150..a170bf0e21f 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 @@ -84,7 +84,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 485d59bcde1..2501f9d8c20 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml index 5ef60eccf6a..d345186e64c 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml @@ -81,7 +81,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 9d439afa3c6..d1b3c41b858 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 @@ -102,7 +102,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 7d69c437116..ec57fd25d09 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 @@ -112,7 +112,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 f8a325b46ee..c290d1a96c5 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 @@ -98,7 +98,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 53c939f2b0d..d6d97d8e7d4 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b5193139bbe..c74c9294dab 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 @@ -96,7 +96,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 c95a7df7e41..5065aa523df 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 @@ -98,7 +98,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 949dce73540..93f152ffea8 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 @@ -99,7 +99,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 c3ab6b9f021..d06a9820f7a 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 @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 6102adbb08e..3329848de05 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 3ac50c40bac..f0e08c90108 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 9c3bab389cf..d976cb93f38 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 @@ -83,7 +83,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 5f78538385f..fe064903ada 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 @@ -87,7 +87,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b38425e7563..bee00784ac7 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 @@ -84,7 +84,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 6668252cdbc..417f53c7dfb 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 @@ -83,7 +83,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 da0bce317d6..a6c22425e84 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 @@ -85,7 +85,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 ddaccd43a10..2bf53591ed3 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 @@ -83,7 +83,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-unsupported-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-unsupported-filter.out.yaml index f916d303053..26c803f9d91 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-unsupported-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-unsupported-filter.out.yaml @@ -89,7 +89,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8d622b36680..cc0cc881a87 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 @@ -84,7 +84,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml index 8e676db62f1..a8e06b4fa54 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml @@ -119,7 +119,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -134,7 +134,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10081 - name: http + name: http-81 protocol: HTTP servicePort: 81 metadata: 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 431a85a1dca..8ed5fe11eff 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml @@ -100,7 +100,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8588726a36e..425bebf34b3 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml @@ -112,7 +112,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 a5b71817a08..60b599dcdd7 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 a9fb238b04f..724d00e1ecc 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml index d324d246514..d98e16bd4d3 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 293b36390b1..ebe71a52556 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 95a7cbdc1d4..c1f9030ef3c 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 @@ -92,7 +92,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 77254975bde..0cc17703e29 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 2491b007b73..a7a57501a4e 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 96974409276..c408f51ffb5 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 @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 e330972e2a8..99c291b14ae 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 @@ -89,7 +89,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 961afbb26f1..bb9d2644130 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 43c7a116b4b..b3625b41e1a 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 @@ -108,7 +108,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 4fba4eb7b99..05f34deb133 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 @@ -102,7 +102,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 61441d6a1d6..6c95d3dbc5f 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 @@ -112,7 +112,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 4f58c01222d..3183508ec02 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 @@ -98,7 +98,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 0cd94a754a4..e20ab6f52fc 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b7f3e26ef42..4de5380a305 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 @@ -96,7 +96,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 50fe9f29aed..c0a449536bd 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 @@ -98,7 +98,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 bb974df71b8..14f957bb880 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 @@ -99,7 +99,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 48c3b5f8f5b..41667e93380 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 @@ -90,7 +90,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 e3c8a6dbec0..2ee89577ab9 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 1ea53e4797d..4e06010a1a2 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 0b9bc1037ec..9f7d91d4ec7 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 @@ -83,7 +83,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 291e21eebcc..55059d9d6ee 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 @@ -81,7 +81,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 6cdc1ed6c56..7cae3475b67 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 @@ -109,7 +109,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b16e4cfe932..f48725ca3ce 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 @@ -87,7 +87,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 ad7e977d4a8..da444284df0 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 @@ -87,7 +87,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 2beec1c17f5..f2aab324c92 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 @@ -85,7 +85,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 a2a913ec417..f07df0591d4 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 @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8b2138f2100..e2cbea3dd90 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 9ea570c292b..2b59d98a5b1 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 bf682e88b35..6a2571e0e26 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml @@ -91,7 +91,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b85ff6e2db3..79131ac54f1 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 @@ -91,7 +91,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 448b7518fc0..21596a52d42 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 @@ -97,7 +97,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 cac49f264af..7f25b160719 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 @@ -99,7 +99,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 a8e83b7761e..6429820c1a3 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 @@ -95,7 +95,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 9633fa077b5..0cf9358e1ac 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 @@ -94,7 +94,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 7ff23ecae5d..8d3cb231dd9 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 @@ -92,7 +92,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 bc23aabd4d7..44067c28c56 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 @@ -93,7 +93,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 8d436c384cb..0353ec71963 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 @@ -84,7 +84,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml index 325c79da51d..58921ad7474 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml @@ -269,7 +269,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml b/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml index 8e65705fc44..c37bd4038e5 100644 --- a/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml +++ b/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml @@ -116,14 +116,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/udp ports: - containerPort: 10080 - name: envoy-gateway/gateway-2/udp + name: udp-80 protocol: UDP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-listeners-same-ports.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-listeners-same-ports.out.yaml index 94ab094ec2e..085d78dd41c 100755 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-listeners-same-ports.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-listeners-same-ports.out.yaml @@ -152,14 +152,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-1/http-2 ports: - containerPort: 8888 - name: envoy-gateway/gateway-1/http-2 + name: http-8888 protocol: HTTP servicePort: 8888 metadata: diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml index 073d47f8cfc..e02cf0852f4 100644 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml @@ -203,14 +203,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/http-2 ports: - containerPort: 8888 - name: envoy-gateway/gateway-2/http-2 + name: http-8888 protocol: HTTP servicePort: 8888 metadata: diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml index 1346f408115..e91403b3cf4 100644 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml @@ -125,14 +125,14 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: envoy-gateway/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/http-2 ports: - containerPort: 8888 - name: envoy-gateway/gateway-2/http-2 + name: http-8888 protocol: HTTP servicePort: 8888 metadata: diff --git a/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml b/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml index 15e35504f91..aee2ff9ca5c 100755 --- a/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml +++ b/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml @@ -406,14 +406,14 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: default/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: default/gateway-2/http ports: - containerPort: 10081 - name: default/gateway-2/http + name: http-81 protocol: HTTP servicePort: 81 metadata: diff --git a/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml b/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml index 2da58361ab6..58be70944a0 100644 --- a/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml +++ b/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml @@ -236,14 +236,14 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: default/gateway-1/http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: default/gateway-2/http-2 ports: - containerPort: 8888 - name: default/gateway-2/http-2 + name: http-8888 protocol: HTTP servicePort: 8888 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-invalid-cross-ns-ref.out.yaml b/internal/gatewayapi/testdata/securitypolicy-invalid-cross-ns-ref.out.yaml index 3bb9ae1338d..fd0c493464e 100755 --- a/internal/gatewayapi/testdata/securitypolicy-invalid-cross-ns-ref.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-invalid-cross-ns-ref.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml b/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml index 1224320c631..793cf8fcb20 100755 --- a/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml @@ -124,7 +124,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml index 843d5410402..9eea091231c 100755 --- a/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml @@ -210,7 +210,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -225,14 +225,14 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 - address: null name: envoy-gateway/gateway-2/tcp ports: - containerPort: 10053 - name: tcp + name: tcp-53 protocol: TCP servicePort: 53 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml index d862fd9d11e..e5ede5ab003 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml @@ -86,7 +86,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml index 943ea81307a..688134dfb4f 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml @@ -238,7 +238,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -253,7 +253,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -268,7 +268,7 @@ infraIR: name: envoy-gateway/gateway-3/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml index 0868f2ae76d..36e024718d8 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml @@ -86,7 +86,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml index 115a3ba7436..abbf2646c8c 100755 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml @@ -86,7 +86,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml index 1e547408f25..b1cf4380437 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml @@ -86,7 +86,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml index 47720b9bbb0..1e9f4fb80be 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml @@ -86,7 +86,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml index 5b413d59432..2f6e6a22d00 100755 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml @@ -190,7 +190,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml index 93666da42bb..ee734150eb0 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml @@ -124,7 +124,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml index a8e01e48023..86732013dc3 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml @@ -124,7 +124,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml index 2ea03bafc0b..6232bfbd78c 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml @@ -160,7 +160,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -175,7 +175,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml index 6af406789f9..bb6945a043a 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml @@ -160,7 +160,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -175,7 +175,7 @@ infraIR: name: envoy-gateway/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml index bc8e64eeeda..d2a6d6afab3 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml @@ -47,7 +47,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml index 34c9a927508..2ea3ac2420d 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml @@ -127,7 +127,7 @@ infraIR: name: default/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -142,7 +142,7 @@ infraIR: name: default/gateway-2/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: @@ -157,7 +157,7 @@ infraIR: name: default/gateway-3/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml index ad55d9bba65..2945b737d34 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml @@ -124,7 +124,7 @@ infraIR: name: envoy-gateway/gateway-1/http ports: - containerPort: 10080 - name: http + name: http-80 protocol: HTTP servicePort: 80 metadata: 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 b4ac4a13faa..44fe206db9b 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 @@ -51,7 +51,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10090 - name: tls + name: tls-90 protocol: TLS servicePort: 90 metadata: diff --git a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml index c5156d74c40..7438edad63a 100644 --- a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml @@ -48,7 +48,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10090 - name: tls + name: tls-90 protocol: TLS servicePort: 90 metadata: diff --git a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml index ada467afc07..4b53cc38e3c 100644 --- a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10091 - name: tls + name: tls-91 protocol: TLS servicePort: 91 metadata: 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 c4a9bb0ee13..f7839533321 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 @@ -48,7 +48,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10090 - name: tls + name: tls-90 protocol: TLS servicePort: 90 metadata: diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml index 8b6843bf49a..7444d808de3 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10091 - name: tls + name: tls-91 protocol: TLS servicePort: 91 metadata: 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 493fbf296d4..1a45b65bb80 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml @@ -47,7 +47,7 @@ infraIR: name: envoy-gateway/gateway-1/tls ports: - containerPort: 10091 - name: tls + name: tls-91 protocol: TLS servicePort: 91 metadata: diff --git a/internal/infrastructure/kubernetes/infra_client.go b/internal/infrastructure/kubernetes/infra_client.go index e1c2a0b2b89..0d3a01e5da0 100644 --- a/internal/infrastructure/kubernetes/infra_client.go +++ b/internal/infrastructure/kubernetes/infra_client.go @@ -11,7 +11,6 @@ import ( kerrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -25,28 +24,13 @@ func New(cli client.Client) *InfraClient { } } -func (cli *InfraClient) CreateOrUpdate(ctx context.Context, key client.ObjectKey, current client.Object, specific client.Object, updateChecker func() bool) error { - return retry.RetryOnConflict(retry.DefaultBackoff, func() error { - if err := cli.Client.Get(ctx, key, current); err != nil { - if kerrors.IsNotFound(err) { - // Create if it does not exist. - if err := cli.Client.Create(ctx, specific); err != nil { - return fmt.Errorf("for Create: %w", err) - } - } - } else { - // Since the client.Object does not have a specific Spec field to compare - // just perform an update for now. - if updateChecker() { - specific.SetUID(current.GetUID()) - if err := cli.Client.Update(ctx, specific); err != nil { - return fmt.Errorf("for Update: %w", err) - } - } - } +func (cli *InfraClient) ServerSideApply(ctx context.Context, obj client.Object) error { + opts := []client.PatchOption{client.ForceOwnership, client.FieldOwner("envoy-gateway")} + if err := cli.Client.Patch(ctx, obj, client.Apply, opts...); err != nil { + return fmt.Errorf("failed to create/update resource with server-side apply for obj %v: %w", obj, err) + } - return nil - }) + return nil } func (cli *InfraClient) Delete(ctx context.Context, object client.Object) error { diff --git a/internal/infrastructure/kubernetes/infra_resource.go b/internal/infrastructure/kubernetes/infra_resource.go index e03f33ce788..20f5ea9929c 100644 --- a/internal/infrastructure/kubernetes/infra_resource.go +++ b/internal/infrastructure/kubernetes/infra_resource.go @@ -7,18 +7,11 @@ package kubernetes import ( "context" - "reflect" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/resource" - "github.com/envoyproxy/gateway/internal/utils" ) // createOrUpdateServiceAccount creates a ServiceAccount in the kube api server based on the @@ -29,14 +22,7 @@ func (i *Infra) createOrUpdateServiceAccount(ctx context.Context, r ResourceRend return err } - current := &corev1.ServiceAccount{} - key := utils.NamespacedName(sa) - - return i.Client.CreateOrUpdate(ctx, key, current, sa, func() bool { - // the service account never changed, does not need to update - // fixes https://github.com/envoyproxy/gateway/issues/1604 - return false - }) + return i.Client.ServerSideApply(ctx, sa) } // createOrUpdateConfigMap creates a ConfigMap in the Kube api server based on the provided @@ -50,15 +36,8 @@ func (i *Infra) createOrUpdateConfigMap(ctx context.Context, r ResourceRender) e if cm == nil { return nil } - current := &corev1.ConfigMap{} - key := types.NamespacedName{ - Namespace: cm.Namespace, - Name: cm.Name, - } - return i.Client.CreateOrUpdate(ctx, key, current, cm, func() bool { - return !reflect.DeepEqual(cm.Data, current.Data) - }) + return i.Client.ServerSideApply(ctx, cm) } // createOrUpdateDeployment creates a Deployment in the kube api server based on the provided @@ -69,25 +48,7 @@ func (i *Infra) createOrUpdateDeployment(ctx context.Context, r ResourceRender) return err } - current := &appsv1.Deployment{} - key := types.NamespacedName{ - Namespace: deployment.Namespace, - Name: deployment.Name, - } - - hpa, err := r.HorizontalPodAutoscaler() - if err != nil { - return err - } - - var opts cmp.Options - if hpa != nil { - opts = append(opts, cmpopts.IgnoreFields(appsv1.DeploymentSpec{}, "Replicas")) - } - - return i.Client.CreateOrUpdate(ctx, key, current, deployment, func() bool { - return !cmp.Equal(current.Spec, deployment.Spec, opts...) - }) + return i.Client.ServerSideApply(ctx, deployment) } // createOrUpdateHPA creates HorizontalPodAutoscaler object in the kube api server based on @@ -105,15 +66,7 @@ func (i *Infra) createOrUpdateHPA(ctx context.Context, r ResourceRender) error { return i.deleteHPA(ctx, r) } - current := &autoscalingv2.HorizontalPodAutoscaler{} - key := types.NamespacedName{ - Namespace: hpa.Namespace, - Name: hpa.Name, - } - - return i.Client.CreateOrUpdate(ctx, key, current, hpa, func() bool { - return !cmp.Equal(hpa.Spec, current.Spec) - }) + return i.Client.ServerSideApply(ctx, hpa) } // createOrUpdateRateLimitService creates a Service in the kube api server based on the provided ResourceRender, @@ -124,15 +77,7 @@ func (i *Infra) createOrUpdateService(ctx context.Context, r ResourceRender) err return err } - current := &corev1.Service{} - key := types.NamespacedName{ - Namespace: svc.Namespace, - Name: svc.Name, - } - - return i.Client.CreateOrUpdate(ctx, key, current, svc, func() bool { - return !resource.CompareSvc(svc, current) - }) + return i.Client.ServerSideApply(ctx, svc) } // deleteServiceAccount deletes the ServiceAccount in the kube api server, if it exists. diff --git a/internal/infrastructure/kubernetes/proxy/resource.go b/internal/infrastructure/kubernetes/proxy/resource.go index c0cc459da95..17f9e6e2916 100644 --- a/internal/infrastructure/kubernetes/proxy/resource.go +++ b/internal/infrastructure/kubernetes/proxy/resource.go @@ -119,8 +119,7 @@ func expectedProxyContainers(infra *ir.ProxyInfra, return nil, fmt.Errorf("invalid protocol %q", p.Protocol) } port := corev1.ContainerPort{ - // hashed container port name including up to the 6 characters of the port name and the maximum of 15 characters. - Name: utils.GetHashedName(p.Name, 6), + Name: p.Name, ContainerPort: p.ContainerPort, Protocol: protocol, } diff --git a/internal/infrastructure/kubernetes/proxy/resource_provider.go b/internal/infrastructure/kubernetes/proxy/resource_provider.go index 2a11f7317d3..92833a4eecb 100644 --- a/internal/infrastructure/kubernetes/proxy/resource_provider.go +++ b/internal/infrastructure/kubernetes/proxy/resource_provider.go @@ -76,7 +76,7 @@ func (r *ResourceRender) Service() (*corev1.Service, error) { } p := corev1.ServicePort{ - Name: ExpectedResourceHashedName(port.Name), + Name: port.Name, Protocol: protocol, Port: port.ServicePort, TargetPort: target, @@ -86,7 +86,7 @@ func (r *ResourceRender) Service() (*corev1.Service, error) { if port.Protocol == ir.HTTPSProtocolType { if listener.HTTP3 != nil { p := corev1.ServicePort{ - Name: ExpectedResourceHashedName(port.Name + "-h3"), + Name: port.Name + "-h3", Protocol: corev1.ProtocolUDP, Port: port.ServicePort, TargetPort: target, diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml index 5f8f699b211..fae7d329604 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml @@ -68,10 +68,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml index 18a84e131fe..16e46c15a6b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml @@ -69,10 +69,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml index e26fd3bb243..9dd4af6006b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml @@ -194,10 +194,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml index f02af889f68..a2f634b8f68 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml @@ -194,10 +194,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml index 04221e4729e..5da31d921e1 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml @@ -192,10 +192,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml index b606cb64157..28268bfbeeb 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml @@ -191,10 +191,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml index d58ed035086..7212abcf000 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml @@ -165,10 +165,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP readinessProbe: failureThreshold: 3 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml index 17067fe31c1..915693b6246 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml @@ -196,10 +196,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml index ac914c514b5..40e58547137 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml @@ -202,10 +202,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml index da58eac5704..d65690d0c45 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml @@ -191,10 +191,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml index 4433c719c8b..7f38edb85a7 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml @@ -192,10 +192,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml index b663085188e..393513ce2db 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml @@ -196,10 +196,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml index 0d6136cdd2d..d30de0ecb2b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml @@ -196,10 +196,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml index 5cc4f1af170..94436b2cba3 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml @@ -69,10 +69,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml index 1e0bad3a3e1..14f403a624b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml @@ -193,10 +193,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml index 3f9cf220aa9..62c8d44fd63 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml @@ -191,10 +191,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml index 73614870132..250ecdb071f 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml @@ -191,10 +191,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml index 96eea2fcd0d..4bfcd4e0931 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml @@ -191,10 +191,10 @@ spec: name: envoy ports: - containerPort: 8080 - name: EnvoyH-d76a15e2 + name: EnvoyHTTPPort protocol: TCP - containerPort: 8443 - name: EnvoyH-6658f727 + name: EnvoyHTTPSPort protocol: TCP - containerPort: 19001 name: metrics diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/clusterIP-custom-addresses.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/clusterIP-custom-addresses.yaml index 336e3fe8ee0..f6730ec0439 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/clusterIP-custom-addresses.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/clusterIP-custom-addresses.yaml @@ -14,11 +14,11 @@ spec: clusterIPs: - 10.102.168.100 ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/custom.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/custom.yaml index 4139ac4f6b1..e898ccb1aff 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/custom.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/custom.yaml @@ -13,11 +13,11 @@ metadata: namespace: envoy-gateway-system spec: ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/default.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/default.yaml index 6efc4ee4aaf..8b4bd40b87f 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/default.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/default.yaml @@ -12,11 +12,11 @@ metadata: spec: externalTrafficPolicy: Local ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/override-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/override-annotations.yaml index 8953b5d9590..be487a5f96e 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/override-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/override-annotations.yaml @@ -17,11 +17,11 @@ metadata: spec: externalTrafficPolicy: Local ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/patch-service.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/patch-service.yaml index 3dd093ffff6..8d904a9eb6c 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/patch-service.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/patch-service.yaml @@ -12,11 +12,11 @@ metadata: spec: externalTrafficPolicy: Local ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy/testdata/services/with-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/services/with-annotations.yaml index 75635bc5fcd..9121cf5fe71 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/services/with-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/services/with-annotations.yaml @@ -15,11 +15,11 @@ metadata: spec: externalTrafficPolicy: Local ports: - - name: envoy-EnvoyHTTPPort-d76a15e2 + - name: EnvoyHTTPPort port: 0 protocol: TCP targetPort: 8080 - - name: envoy-EnvoyHTTPSPort-6658f727 + - name: EnvoyHTTPSPort port: 0 protocol: TCP targetPort: 8443 diff --git a/internal/infrastructure/kubernetes/proxy_configmap_test.go b/internal/infrastructure/kubernetes/proxy_configmap_test.go index 2d99048a6d5..4df19b223f2 100644 --- a/internal/infrastructure/kubernetes/proxy_configmap_test.go +++ b/internal/infrastructure/kubernetes/proxy_configmap_test.go @@ -99,9 +99,16 @@ func TestCreateOrUpdateProxyConfigMap(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var cli client.Client if tc.current != nil { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects(tc.current).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(tc.current). + WithInterceptorFuncs(interceptorFunc). + Build() } else { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() } kube := NewInfra(cli, cfg) r := proxy.NewResourceRender(kube.Namespace, infra.GetProxyInfra()) diff --git a/internal/infrastructure/kubernetes/proxy_deployment_test.go b/internal/infrastructure/kubernetes/proxy_deployment_test.go index 5dda2a8be7a..1958dffd559 100644 --- a/internal/infrastructure/kubernetes/proxy_deployment_test.go +++ b/internal/infrastructure/kubernetes/proxy_deployment_test.go @@ -106,9 +106,16 @@ func TestCreateOrUpdateProxyDeployment(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var cli client.Client if tc.current != nil { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects(tc.current).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(tc.current). + WithInterceptorFuncs(interceptorFunc). + Build() } else { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() } kube := NewInfra(cli, cfg) @@ -129,7 +136,11 @@ func TestCreateOrUpdateProxyDeployment(t *testing.T) { } func TestDeleteProxyDeployment(t *testing.T) { - cli := fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects().Build() + cli := fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(). + WithInterceptorFuncs(interceptorFunc). + Build() cfg, err := config.New() require.NoError(t, err) diff --git a/internal/infrastructure/kubernetes/proxy_infra_test.go b/internal/infrastructure/kubernetes/proxy_infra_test.go index 9d3d2fe98ea..d39f8059799 100644 --- a/internal/infrastructure/kubernetes/proxy_infra_test.go +++ b/internal/infrastructure/kubernetes/proxy_infra_test.go @@ -7,6 +7,8 @@ package kubernetes import ( "context" + "errors" + "fmt" "reflect" "testing" @@ -14,9 +16,12 @@ import ( "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/client/interceptor" gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" @@ -28,10 +33,42 @@ import ( ) func newTestInfra(t *testing.T) *Infra { - cli := fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli := fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() return newTestInfraWithClient(t, cli) } +// Borrowing the interceptor from https://github.com/istio/istio/blob/2f54c6a52a5c6661d5eb9bd2277aab77304fee45/operator/pkg/helmreconciler/apply_test.go#L40 +// Interceptor is used for ApplyPatch as of this patch is not yet supported by the fake client, see https://github.com/kubernetes/kubernetes/issues/99953 +var interceptorFunc = interceptor.Funcs{Patch: func( + ctx context.Context, + clnt client.WithWatch, + obj client.Object, + patch client.Patch, + opts ...client.PatchOption, +) error { + // Apply patches are supposed to upsert, but fake client fails if the object doesn't exist, + // if an apply patch occurs for an object that doesn't yet exist, create it. + if patch.Type() != types.ApplyPatchType { + return clnt.Patch(ctx, obj, patch, opts...) + } + check, ok := obj.DeepCopyObject().(client.Object) + if !ok { + return errors.New("could not check for object in fake client") + } + if err := clnt.Get(ctx, client.ObjectKeyFromObject(obj), check); kerrors.IsNotFound(err) { + if err := clnt.Create(ctx, check); err != nil { + return fmt.Errorf("could not inject object creation for fake: %w", err) + } + } else if err != nil { + return err + } + obj.SetResourceVersion(check.GetResourceVersion()) + return clnt.Update(ctx, obj) +}} + func TestCmpBytes(t *testing.T) { m1 := map[string][]byte{} m1["a"] = []byte("aaa") diff --git a/internal/infrastructure/kubernetes/proxy_serviceaccount_test.go b/internal/infrastructure/kubernetes/proxy_serviceaccount_test.go index 0cde399a2df..abed92cbccb 100644 --- a/internal/infrastructure/kubernetes/proxy_serviceaccount_test.go +++ b/internal/infrastructure/kubernetes/proxy_serviceaccount_test.go @@ -174,9 +174,16 @@ func TestCreateOrUpdateProxyServiceAccount(t *testing.T) { var cli client.Client if tc.current != nil { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects(tc.current).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(tc.current). + WithInterceptorFuncs(interceptorFunc). + Build() } else { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() } kube := NewInfra(cli, cfg) diff --git a/internal/infrastructure/kubernetes/ratelimit_deployment_test.go b/internal/infrastructure/kubernetes/ratelimit_deployment_test.go index bfb444880f6..d57e003d383 100644 --- a/internal/infrastructure/kubernetes/ratelimit_deployment_test.go +++ b/internal/infrastructure/kubernetes/ratelimit_deployment_test.go @@ -68,9 +68,16 @@ func TestCreateOrUpdateRateLimitDeployment(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var cli client.Client if tc.current != nil { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects(tc.current).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(tc.current). + WithInterceptorFuncs(interceptorFunc). + Build() } else { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() } kube := NewInfra(cli, cfg) diff --git a/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go b/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go index 215c091fb36..53084f6620d 100644 --- a/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go +++ b/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go @@ -92,9 +92,16 @@ func TestCreateOrUpdateRateLimitServiceAccount(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var cli client.Client if tc.current != nil { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).WithObjects(tc.current).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithObjects(tc.current). + WithInterceptorFuncs(interceptorFunc). + Build() } else { - cli = fakeclient.NewClientBuilder().WithScheme(envoygateway.GetScheme()).Build() + cli = fakeclient.NewClientBuilder(). + WithScheme(envoygateway.GetScheme()). + WithInterceptorFuncs(interceptorFunc). + Build() } cfg, err := config.New() diff --git a/internal/provider/kubernetes/controller.go b/internal/provider/kubernetes/controller.go index b3da2a1f176..26aba8b51ac 100644 --- a/internal/provider/kubernetes/controller.go +++ b/internal/provider/kubernetes/controller.go @@ -114,19 +114,34 @@ func newGatewayAPIController(mgr manager.Manager, cfg *config.Server, su status. type resourceMappings struct { // Map for storing namespaces for Route, Service and Gateway objects. allAssociatedNamespaces map[string]struct{} + // Map for storing TLSRoutes' NamespacedNames attaching to various Gateway objects. + allAssociatedTLSRoutes map[string]struct{} + // Map for storing HTTPRoutes' NamespacedNames attaching to various Gateway objects. + allAssociatedHTTPRoutes map[string]struct{} + // Map for storing GRPCRoutes' NamespacedNames attaching to various Gateway objects. + allAssociatedGRPCRoutes map[string]struct{} + // Map for storing TCPRoutes' NamespacedNames attaching to various Gateway objects. + allAssociatedTCPRoutes map[string]struct{} + // Map for storing UDPRoutes' NamespacedNames attaching to various Gateway objects. + allAssociatedUDPRoutes map[string]struct{} // Map for storing backendRefs' NamespaceNames referred by various Route objects. allAssociatedBackendRefs map[gwapiv1.BackendObjectReference]struct{} // extensionRefFilters is a map of filters managed by an extension. - // The key is the namespaced name of the filter and the value is the + // The key is the namespaced name, group and kind of the filter and the value is the // unstructured form of the resource. - extensionRefFilters map[types.NamespacedName]unstructured.Unstructured + extensionRefFilters map[utils.NamespacedNameWithGroupKind]unstructured.Unstructured } func newResourceMapping() *resourceMappings { return &resourceMappings{ allAssociatedNamespaces: map[string]struct{}{}, + allAssociatedTLSRoutes: map[string]struct{}{}, + allAssociatedHTTPRoutes: map[string]struct{}{}, + allAssociatedGRPCRoutes: map[string]struct{}{}, + allAssociatedTCPRoutes: map[string]struct{}{}, + allAssociatedUDPRoutes: map[string]struct{}{}, allAssociatedBackendRefs: map[gwapiv1.BackendObjectReference]struct{}{}, - extensionRefFilters: map[types.NamespacedName]unstructured.Unstructured{}, + extensionRefFilters: map[utils.NamespacedNameWithGroupKind]unstructured.Unstructured{}, } } @@ -433,7 +448,7 @@ func (r *gatewayAPIReconciler) processSecurityPolicyObjectRefs( if backendNamespace != policy.Namespace { from := ObjectKindNamespacedName{ - kind: gatewayapi.KindHTTPRoute, + kind: gatewayapi.KindSecurityPolicy, namespace: policy.Namespace, name: policy.Name, } @@ -1092,7 +1107,6 @@ func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.M // Watch Secret CRUDs and process affected EG CRs (Gateway, SecurityPolicy, more in the future). secretPredicates := []predicate.Predicate{ - predicate.GenerationChangedPredicate{}, predicate.NewPredicateFuncs(r.validateSecretForReconcile), } if r.namespaceLabel != nil { @@ -1108,7 +1122,6 @@ func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.M // Watch ConfigMap CRUDs and process affected ClienTraffiPolicies and BackendTLSPolicies. configMapPredicates := []predicate.Predicate{ - predicate.GenerationChangedPredicate{}, predicate.NewPredicateFuncs(r.validateConfigMapForReconcile), } if r.namespaceLabel != nil { @@ -1301,14 +1314,14 @@ func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1 } epList := new(egv1a1.EnvoyProxyList) + gcParametersRefNamespace := string(*gc.Spec.ParametersRef.Namespace) - // The EnvoyProxy must be in the same namespace as EG. - if err := r.client.List(ctx, epList, &client.ListOptions{Namespace: r.namespace}); err != nil { - return fmt.Errorf("failed to list envoyproxies in namespace %s: %w", r.namespace, err) + if err := r.client.List(ctx, epList, &client.ListOptions{Namespace: gcParametersRefNamespace}); err != nil { + return fmt.Errorf("failed to list envoyproxies in namespace %s: %w", gcParametersRefNamespace, err) } if len(epList.Items) == 0 { - r.log.Info("no envoyproxies exist in", "namespace", r.namespace) + r.log.Info("no envoyproxies exist in", "namespace", gcParametersRefNamespace) return nil } diff --git a/internal/provider/kubernetes/routes.go b/internal/provider/kubernetes/routes.go index 20d690f574a..cce3781f375 100644 --- a/internal/provider/kubernetes/routes.go +++ b/internal/provider/kubernetes/routes.go @@ -42,6 +42,12 @@ func (r *gatewayAPIReconciler) processTLSRoutes(ctx context.Context, gatewayName continue } } + + if _, ok := resourceMap.allAssociatedTLSRoutes[utils.NamespacedName(&tlsRoute).String()]; ok { + r.log.Info("current TLSRoute has been processed already", "namespace", tlsRoute.Namespace, "name", tlsRoute.Name) + continue + } + r.log.Info("processing TLSRoute", "namespace", tlsRoute.Namespace, "name", tlsRoute.Name) for _, rule := range tlsRoute.Spec.Rules { @@ -81,6 +87,7 @@ func (r *gatewayAPIReconciler) processTLSRoutes(ctx context.Context, gatewayName } resourceMap.allAssociatedNamespaces[tlsRoute.Namespace] = struct{}{} + resourceMap.allAssociatedTLSRoutes[utils.NamespacedName(&tlsRoute).String()] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer tlsRoute.Status = gwapiv1a2.TLSRouteStatus{} @@ -113,6 +120,12 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam continue } } + + if _, ok := resourceMap.allAssociatedGRPCRoutes[utils.NamespacedName(&grpcRoute).String()]; ok { + r.log.Info("current GRPCRoute has been processed already", "namespace", grpcRoute.Namespace, "name", grpcRoute.Name) + continue + } + r.log.Info("processing GRPCRoute", "namespace", grpcRoute.Namespace, "name", grpcRoute.Name) for _, rule := range grpcRoute.Spec.Rules { @@ -170,10 +183,17 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam if filter.Type == gwapiv1a2.GRPCRouteFilterExtensionRef { // NOTE: filters must be in the same namespace as the GRPCRoute // Check if it's a Kind managed by an extension and add to resourceTree - key := types.NamespacedName{ - Namespace: grpcRoute.Namespace, - Name: string(filter.ExtensionRef.Name), + key := utils.NamespacedNameWithGroupKind{ + NamespacedName: types.NamespacedName{ + Namespace: grpcRoute.Namespace, + Name: string(filter.ExtensionRef.Name), + }, + GroupKind: schema.GroupKind{ + Group: string(filter.ExtensionRef.Group), + Kind: string(filter.ExtensionRef.Kind), + }, } + extRefFilter, ok := resourceMap.extensionRefFilters[key] if !ok { r.log.Error( @@ -191,6 +211,7 @@ func (r *gatewayAPIReconciler) processGRPCRoutes(ctx context.Context, gatewayNam } resourceMap.allAssociatedNamespaces[grpcRoute.Namespace] = struct{}{} + resourceMap.allAssociatedGRPCRoutes[utils.NamespacedName(&grpcRoute).String()] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer grpcRoute.Status = gwapiv1a2.GRPCRouteStatus{} @@ -212,7 +233,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } for i := range extensionRefFilters { filter := extensionRefFilters[i] - resourceMap.extensionRefFilters[utils.NamespacedName(&filter)] = filter + resourceMap.extensionRefFilters[utils.GetNamespacedNameWithGroupKind(&filter)] = filter } if err := r.client.List(ctx, httpRouteList, &client.ListOptions{ @@ -232,6 +253,12 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam continue } } + + if _, ok := resourceMap.allAssociatedHTTPRoutes[utils.NamespacedName(&httpRoute).String()]; ok { + r.log.Info("current HTTPRoute has been processed already", "namespace", httpRoute.Namespace, "name", httpRoute.Name) + continue + } + r.log.Info("processing HTTPRoute", "namespace", httpRoute.Namespace, "name", httpRoute.Name) for _, rule := range httpRoute.Spec.Rules { @@ -344,9 +371,15 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } else if filter.Type == gwapiv1.HTTPRouteFilterExtensionRef { // NOTE: filters must be in the same namespace as the HTTPRoute // Check if it's a Kind managed by an extension and add to resourceTree - key := types.NamespacedName{ - Namespace: httpRoute.Namespace, - Name: string(filter.ExtensionRef.Name), + key := utils.NamespacedNameWithGroupKind{ + NamespacedName: types.NamespacedName{ + Namespace: httpRoute.Namespace, + Name: string(filter.ExtensionRef.Name), + }, + GroupKind: schema.GroupKind{ + Group: string(filter.ExtensionRef.Group), + Kind: string(filter.ExtensionRef.Kind), + }, } extRefFilter, ok := resourceMap.extensionRefFilters[key] if !ok { @@ -364,6 +397,7 @@ func (r *gatewayAPIReconciler) processHTTPRoutes(ctx context.Context, gatewayNam } resourceMap.allAssociatedNamespaces[httpRoute.Namespace] = struct{}{} + resourceMap.allAssociatedHTTPRoutes[utils.NamespacedName(&httpRoute).String()] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer httpRoute.Status = gwapiv1.HTTPRouteStatus{} @@ -395,6 +429,12 @@ func (r *gatewayAPIReconciler) processTCPRoutes(ctx context.Context, gatewayName continue } } + + if _, ok := resourceMap.allAssociatedTCPRoutes[utils.NamespacedName(&tcpRoute).String()]; ok { + r.log.Info("current TCPRoute has been processed already", "namespace", tcpRoute.Namespace, "name", tcpRoute.Name) + continue + } + r.log.Info("processing TCPRoute", "namespace", tcpRoute.Namespace, "name", tcpRoute.Name) for _, rule := range tcpRoute.Spec.Rules { @@ -434,6 +474,7 @@ func (r *gatewayAPIReconciler) processTCPRoutes(ctx context.Context, gatewayName } resourceMap.allAssociatedNamespaces[tcpRoute.Namespace] = struct{}{} + resourceMap.allAssociatedTCPRoutes[utils.NamespacedName(&tcpRoute).String()] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer tcpRoute.Status = gwapiv1a2.TCPRouteStatus{} @@ -465,6 +506,12 @@ func (r *gatewayAPIReconciler) processUDPRoutes(ctx context.Context, gatewayName continue } } + + if _, ok := resourceMap.allAssociatedUDPRoutes[utils.NamespacedName(&udpRoute).String()]; ok { + r.log.Info("current UDPRoute has been processed already", "namespace", udpRoute.Namespace, "name", udpRoute.Name) + continue + } + r.log.Info("processing UDPRoute", "namespace", udpRoute.Namespace, "name", udpRoute.Name) for _, rule := range udpRoute.Spec.Rules { @@ -504,6 +551,7 @@ func (r *gatewayAPIReconciler) processUDPRoutes(ctx context.Context, gatewayName } resourceMap.allAssociatedNamespaces[udpRoute.Namespace] = struct{}{} + resourceMap.allAssociatedUDPRoutes[utils.NamespacedName(&udpRoute).String()] = struct{}{} // Discard Status to reduce memory consumption in watchable // It will be recomputed by the gateway-api layer udpRoute.Status = gwapiv1a2.UDPRouteStatus{} diff --git a/internal/provider/kubernetes/routes_test.go b/internal/provider/kubernetes/routes_test.go index 5b31a04db8f..c1903872464 100644 --- a/internal/provider/kubernetes/routes_test.go +++ b/internal/provider/kubernetes/routes_test.go @@ -121,6 +121,102 @@ func TestProcessHTTPRoutes(t *testing.T) { }, expected: true, }, + { + name: "httproute with extension filter multiple types same name", + routes: []*gwapiv1.HTTPRoute{ + { + ObjectMeta: metav1.ObjectMeta{ + Namespace: httpRouteNS, + Name: "test", + }, + Spec: gwapiv1.HTTPRouteSpec{ + CommonRouteSpec: gwapiv1.CommonRouteSpec{ + ParentRefs: []gwapiv1.ParentReference{ + { + Name: "test", + }, + }, + }, + Rules: []gwapiv1.HTTPRouteRule{ + { + Matches: []gwapiv1.HTTPRouteMatch{ + { + Path: &gwapiv1.HTTPPathMatch{ + Type: ptr.To(gwapiv1.PathMatchPathPrefix), + Value: ptr.To("/"), + }, + }, + }, + Filters: []gwapiv1.HTTPRouteFilter{ + { + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group("gateway.example.io"), + Kind: gwapiv1.Kind("Bar"), + Name: gwapiv1.ObjectName("test"), + }, + }, + { + Type: gwapiv1.HTTPRouteFilterExtensionRef, + ExtensionRef: &gwapiv1.LocalObjectReference{ + Group: gwapiv1.Group("gateway.example.io"), + Kind: gwapiv1.Kind("Foo"), + Name: gwapiv1.ObjectName("test"), + }, + }, + }, + BackendRefs: []gwapiv1.HTTPBackendRef{ + { + BackendRef: gwapiv1.BackendRef{ + BackendObjectReference: gwapiv1.BackendObjectReference{ + Group: gatewayapi.GroupPtr(corev1.GroupName), + Kind: gatewayapi.KindPtr(gatewayapi.KindService), + Name: "test", + }, + }, + }, + }, + }, + }, + }, + }, + }, + extensionFilters: []*unstructured.Unstructured{ + { + Object: map[string]interface{}{ + "apiVersion": "gateway.example.io/v1alpha1", + "kind": "Bar", + "metadata": map[string]interface{}{ + "name": "test", + "namespace": httpRouteNS, + }, + }, + }, + { + Object: map[string]interface{}{ + "apiVersion": "gateway.example.io/v1alpha1", + "kind": "Foo", + "metadata": map[string]interface{}{ + "name": "test", + "namespace": httpRouteNS, + }, + }, + }, + }, + extensionAPIGroups: []schema.GroupVersionKind{ + { + Group: "gateway.example.io", + Version: "v1alpha1", + Kind: "Bar", + }, + { + Group: "gateway.example.io", + Version: "v1alpha1", + Kind: "Foo", + }, + }, + expected: true, + }, { name: "httproute with one filter_from_extension", routes: []*gwapiv1.HTTPRoute{ @@ -295,10 +391,16 @@ func TestProcessHTTPRoutes(t *testing.T) { // Ensure the resource tree and map are as expected. require.Equal(t, tc.routes, resourceTree.HTTPRoutes) if tc.extensionFilters != nil { - for i, filter := range tc.extensionFilters { - key := types.NamespacedName{ - Namespace: tc.routes[i].Namespace, - Name: filter.GetName(), + for _, filter := range tc.extensionFilters { + key := utils.NamespacedNameWithGroupKind{ + NamespacedName: types.NamespacedName{ + Namespace: tc.routes[0].Namespace, + Name: filter.GetName(), + }, + GroupKind: schema.GroupKind{ + Group: filter.GroupVersionKind().Group, + Kind: filter.GroupVersionKind().Kind, + }, } require.Equal(t, *filter, resourceMap.extensionRefFilters[key]) } diff --git a/internal/utils/misc.go b/internal/utils/misc.go index 6e434660de6..84043ecdcd2 100644 --- a/internal/utils/misc.go +++ b/internal/utils/misc.go @@ -11,10 +11,30 @@ import ( "hash/fnv" "strings" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) +type NamespacedNameWithGroupKind struct { + types.NamespacedName + schema.GroupKind +} + +// GetNamespacedNameWithGroupKind creates and returns object's NamespacedNameWithGroupKind. +func GetNamespacedNameWithGroupKind(obj client.Object) NamespacedNameWithGroupKind { + return NamespacedNameWithGroupKind{ + NamespacedName: types.NamespacedName{ + Namespace: obj.GetNamespace(), + Name: obj.GetName(), + }, + GroupKind: schema.GroupKind{ + Group: obj.GetObjectKind().GroupVersionKind().GroupKind().Group, + Kind: obj.GetObjectKind().GroupVersionKind().GroupKind().Kind, + }, + } +} + // NamespacedName creates and returns object's NamespacedName. func NamespacedName(obj client.Object) types.NamespacedName { return types.NamespacedName{ diff --git a/internal/xds/translator/extauth.go b/internal/xds/translator/extauth.go index 97d680e0fa4..3ea9ce03aec 100644 --- a/internal/xds/translator/extauth.go +++ b/internal/xds/translator/extauth.go @@ -104,6 +104,7 @@ func extAuthConfig(extAuth *ir.ExtAuth) *extauthv3.ExtAuthz { MatchPattern: &matcherv3.StringMatcher_Exact{ Exact: header, }, + IgnoreCase: true, }) } @@ -169,6 +170,7 @@ func httpService(http *ir.HTTPExtAuthService) *extauthv3.HttpService { MatchPattern: &matcherv3.StringMatcher_Exact{ Exact: header, }, + IgnoreCase: true, }) } diff --git a/internal/xds/translator/proxy_protocol.go b/internal/xds/translator/proxy_protocol.go index 9c0dcb2bd16..a36673dc7fa 100644 --- a/internal/xds/translator/proxy_protocol.go +++ b/internal/xds/translator/proxy_protocol.go @@ -32,7 +32,8 @@ func patchProxyProtocolFilter(xdsListener *listenerv3.Listener, irListener *ir.H proxyProtocolFilter := buildProxyProtocolFilter() if proxyProtocolFilter != nil { - xdsListener.ListenerFilters = append(xdsListener.ListenerFilters, proxyProtocolFilter) + // Add the Proxy Protocol filter as first to listeners. + xdsListener.ListenerFilters = append([]*listenerv3.ListenerFilter{proxyProtocolFilter}, xdsListener.ListenerFilters...) } } diff --git a/internal/xds/translator/proxy_protocol_test.go b/internal/xds/translator/proxy_protocol_test.go new file mode 100644 index 00000000000..b4b5ac51aff --- /dev/null +++ b/internal/xds/translator/proxy_protocol_test.go @@ -0,0 +1,58 @@ +// 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. + +package translator + +import ( + "testing" + + listenerv3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" + "github.com/envoyproxy/go-control-plane/pkg/wellknown" + "github.com/stretchr/testify/require" + + "github.com/envoyproxy/gateway/internal/ir" +) + +func TestPatchProxyProtocolFilter(t *testing.T) { + type testCase struct { + name string + listener *listenerv3.Listener + } + + irListener := &ir.HTTPListener{ + EnableProxyProtocol: true, + } + + testCases := []testCase{ + { + name: "listener with proxy proto available already", + listener: &listenerv3.Listener{ + ListenerFilters: []*listenerv3.ListenerFilter{ + { + Name: wellknown.ProxyProtocol, + }, + }, + }, + }, + { + name: "listener with tls, append proxy proto", + listener: &listenerv3.Listener{ + ListenerFilters: []*listenerv3.ListenerFilter{ + { + Name: wellknown.TLSInspector, + }, + }, + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + patchProxyProtocolFilter(tc.listener, irListener) + // proxy proto filter should be added always as first + require.Equal(t, wellknown.ProxyProtocol, tc.listener.ListenerFilters[0].Name) + }) + } +} diff --git a/internal/xds/translator/route.go b/internal/xds/translator/route.go index fb894d66105..784ed8d7d41 100644 --- a/internal/xds/translator/route.go +++ b/internal/xds/translator/route.go @@ -351,7 +351,7 @@ func buildXdsURLRewriteAction(destName string, urlRewrite *ir.URLRewrite, pathMa if urlRewrite.Path.FullReplace != nil { routeAction.RegexRewrite = &matcherv3.RegexMatchAndSubstitute{ Pattern: &matcherv3.RegexMatcher{ - Regex: "/.+", + Regex: "^/.*$", }, Substitution: *urlRewrite.Path.FullReplace, } diff --git a/internal/xds/translator/testdata/out/xds-ir/ext-auth.listeners.yaml b/internal/xds/translator/testdata/out/xds-ir/ext-auth.listeners.yaml index 260f772fb04..e3390750d55 100644 --- a/internal/xds/translator/testdata/out/xds-ir/ext-auth.listeners.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/ext-auth.listeners.yaml @@ -23,7 +23,9 @@ allowedUpstreamHeaders: patterns: - exact: header1 + ignoreCase: true - exact: header2 + ignoreCase: true pathPrefix: /auth serverUri: cluster: securitypolicy/default/policy-for-first-route/http-backend @@ -37,7 +39,9 @@ allowedHeaders: patterns: - exact: header1 + ignoreCase: true - exact: header2 + ignoreCase: true grpcService: envoyGrpc: authority: grpc-backend.default:9000 diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-rewrite-url-fullpath.routes.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-rewrite-url-fullpath.routes.yaml index f8b81712dae..7c049365a8b 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-rewrite-url-fullpath.routes.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-rewrite-url-fullpath.routes.yaml @@ -12,7 +12,7 @@ cluster: rewrite-route regexRewrite: pattern: - regex: /.+ + regex: ^/.*$ substitution: /rewrite upgradeConfigs: - upgradeType: websocket diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tls-system-truststore.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tls-system-truststore.clusters.yaml index 670a5464edb..573625b4671 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tls-system-truststore.clusters.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tls-system-truststore.clusters.yaml @@ -24,6 +24,10 @@ '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext commonTlsContext: validationContext: + matchTypedSubjectAltNames: + - matcher: + exact: example.com + sanType: DNS trustedCa: filename: /etc/ssl/certs/ca-certificates.crt sni: example.com diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.clusters.yaml index 8a7225b4cce..ccfa16dbd99 100755 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.clusters.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.clusters.yaml @@ -23,11 +23,17 @@ typedConfig: '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext commonTlsContext: - validationContextSdsSecretConfig: - name: policy-btls/policies-ca2 - sdsConfig: - ads: {} - resourceApiVersion: V3 + combinedValidationContext: + defaultValidationContext: + matchTypedSubjectAltNames: + - matcher: + exact: bar.example.com + sanType: DNS + validationContextSdsSecretConfig: + name: policy-btls/policies-ca2 + sdsConfig: + ads: {} + resourceApiVersion: V3 sni: bar.example.com - match: name: httproute/envoy-gateway/httproute-btls/rule/0/tls/1 @@ -37,11 +43,17 @@ typedConfig: '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext commonTlsContext: - validationContextSdsSecretConfig: - name: policy-btls/policies-ca - sdsConfig: - ads: {} - resourceApiVersion: V3 + combinedValidationContext: + defaultValidationContext: + matchTypedSubjectAltNames: + - matcher: + exact: example.com + sanType: DNS + validationContextSdsSecretConfig: + name: policy-btls/policies-ca + sdsConfig: + ads: {} + resourceApiVersion: V3 sni: example.com type: EDS - circuitBreakers: @@ -85,10 +97,16 @@ typedConfig: '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext commonTlsContext: - validationContextSdsSecretConfig: - name: policy-btls-2/policies-ca - sdsConfig: - ads: {} - resourceApiVersion: V3 + combinedValidationContext: + defaultValidationContext: + matchTypedSubjectAltNames: + - matcher: + exact: example.com + sanType: DNS + validationContextSdsSecretConfig: + name: policy-btls-2/policies-ca + sdsConfig: + ads: {} + resourceApiVersion: V3 sni: example.com type: EDS diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle.clusters.yaml index 695386bb24b..f368f4c94d0 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle.clusters.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle.clusters.yaml @@ -23,10 +23,16 @@ typedConfig: '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext commonTlsContext: - validationContextSdsSecretConfig: - name: policy-btls/policies-ca - sdsConfig: - ads: {} - resourceApiVersion: V3 + combinedValidationContext: + defaultValidationContext: + matchTypedSubjectAltNames: + - matcher: + exact: example.com + sanType: DNS + validationContextSdsSecretConfig: + name: policy-btls/policies-ca + sdsConfig: + ads: {} + resourceApiVersion: V3 sni: example.com type: EDS diff --git a/internal/xds/translator/testdata/out/xds-ir/multiple-listeners-same-port-with-different-filters.listeners.yaml b/internal/xds/translator/testdata/out/xds-ir/multiple-listeners-same-port-with-different-filters.listeners.yaml index 40696d89d08..731f8ebf82d 100755 --- a/internal/xds/translator/testdata/out/xds-ir/multiple-listeners-same-port-with-different-filters.listeners.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/multiple-listeners-same-port-with-different-filters.listeners.yaml @@ -26,7 +26,9 @@ allowedUpstreamHeaders: patterns: - exact: header1 + ignoreCase: true - exact: header2 + ignoreCase: true pathPrefix: /auth serverUri: cluster: securitypolicy/default/policy-for-http-route-2/envoy-gateway/http-backend @@ -84,7 +86,9 @@ allowedUpstreamHeaders: patterns: - exact: header1 + ignoreCase: true - exact: header2 + ignoreCase: true pathPrefix: /auth serverUri: cluster: securitypolicy/default/policy-for-http-route-2/envoy-gateway/http-backend diff --git a/internal/xds/translator/translator.go b/internal/xds/translator/translator.go index f00d863cf4f..6bd55107f71 100644 --- a/internal/xds/translator/translator.go +++ b/internal/xds/translator/translator.go @@ -705,6 +705,16 @@ func buildXdsUpstreamTLSSocketWthCert(tlsConfig *ir.TLSUpstreamConfig) (*corev3. Filename: "/etc/ssl/certs/ca-certificates.crt", }, }, + MatchTypedSubjectAltNames: []*tlsv3.SubjectAltNameMatcher{ + { + SanType: tlsv3.SubjectAltNameMatcher_DNS, + Matcher: &matcherv3.StringMatcher{ + MatchPattern: &matcherv3.StringMatcher_Exact{ + Exact: tlsConfig.SNI, + }, + }, + }, + }, }, }, }, @@ -714,10 +724,24 @@ func buildXdsUpstreamTLSSocketWthCert(tlsConfig *ir.TLSUpstreamConfig) (*corev3. tlsCtx = &tlsv3.UpstreamTlsContext{ CommonTlsContext: &tlsv3.CommonTlsContext{ TlsCertificateSdsSecretConfigs: nil, - ValidationContextType: &tlsv3.CommonTlsContext_ValidationContextSdsSecretConfig{ - ValidationContextSdsSecretConfig: &tlsv3.SdsSecretConfig{ - Name: tlsConfig.CACertificate.Name, - SdsConfig: makeConfigSource(), + ValidationContextType: &tlsv3.CommonTlsContext_CombinedValidationContext{ + CombinedValidationContext: &tlsv3.CommonTlsContext_CombinedCertificateValidationContext{ + ValidationContextSdsSecretConfig: &tlsv3.SdsSecretConfig{ + Name: tlsConfig.CACertificate.Name, + SdsConfig: makeConfigSource(), + }, + DefaultValidationContext: &tlsv3.CertificateValidationContext{ + MatchTypedSubjectAltNames: []*tlsv3.SubjectAltNameMatcher{ + { + SanType: tlsv3.SubjectAltNameMatcher_DNS, + Matcher: &matcherv3.StringMatcher{ + MatchPattern: &matcherv3.StringMatcher_Exact{ + Exact: tlsConfig.SNI, + }, + }, + }, + }, + }, }, }, }, diff --git a/test/cel-validation/clienttrafficpolicy_test.go b/test/cel-validation/clienttrafficpolicy_test.go index 84e1a98177e..43ae5012f21 100644 --- a/test/cel-validation/clienttrafficpolicy_test.go +++ b/test/cel-validation/clienttrafficpolicy_test.go @@ -15,11 +15,12 @@ import ( "testing" "time" - egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" + + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) func TestClientTrafficPolicyTarget(t *testing.T) { diff --git a/test/e2e/testdata/httproute-rewrite-full-path.yaml b/test/e2e/testdata/httproute-rewrite-full-path.yaml new file mode 100644 index 00000000000..7e8b1181609 --- /dev/null +++ b/test/e2e/testdata/httproute-rewrite-full-path.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: rewrite-full-path + namespace: gateway-conformance-infra +spec: + parentRefs: + - name: same-namespace + rules: + - matches: + - path: + type: PathPrefix + value: / + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /full-replace + backendRefs: + - name: infra-backend-v1 + port: 8080 diff --git a/test/e2e/tests/gateway_infra_resource.go b/test/e2e/tests/gateway_infra_resource.go new file mode 100644 index 00000000000..7a468b80f60 --- /dev/null +++ b/test/e2e/tests/gateway_infra_resource.go @@ -0,0 +1,176 @@ +// 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. + +//go:build e2e +// +build e2e + +package tests + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + appsv1 "k8s.io/api/apps/v1" + 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/conformance/utils/suite" +) + +func init() { + ConformanceTests = append(ConformanceTests, GatewayInfraResourceTest) +} + +var GatewayInfraResourceTest = suite.ConformanceTest{ + ShortName: "GatewayInfraResourceTest", + Description: "Gateway Infra Resource E2E Test", + Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { + gatewayTypeMeta := metav1.TypeMeta{ + Kind: "Gateway", + APIVersion: "gateway.networking.k8s.io/v1", + } + gatewayObjMeta := metav1.ObjectMeta{ + Name: "e2e-test-infra", + Namespace: "envoy-gateway-system", + } + + labelSelector := labels.SelectorFromSet(labels.Set{"gateway.envoyproxy.io/owning-gateway-name": gatewayObjMeta.Name}) + + var awaitOperation sync.WaitGroup + + t.Run("create gateway", func(t *testing.T) { + awaitOperation.Add(1) + + newGatewayObj := &gwapiv1.Gateway{ + TypeMeta: gatewayTypeMeta, + ObjectMeta: gatewayObjMeta, + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(suite.GatewayClassName), + Listeners: []gwapiv1.Listener{ + { + Name: "http", + Port: 8000, + Protocol: "HTTP", + }, + { + Name: "my-tcp", + Port: 5432, + Protocol: "TCP", + }, + }, + }, + } + + err := suite.Client.Patch(context.TODO(), newGatewayObj, client.Apply, client.ForceOwnership, client.FieldOwner("e2e-test")) + require.NoError(t, err) + + <-time.After(time.Millisecond * 300) + + var gatewayDeploymentList appsv1.DeploymentList + err = suite.Client.List(context.TODO(), &gatewayDeploymentList, &client.ListOptions{ + LabelSelector: labelSelector, + Namespace: gatewayObjMeta.Namespace, + }) + require.NoError(t, err) + require.Len(t, gatewayDeploymentList.Items, 1) + + awaitOperation.Done() + }) + + awaitOperation.Wait() + t.Run("update gateway - listener changes", func(t *testing.T) { + awaitOperation.Add(1) + + newListenerTCPName := "custom-tcp" + containerPortName := "tcp-5432" + newListenerHTTPPort := int32(8001) + + changedGatewayObj := &gwapiv1.Gateway{ + TypeMeta: gatewayTypeMeta, + ObjectMeta: gatewayObjMeta, + Spec: gwapiv1.GatewaySpec{ + GatewayClassName: gwapiv1.ObjectName(suite.GatewayClassName), + Listeners: []gwapiv1.Listener{ + { + Name: "http", + Port: gwapiv1.PortNumber(newListenerHTTPPort), + Protocol: "HTTP", + }, + { + Name: gwapiv1.SectionName(newListenerTCPName), + Port: 5432, + Protocol: "TCP", + }, + }, + }, + } + + err := suite.Client.Patch(context.TODO(), changedGatewayObj, client.Apply, client.ForceOwnership, client.FieldOwner("e2e-test")) + require.NoError(t, err) + + <-time.After(time.Millisecond * 300) + var gatewayDeploymentList appsv1.DeploymentList + err = suite.Client.List(context.TODO(), &gatewayDeploymentList, &client.ListOptions{ + LabelSelector: labelSelector, + Namespace: gatewayObjMeta.Namespace, + }) + require.NoError(t, err) + require.Len(t, gatewayDeploymentList.Items, 1) + + gatewayDeployment := gatewayDeploymentList.Items[0] + + for _, container := range gatewayDeployment.Spec.Template.Spec.Containers { + var isTCPPortNameMatch, isHTTPPortNumberMatch bool + + if container.Name == "envoy" { + for _, port := range container.Ports { + if port.Name == containerPortName { + isTCPPortNameMatch = true + } + + if port.ContainerPort == newListenerHTTPPort { + isHTTPPortNumberMatch = true + } + } + + if !isTCPPortNameMatch { + t.Errorf("container expected TCP port name '%v' is not found", containerPortName) + } + + if !isHTTPPortNumberMatch { + t.Errorf("container expected HTTP port number '%d' is not found", newListenerHTTPPort) + } + } + } + + awaitOperation.Done() + }) + + awaitOperation.Wait() + t.Run("delete gateway", func(t *testing.T) { + gwObj := &gwapiv1.Gateway{ + TypeMeta: gatewayTypeMeta, + ObjectMeta: gatewayObjMeta, + } + + err := suite.Client.Delete(context.TODO(), gwObj) + require.NoError(t, err) + + <-time.After(time.Millisecond * 300) + + var gatewayDeploymentList appsv1.DeploymentList + err = suite.Client.List(context.TODO(), &gatewayDeploymentList, &client.ListOptions{ + LabelSelector: labelSelector, + Namespace: gatewayObjMeta.Namespace, + }) + require.NoError(t, err) + require.Empty(t, gatewayDeploymentList.Items) + }) + }, +} diff --git a/test/e2e/tests/httproute-rewrite-full-path.go b/test/e2e/tests/httproute-rewrite-full-path.go new file mode 100644 index 00000000000..dd043571cbf --- /dev/null +++ b/test/e2e/tests/httproute-rewrite-full-path.go @@ -0,0 +1,59 @@ +// 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. + +//go:build e2e +// +build e2e + +package tests + +import ( + "testing" + + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/gateway-api/conformance/utils/http" + "sigs.k8s.io/gateway-api/conformance/utils/kubernetes" + "sigs.k8s.io/gateway-api/conformance/utils/suite" +) + +func init() { + ConformanceTests = append(ConformanceTests, HTTPRouteRewriteFullPath) +} + +var HTTPRouteRewriteFullPath = suite.ConformanceTest{ + ShortName: "HTTPRouteRewriteFullPath", + Description: "An HTTPRoute with path rewrite filter to replace full path", + Manifests: []string{"testdata/httproute-rewrite-full-path.yaml"}, + Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { + ns := "gateway-conformance-infra" + routeNN := types.NamespacedName{Name: "rewrite-full-path", Namespace: ns} + gwNN := types.NamespacedName{Name: "same-namespace", Namespace: ns} + gwAddr := kubernetes.GatewayAndHTTPRoutesMustBeAccepted(t, suite.Client, suite.TimeoutConfig, suite.ControllerName, kubernetes.NewGatewayRef(gwNN), routeNN) + kubernetes.HTTPRouteMustHaveResolvedRefsConditionsTrue(t, suite.Client, suite.TimeoutConfig, routeNN, gwNN) + + testCases := []http.ExpectedResponse{ + { + Request: http.Request{ + Path: "/", + }, + ExpectedRequest: &http.ExpectedRequest{ + Request: http.Request{ + Path: "/full-replace", + }, + }, + Backend: "infra-backend-v1", + Namespace: ns, + }, + } + for i := range testCases { + // Declare tc here to avoid loop variable + // reuse issues across parallel tests. + tc := testCases[i] + t.Run(tc.GetTestCaseName(i), func(t *testing.T) { + t.Parallel() + http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, gwAddr, tc) + }) + } + }, +}