From 219792272d7f5fb9199bcd77fe0991fddfff253d Mon Sep 17 00:00:00 2001 From: sgayangi Date: Thu, 19 Sep 2024 13:35:22 +0530 Subject: [PATCH] Update APIs in integration tests --- .../tests/resources/base/manifests.yaml | 92 +++---- .../tests/all-http-methods-for-wildcard.yaml | 36 +-- .../tests/api-different-listener.yaml | 50 ++-- .../tests/api-policy-with-jwt-generator.yaml | 38 +-- .../tests/api-with-backend-base-path.yaml | 38 +-- .../resources/tests/api-with-cors-policy.yaml | 108 ++++---- .../tests/api-with-operational-policy.yaml | 56 ++-- .../resources/tests/api-with-path-params.yaml | 50 ++-- .../tests/api-with-request-header-modify.yaml | 78 +++--- .../api-with-response-header-modify.yaml | 104 +++---- .../tests/api-without-backend-base-path.yaml | 38 +-- .../tests/backend-api-key-security.yaml | 6 +- .../resources/tests/custom-auth-header.yaml | 42 +-- .../tests/custom-policy-ratelimiting.yaml | 10 +- ...-api-version-ratelimit-resource-level.yaml | 64 ++--- .../tests/default-api-version-ratelimit.yaml | 36 +-- .../resources/tests/default-api-version.yaml | 36 +-- .../different-endpoint-with-same-route.yaml | 60 ++-- .../tests/disable-api-level-jwt.yaml | 112 ++++---- .../tests/disable-api-level-security.yaml | 58 ++-- .../tests/disable-resource-level-jwt.yaml | 136 ++++----- .../disable-resource-level-security.yaml | 70 ++--- .../resources/tests/fetch-api-definition.yaml | 48 ++-- .../fetch-non-existing-api-definition.yaml | 48 ++-- .../tests/resources/tests/gql-api.yaml | 80 +++--- .../tests/interceptors-api-level.yaml | 54 ++-- .../tests/interceptors-resource-level.yaml | 94 +++---- .../tests/jwt-api-level-security.yaml | 40 +-- .../tests/jwt-resource-level-security.yaml | 104 +++---- .../tests/multiple_port_listener.yaml | 54 ++-- .../resources/tests/prod-and-sand-apis.yaml | 82 +++--- .../resources/tests/ratelimit-priority.yaml | 64 ++--- .../resources/tests/resource-scopes.yaml | 80 +++--- .../tests/resources/tests/trailing-slash.yaml | 260 +++++++++--------- 34 files changed, 1163 insertions(+), 1163 deletions(-) diff --git a/test/integration/integration/tests/resources/base/manifests.yaml b/test/integration/integration/tests/resources/base/manifests.yaml index 5d4ef24606..3bcf566107 100644 --- a/test/integration/integration/tests/resources/base/manifests.yaml +++ b/test/integration/integration/tests/resources/base/manifests.yaml @@ -50,20 +50,20 @@ spec: app: infra-backend-v1 spec: containers: - - name: infra-backend-v1 - image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 10m + - name: infra-backend-v1 + image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: + requests: + cpu: 10m --- apiVersion: v1 kind: Service @@ -96,20 +96,20 @@ spec: app: gql-backend-v1 spec: containers: - - name: gql-backend-v1 - image: tharsanan/gq:1.0.0 - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 10m + - name: gql-backend-v1 + image: tharsanan/gq:1.0.0 + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: + requests: + cpu: 10m --- apiVersion: v1 kind: Service @@ -142,20 +142,20 @@ spec: app: infra-backend-v2 spec: containers: - - name: infra-backend-v2 - image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: "10m" + - name: infra-backend-v2 + image: gcr.io/k8s-staging-ingressconformance/echoserver:v20221109-7ee2f3e + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: + requests: + cpu: "10m" # TODO (Amila): Uncomment once AKS test runner is enabled # --- # apiVersion: v1 @@ -409,11 +409,11 @@ spec: targetRef: group: gateway.networking.k8s.io kind: Gateway - name: wso2-apk-default + name: wso2-apk-default --- -# This is a API with wrong organization(jwt issuer not set). +# This is a API with wrong organization(jwt issuer not set). # When test cases apply the correct API it should overrite the wrong value to correct value -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: all-http-methods-for-wildcard @@ -427,5 +427,5 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - all-http-methods-for-wildcard-httproute + - all-http-methods-for-wildcard-httproute organization: wso2-org1111 diff --git a/test/integration/integration/tests/resources/tests/all-http-methods-for-wildcard.yaml b/test/integration/integration/tests/resources/tests/all-http-methods-for-wildcard.yaml index 2e34fab924..8f39db7403 100644 --- a/test/integration/integration/tests/resources/tests/all-http-methods-for-wildcard.yaml +++ b/test/integration/integration/tests/resources/tests/all-http-methods-for-wildcard.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: all-http-methods-for-wildcard @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - all-http-methods-for-wildcard-httproute + - all-http-methods-for-wildcard-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - all-http-methods-for-wildcard.test.gw.wso2.com + - all-http-methods-for-wildcard.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -62,5 +62,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-different-listener.yaml b/test/integration/integration/tests/resources/tests/api-different-listener.yaml index 829c5c55e8..ebcd96ec1e 100644 --- a/test/integration/integration/tests/resources/tests/api-different-listener.yaml +++ b/test/integration/integration/tests/resources/tests/api-different-listener.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-different-listener @@ -27,7 +27,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - test-api-with-different-listener-httproute + - test-api-with-different-listener-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,29 +37,29 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - api.am.wso2.com + - api.am.wso2.com rules: - - matches: - - path: - type: RegularExpression - value: /user/([^/]+)/playlist/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /user/\1/playlist/\2 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /user/([^/]+)/playlist/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /user/\1/playlist/\2 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -68,5 +68,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-policy-with-jwt-generator.yaml b/test/integration/integration/tests/resources/tests/api-policy-with-jwt-generator.yaml index 8f6d17f22c..9edffc19f1 100644 --- a/test/integration/integration/tests/resources/tests/api-policy-with-jwt-generator.yaml +++ b/test/integration/integration/tests/resources/tests/api-policy-with-jwt-generator.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: api-policy-with-jwt-generator @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - api-policy-with-jwt-generator-httproute + - api-policy-with-jwt-generator-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - api-policy-with-jwt-generator.test.gw.wso2.com + - api-policy-with-jwt-generator.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha3 kind: APIPolicy @@ -67,7 +67,7 @@ spec: targetRef: group: gateway.networking.k8s.io kind: API - name: api-policy-with-jwt-generator + name: api-policy-with-jwt-generator --- apiVersion: dp.wso2.com/v1alpha1 kind: BackendJWT @@ -86,5 +86,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 \ No newline at end of file + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-with-backend-base-path.yaml b/test/integration/integration/tests/resources/tests/api-with-backend-base-path.yaml index 7f8905d4a8..d26c6408ff 100644 --- a/test/integration/integration/tests/resources/tests/api-with-backend-base-path.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-backend-base-path.yaml @@ -22,10 +22,10 @@ metadata: spec: basePath: /backend-base-path services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-backend-base-path @@ -39,7 +39,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - test-api-with-backend-base-path-httproute + - test-api-with-backend-base-path-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -49,20 +49,20 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - backend-base-path.test.gw.wso2.com + - backend-base-path.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: / - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-basepath + - matches: + - path: + type: PathPrefix + value: / + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-basepath diff --git a/test/integration/integration/tests/resources/tests/api-with-cors-policy.yaml b/test/integration/integration/tests/resources/tests/api-with-cors-policy.yaml index a1bff40bfc..40387daa2a 100644 --- a/test/integration/integration/tests/resources/tests/api-with-cors-policy.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-cors-policy.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: cors-policy-api @@ -27,7 +27,7 @@ spec: isDefaultVersion: true production: - routeRefs: - - cors-policy-httproute + - cors-policy-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,29 +37,29 @@ metadata: namespace: gateway-integration-test-infra spec: hostnames: - - cors-policy.test.gw.wso2.com + - cors-policy.test.gw.wso2.com parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener rules: - - matches: - - path: - type: PathPrefix - value: /test - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplacePrefixMatch - replacePrefixMatch: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /test + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplacePrefixMatch + replacePrefixMatch: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha3 kind: APIPolicy @@ -71,20 +71,20 @@ spec: cORSPolicy: accessControlAllowCredentials: true accessControlAllowOrigins: - - "*.wso2.com" + - "*.wso2.com" accessControlAllowHeaders: - - authorization + - authorization accessControlAllowMethods: - - GET - - POST + - GET + - POST accessControlExposeHeaders: - - "*" + - "*" targetRef: group: gateway.networking.k8s.io kind: API name: cors-policy-api --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: no-cors-policy-api @@ -96,7 +96,7 @@ spec: basePath: /no-cors-policy-api/1.0.0 production: - routeRefs: - - no-cors-policy-httproute + - no-cors-policy-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -106,29 +106,29 @@ metadata: namespace: gateway-integration-test-infra spec: hostnames: - - cors-policy.test.gw.wso2.com + - cors-policy.test.gw.wso2.com parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener rules: - - matches: - - path: - type: PathPrefix - value: /test - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplacePrefixMatch - replacePrefixMatch: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /test + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplacePrefixMatch + replacePrefixMatch: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -137,8 +137,8 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: dp.wso2.com/v1alpha3 kind: APIPolicy @@ -152,4 +152,4 @@ spec: targetRef: group: gateway.networking.k8s.io kind: API - name: no-cors-policy-api \ No newline at end of file + name: no-cors-policy-api diff --git a/test/integration/integration/tests/resources/tests/api-with-operational-policy.yaml b/test/integration/integration/tests/resources/tests/api-with-operational-policy.yaml index e444e8271e..3e3f6c10e9 100644 --- a/test/integration/integration/tests/resources/tests/api-with-operational-policy.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-operational-policy.yaml @@ -30,7 +30,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-operatinal-policy @@ -44,7 +44,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - test-api-with-operatinal-policy-httproute + - test-api-with-operatinal-policy-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -54,32 +54,32 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - backend-base-path.test.gw.wso2.com + - backend-base-path.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /test-get-path - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /test-post-path - method: POST - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /test-get-path + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /test-post-path + method: POST + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -88,5 +88,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-with-path-params.yaml b/test/integration/integration/tests/resources/tests/api-with-path-params.yaml index 962c1c9ec7..7ee3375b9c 100644 --- a/test/integration/integration/tests/resources/tests/api-with-path-params.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-path-params.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-path-params @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - test-api-with-path-params-httproute + - test-api-with-path-params-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,29 +38,29 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - path-param-api.test.gw.wso2.com + - path-param-api.test.gw.wso2.com rules: - - matches: - - path: - type: RegularExpression - value: /user/([^/]+)/playlist/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /user/\1/playlist/\2 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /user/([^/]+)/playlist/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /user/\1/playlist/\2 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -69,5 +69,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-with-request-header-modify.yaml b/test/integration/integration/tests/resources/tests/api-with-request-header-modify.yaml index 1239dae383..a93f44fe85 100644 --- a/test/integration/integration/tests/resources/tests/api-with-request-header-modify.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-request-header-modify.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-request-header-modify @@ -28,7 +28,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - test-api-with-request-header-modify-httproute + - test-api-with-request-header-modify-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,43 +38,43 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - backend-base-path.test.gw.wso2.com + - backend-base-path.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /users - method: GET - filters: - - type: RequestHeaderModifier - requestHeaderModifier: - remove: - - X-Header-Remove - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /orders - method: GET - filters: - - type: RequestHeaderModifier - requestHeaderModifier: - set: - - name: "test-header" - value: "test" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /users + method: GET + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + remove: + - X-Header-Remove + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /orders + method: GET + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: "test-header" + value: "test" + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -83,5 +83,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-with-response-header-modify.yaml b/test/integration/integration/tests/resources/tests/api-with-response-header-modify.yaml index 398e6f5020..ac7c5171bb 100644 --- a/test/integration/integration/tests/resources/tests/api-with-response-header-modify.yaml +++ b/test/integration/integration/tests/resources/tests/api-with-response-header-modify.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-response-header-modify @@ -28,7 +28,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - test-api-with-response-header-modify-httproute + - test-api-with-response-header-modify-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,56 +38,56 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - gateway-integration-test-infra.test.gw.wso2.com + - gateway-integration-test-infra.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /set - filters: - - type: ResponseHeaderModifier - responseHeaderModifier: - set: - - name: X-Header-Set - value: set-overwrites-values - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /add - method: GET - filters: - - type: ResponseHeaderModifier - responseHeaderModifier: - set: - - name: X-Header-Add - value: add-appends-values - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /remove - filters: - - type: ResponseHeaderModifier - responseHeaderModifier: - remove: - - X-Header-Remove - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /set + filters: + - type: ResponseHeaderModifier + responseHeaderModifier: + set: + - name: X-Header-Set + value: set-overwrites-values + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /add + method: GET + filters: + - type: ResponseHeaderModifier + responseHeaderModifier: + set: + - name: X-Header-Add + value: add-appends-values + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /remove + filters: + - type: ResponseHeaderModifier + responseHeaderModifier: + remove: + - X-Header-Remove + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -96,5 +96,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/api-without-backend-base-path.yaml b/test/integration/integration/tests/resources/tests/api-without-backend-base-path.yaml index 9926a42d50..a08f8d7740 100644 --- a/test/integration/integration/tests/resources/tests/api-without-backend-base-path.yaml +++ b/test/integration/integration/tests/resources/tests/api-without-backend-base-path.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: no-backend-base-path @@ -27,7 +27,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - no-backend-base-path-httproute + - no-backend-base-path-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,23 +37,23 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - no-base-path.test.gw.wso2.com + - no-base-path.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: / - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: / + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -62,5 +62,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/backend-api-key-security.yaml b/test/integration/integration/tests/resources/tests/backend-api-key-security.yaml index b28877eddf..825dea2fcf 100644 --- a/test/integration/integration/tests/resources/tests/backend-api-key-security.yaml +++ b/test/integration/integration/tests/resources/tests/backend-api-key-security.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-api-with-api-key-backend-security @@ -85,5 +85,5 @@ spec: in: Header name: api-key valueFrom: - name: mysecret - valueKey: apiKey + name: mysecret + valueKey: apiKey diff --git a/test/integration/integration/tests/resources/tests/custom-auth-header.yaml b/test/integration/integration/tests/resources/tests/custom-auth-header.yaml index f5a27cdcbd..0fada39bf9 100644 --- a/test/integration/integration/tests/resources/tests/custom-auth-header.yaml +++ b/test/integration/integration/tests/resources/tests/custom-auth-header.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: custom-auth-header @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - custom-auth-header-httproute + - custom-auth-header-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - custom-auth-header.test.gw.wso2.com + - custom-auth-header.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Authentication @@ -62,14 +62,14 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: false + disabled: false authTypes: oauth2: disabled: false - header: testAuth + header: testAuth jwt: disabled: false - header: testJwt + header: testJwt targetRef: group: gateway.networking.k8s.io kind: API @@ -83,5 +83,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/custom-policy-ratelimiting.yaml b/test/integration/integration/tests/resources/tests/custom-policy-ratelimiting.yaml index 1df044149b..56f1037cc4 100644 --- a/test/integration/integration/tests/resources/tests/custom-policy-ratelimiting.yaml +++ b/test/integration/integration/tests/resources/tests/custom-policy-ratelimiting.yaml @@ -39,7 +39,7 @@ metadata: spec: override: requestInterceptors: - - name: request-ratelimit-interceptor-api-level + - name: request-ratelimit-interceptor-api-level targetRef: group: gateway.networking.k8s.io kind: API @@ -58,7 +58,7 @@ spec: - request_headers - invocation_context --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: http-bin-api-basic @@ -71,7 +71,7 @@ spec: #definitionFileRef: swagger-definition-http-bin-api production: - routeRefs: - - prod-http-route-http-bin-api-basic + - prod-http-route-http-bin-api-basic organization: a3b58ccf-6ecc-4557-b5bb-0a35cce38256 --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -125,5 +125,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/default-api-version-ratelimit-resource-level.yaml b/test/integration/integration/tests/resources/tests/default-api-version-ratelimit-resource-level.yaml index 2c0aa6d1fc..a5f3f786ff 100644 --- a/test/integration/integration/tests/resources/tests/default-api-version-ratelimit-resource-level.yaml +++ b/test/integration/integration/tests/resources/tests/default-api-version-ratelimit-resource-level.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: default-api-version-ratelimit-resource-level @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - default-api-version-ratelimit-resource-level-httproute + - default-api-version-ratelimit-resource-level-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,36 +38,36 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - default-api-version-ratelimit-resource-level.test.gw.wso2.com + - default-api-version-ratelimit-resource-level.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /v2/echo - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: RateLimitPolicy - name: ratelimitter-r1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: RateLimitPolicy + name: ratelimitter-r1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Backend @@ -76,8 +76,8 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: dp.wso2.com/v1alpha3 kind: RateLimitPolicy diff --git a/test/integration/integration/tests/resources/tests/default-api-version-ratelimit.yaml b/test/integration/integration/tests/resources/tests/default-api-version-ratelimit.yaml index e6d2e40704..d6c180caf3 100644 --- a/test/integration/integration/tests/resources/tests/default-api-version-ratelimit.yaml +++ b/test/integration/integration/tests/resources/tests/default-api-version-ratelimit.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: default-api-version-ratelimit @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - default-api-version-ratelimit-httproute + - default-api-version-ratelimit-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - default-api-version-ratelimit.test.gw.wso2.com + - default-api-version-ratelimit.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha3 kind: RateLimitPolicy @@ -77,5 +77,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/default-api-version.yaml b/test/integration/integration/tests/resources/tests/default-api-version.yaml index c1b44e698f..261ca925ef 100644 --- a/test/integration/integration/tests/resources/tests/default-api-version.yaml +++ b/test/integration/integration/tests/resources/tests/default-api-version.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: default-api-version @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - default-api-version-httproute + - default-api-version-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - default-api-version.test.gw.wso2.com + - default-api-version.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -62,5 +62,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/different-endpoint-with-same-route.yaml b/test/integration/integration/tests/resources/tests/different-endpoint-with-same-route.yaml index b99241f995..173d34167b 100644 --- a/test/integration/integration/tests/resources/tests/different-endpoint-with-same-route.yaml +++ b/test/integration/integration/tests/resources/tests/different-endpoint-with-same-route.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: different-endpoint-with-same-route @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - different-endpoint-with-same-route-httproute + - different-endpoint-with-same-route-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,32 +38,32 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - different-endpoint-with-same-route.test.gw.wso2.com + - different-endpoint-with-same-route.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - method: POST - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v2 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + method: POST + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v2 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -72,8 +72,8 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -82,5 +82,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v2.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v2.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/disable-api-level-jwt.yaml b/test/integration/integration/tests/resources/tests/disable-api-level-jwt.yaml index 6d37cb7b8d..d5e9635e47 100644 --- a/test/integration/integration/tests/resources/tests/disable-api-level-jwt.yaml +++ b/test/integration/integration/tests/resources/tests/disable-api-level-jwt.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-api-level-jwt @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-api-level-jwt-httproute + - disable-api-level-jwt-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-api-level-jwt.test.gw.wso2.com + - disable-api-level-jwt.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -62,20 +62,20 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: false + disabled: false authTypes: apiKey: - in: Header name: x-api-key oauth2: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: API namespace: gateway-integration-test-infra name: disable-api-level-jwt --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-api-level-jwt1 @@ -89,7 +89,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-api-level-jwt1-httproute + - disable-api-level-jwt1-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -99,22 +99,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-api-level-jwt1.test.gw.wso2.com + - disable-api-level-jwt1.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -123,13 +123,13 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: false + disabled: false authTypes: apiKey: - in: Header name: x-api-key oauth2: - disabled: false + disabled: false targetRef: group: gateway.networking.k8s.io kind: API @@ -143,10 +143,10 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-api-level-jwt2 @@ -160,7 +160,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-api-level-jwt2-httproute + - disable-api-level-jwt2-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -170,22 +170,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-api-level-jwt2.test.gw.wso2.com + - disable-api-level-jwt2.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -194,10 +194,10 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: false + disabled: false authTypes: oauth2: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: API diff --git a/test/integration/integration/tests/resources/tests/disable-api-level-security.yaml b/test/integration/integration/tests/resources/tests/disable-api-level-security.yaml index 0ad9894d1e..28e4a5da93 100644 --- a/test/integration/integration/tests/resources/tests/disable-api-level-security.yaml +++ b/test/integration/integration/tests/resources/tests/disable-api-level-security.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-api-security @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-api-security-httproute + - disable-api-security-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,32 +38,32 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-api-security.test.gw.wso2.com + - disable-api-security.test.gw.wso2.com rules: - - matches: - - path: - type: Exact - value: /users - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: Exact - value: /orders - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /users + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /orders + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -72,7 +72,7 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: API @@ -86,5 +86,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 \ No newline at end of file + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/disable-resource-level-jwt.yaml b/test/integration/integration/tests/resources/tests/disable-resource-level-jwt.yaml index b29a6207fd..e140490bc7 100644 --- a/test/integration/integration/tests/resources/tests/disable-resource-level-jwt.yaml +++ b/test/integration/integration/tests/resources/tests/disable-resource-level-jwt.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-resource-level-jwt @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-resource-level-jwt-httproute + - disable-resource-level-jwt-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,28 +38,28 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-resource-level-jwt.test.gw.wso2.com + - disable-resource-level-jwt.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: disable-resource-level-jwt-authentication + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: disable-resource-level-jwt-authentication --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -81,7 +81,7 @@ spec: group: gateway.networking.k8s.io namespace: gateway-integration-test-infra --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-resource-level-jwt1 @@ -95,7 +95,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-resource-level-jwt1-httproute + - disable-resource-level-jwt1-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -105,28 +105,28 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-resource-level-jwt1.test.gw.wso2.com + - disable-resource-level-jwt1.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: disable-resource-level-jwt1-authentication + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: disable-resource-level-jwt1-authentication --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -155,10 +155,10 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-resource-level-jwt2 @@ -172,7 +172,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-resource-level-jwt2-httproute + - disable-resource-level-jwt2-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -182,28 +182,28 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-resource-level-jwt2.test.gw.wso2.com + - disable-resource-level-jwt2.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: disable-resource-level-jwt2-authentication + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: disable-resource-level-jwt2-authentication --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication diff --git a/test/integration/integration/tests/resources/tests/disable-resource-level-security.yaml b/test/integration/integration/tests/resources/tests/disable-resource-level-security.yaml index 71c706d100..380f6a2615 100644 --- a/test/integration/integration/tests/resources/tests/disable-resource-level-security.yaml +++ b/test/integration/integration/tests/resources/tests/disable-resource-level-security.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: disable-resoruce-security @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - disable-resoruce-security-httproute + - disable-resoruce-security-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,38 +38,38 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - disable-resource-security.test.gw.wso2.com + - disable-resource-security.test.gw.wso2.com rules: - - matches: - - path: - type: Exact - value: /users - method: GET - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: disable-resource-security - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: Exact - value: /orders - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /users + method: GET + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: disable-resource-security + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /orders + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -78,7 +78,7 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: Resource @@ -92,5 +92,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/fetch-api-definition.yaml b/test/integration/integration/tests/resources/tests/fetch-api-definition.yaml index 04d3d8ef6d..ec0a934417 100644 --- a/test/integration/integration/tests/resources/tests/fetch-api-definition.yaml +++ b/test/integration/integration/tests/resources/tests/fetch-api-definition.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: fetch-api-definition @@ -28,7 +28,7 @@ spec: definitionFileRef: definition-file-swagger production: - routeRefs: - - fetch-api-defintion-httproute + - fetch-api-defintion-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,28 +38,28 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - fetch-api-definition.test.gw.wso2.com + - fetch-api-definition.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /fetch-api-definitions/v1.0.0 - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplacePrefixMatch - replacePrefixMatch: /fetch-api-definition/v1.0.0/gw.wso2.com - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /fetch-api-definitions/v1.0.0 + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplacePrefixMatch + replacePrefixMatch: /fetch-api-definition/v1.0.0/gw.wso2.com + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: v1 kind: ConfigMap @@ -76,5 +76,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/fetch-non-existing-api-definition.yaml b/test/integration/integration/tests/resources/tests/fetch-non-existing-api-definition.yaml index a1ce6f781f..cf119584aa 100644 --- a/test/integration/integration/tests/resources/tests/fetch-non-existing-api-definition.yaml +++ b/test/integration/integration/tests/resources/tests/fetch-non-existing-api-definition.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: fetch-non-api-definition @@ -26,7 +26,7 @@ spec: basePath: /fetch-non-existing-api-definition/v1.0.0 production: - routeRefs: - - fetch-non-api-definition-httproute + - fetch-non-api-definition-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -36,28 +36,28 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - fetch-non-api-definition.test.gw.wso2.com + - fetch-non-api-definition.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /fetch-non-api-definitions/v1.0.0 - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplacePrefixMatch - replacePrefixMatch: /fetch-non-api-definitions/v1.0.0/gw.wso2.com - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /fetch-non-api-definitions/v1.0.0 + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplacePrefixMatch + replacePrefixMatch: /fetch-non-api-definitions/v1.0.0/gw.wso2.com + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -66,5 +66,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/gql-api.yaml b/test/integration/integration/tests/resources/tests/gql-api.yaml index c5ac136d18..bb963b302c 100644 --- a/test/integration/integration/tests/resources/tests/gql-api.yaml +++ b/test/integration/integration/tests/resources/tests/gql-api.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: gql-api @@ -28,7 +28,7 @@ spec: definitionFileRef: gql-sdl production: - routeRefs: - - gql-api-gqlroute + - gql-api-gqlroute organization: wso2-org --- apiVersion: dp.wso2.com/v1alpha2 @@ -38,47 +38,47 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - gql.test.gw.wso2.com + - gql.test.gw.wso2.com backendRefs: - group: dp.wso2.com kind: Backend name: gql-backend-v1 rules: - - matches: - - path: hero - type: QUERY - - path: droid - type: QUERY - - path: reviews - type: QUERY - - path: search - type: QUERY - - path: character - type: QUERY - - path: allHumans - type: QUERY - - path: allDroids - type: QUERY - - path: allCharacters - type: QUERY - - path: starship - type: QUERY - - path: createReview - type: MUTATION - - matches: - - path: human - type: QUERY - filters: - - extensionRef: - group: dp.wso2.com - kind: Authentication - name: disable-gql-api-security + - matches: + - path: hero + type: QUERY + - path: droid + type: QUERY + - path: reviews + type: QUERY + - path: search + type: QUERY + - path: character + type: QUERY + - path: allHumans + type: QUERY + - path: allDroids + type: QUERY + - path: allCharacters + type: QUERY + - path: starship + type: QUERY + - path: createReview + type: MUTATION + - matches: + - path: human + type: QUERY + filters: + - extensionRef: + group: dp.wso2.com + kind: Authentication + name: disable-gql-api-security --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -87,7 +87,7 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: Resource @@ -102,8 +102,8 @@ metadata: spec: basePath: /graphql services: - - host: gql-backend-v1.gateway-integration-test-infra - port: 8080 + - host: gql-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: v1 kind: ConfigMap diff --git a/test/integration/integration/tests/resources/tests/interceptors-api-level.yaml b/test/integration/integration/tests/resources/tests/interceptors-api-level.yaml index 3c58fe9d56..f282fd96d0 100644 --- a/test/integration/integration/tests/resources/tests/interceptors-api-level.yaml +++ b/test/integration/integration/tests/resources/tests/interceptors-api-level.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: api-interceptor-test-api @@ -27,7 +27,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - api-interceptor-route + - api-interceptor-route organization: wso2-org apiProperties: - name: propertyName1 @@ -42,29 +42,29 @@ metadata: namespace: gateway-integration-test-infra spec: hostnames: - - interceptor-api.test.gw.wso2.com + - interceptor-api.test.gw.wso2.com parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener rules: - - backendRefs: - - group: dp.wso2.com - kind: Backend - name: legacy-xml-backend-v1 - matches: - - path: - type: RegularExpression - value: /interceptor/2.0.0/books - method: POST - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /books + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: legacy-xml-backend-v1 + matches: + - path: + type: RegularExpression + value: /interceptor/2.0.0/books + method: POST + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /books --- apiVersion: dp.wso2.com/v1alpha3 kind: APIPolicy @@ -74,9 +74,9 @@ metadata: spec: override: requestInterceptors: - - name: request-interceptor-api-level + - name: request-interceptor-api-level responseInterceptors: - - name: response-interceptor-api-level + - name: response-interceptor-api-level targetRef: group: gateway.networking.k8s.io kind: API @@ -89,9 +89,9 @@ metadata: namespace: gateway-integration-test-infra spec: backendRef: - name: interceptor-backend-v1 + name: interceptor-backend-v1 includes: - - request_body + - request_body --- apiVersion: dp.wso2.com/v1alpha1 kind: InterceptorService diff --git a/test/integration/integration/tests/resources/tests/interceptors-resource-level.yaml b/test/integration/integration/tests/resources/tests/interceptors-resource-level.yaml index f6c3626346..527480e2a1 100644 --- a/test/integration/integration/tests/resources/tests/interceptors-resource-level.yaml +++ b/test/integration/integration/tests/resources/tests/interceptors-resource-level.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: resource-interceptor-test-api @@ -27,7 +27,7 @@ spec: #definitionFileRef: swagger-definition-webhook production: - routeRefs: - - resource-interceptor-route + - resource-interceptor-route organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,49 +37,49 @@ metadata: namespace: gateway-integration-test-infra spec: hostnames: - - interceptor-resource.test.gw.wso2.com + - interceptor-resource.test.gw.wso2.com parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener rules: - - backendRefs: - - group: dp.wso2.com - kind: Backend - name: legacy-xml-backend-v1 - matches: - - path: - type: RegularExpression - value: /interceptor/1.0.0/books/with-interceptors - method: POST - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /books - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: APIPolicy - name: interceptor-api-policy-resource-level - - backendRefs: - - group: dp.wso2.com - kind: Backend - name: legacy-xml-backend-v1 - matches: - - path: - type: RegularExpression - value: /interceptor/1.0.0/books/without-interceptors - method: POST - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /books + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: legacy-xml-backend-v1 + matches: + - path: + type: RegularExpression + value: /interceptor/1.0.0/books/with-interceptors + method: POST + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /books + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: APIPolicy + name: interceptor-api-policy-resource-level + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: legacy-xml-backend-v1 + matches: + - path: + type: RegularExpression + value: /interceptor/1.0.0/books/without-interceptors + method: POST + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /books --- apiVersion: dp.wso2.com/v1alpha3 kind: APIPolicy @@ -89,9 +89,9 @@ metadata: spec: override: requestInterceptors: - - name: request-interceptor-api-level + - name: request-interceptor-api-level responseInterceptors: - - name: response-interceptor-api-level + - name: response-interceptor-api-level targetRef: group: gateway.networking.k8s.io kind: Resource @@ -106,8 +106,8 @@ spec: backendRef: name: interceptor-backend-v1 includes: - - request_body - - request_headers + - request_body + - request_headers --- apiVersion: dp.wso2.com/v1alpha1 kind: InterceptorService diff --git a/test/integration/integration/tests/resources/tests/jwt-api-level-security.yaml b/test/integration/integration/tests/resources/tests/jwt-api-level-security.yaml index d62ed16417..8a4de30aef 100644 --- a/test/integration/integration/tests/resources/tests/jwt-api-level-security.yaml +++ b/test/integration/integration/tests/resources/tests/jwt-api-level-security.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: api-level-jwt @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - api-level-jwt-httproute + - api-level-jwt-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,22 +38,22 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - api-level-jwt.test.gw.wso2.com + - api-level-jwt.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Authentication @@ -62,10 +62,10 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: false + disabled: false authTypes: jwt: - disabled: false + disabled: false targetRef: group: gateway.networking.k8s.io kind: API @@ -79,5 +79,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/jwt-resource-level-security.yaml b/test/integration/integration/tests/resources/tests/jwt-resource-level-security.yaml index 5f2cb2da51..5bd064f5d4 100644 --- a/test/integration/integration/tests/resources/tests/jwt-resource-level-security.yaml +++ b/test/integration/integration/tests/resources/tests/jwt-resource-level-security.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: resource-level-jwt @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - resource-level-jwt-httproute + - resource-level-jwt-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,56 +38,56 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - resource-level-jwt.test.gw.wso2.com + - resource-level-jwt.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: resource-level-jwt-authentication - - matches: - - path: - type: PathPrefix - value: /v2/echo-1 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: resource-level-jwt-authentication-1 - - matches: - - path: - type: PathPrefix - value: /v2/echo-2 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Authentication - name: resource-level-jwt-authentication-2 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: resource-level-jwt-authentication + - matches: + - path: + type: PathPrefix + value: /v2/echo-1 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: resource-level-jwt-authentication-1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-2 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Authentication + name: resource-level-jwt-authentication-2 --- apiVersion: dp.wso2.com/v1alpha2 kind: Authentication @@ -151,5 +151,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/multiple_port_listener.yaml b/test/integration/integration/tests/resources/tests/multiple_port_listener.yaml index a9d49886d9..5e50136ed5 100644 --- a/test/integration/integration/tests/resources/tests/multiple_port_listener.yaml +++ b/test/integration/integration/tests/resources/tests/multiple_port_listener.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-multiple-port-listener @@ -27,10 +27,10 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - test-api-with-multiple-port-listener-httproute + - test-api-with-multiple-port-listener-httproute organization: wso2-org --- -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: test-multiple-port-listener-1 @@ -43,7 +43,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - test-api-with-multiple-port-listener-httproute + - test-api-with-multiple-port-listener-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -53,29 +53,29 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httplistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httplistener hostnames: - - api.am.wso2.com + - api.am.wso2.com rules: - - matches: - - path: - type: RegularExpression - value: /user/([^/]+)/playlist/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /user/\1/playlist/\2 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /user/([^/]+)/playlist/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /user/\1/playlist/\2 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -84,5 +84,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/prod-and-sand-apis.yaml b/test/integration/integration/tests/resources/tests/prod-and-sand-apis.yaml index 3391abd987..211f6685b0 100644 --- a/test/integration/integration/tests/resources/tests/prod-and-sand-apis.yaml +++ b/test/integration/integration/tests/resources/tests/prod-and-sand-apis.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: prod-and-sand-apis @@ -27,7 +27,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - prod-httproute + - prod-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1 @@ -37,23 +37,23 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - prod-api.test.gw.wso2.com + - prod-api.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: / - method: GET - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: / + method: GET + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -62,24 +62,24 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - sand-api.test.gw.wso2.com + - sand-api.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: / - method: GET - - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v2 + - matches: + - path: + type: PathPrefix + value: / + method: GET + + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v2 --- apiVersion: dp.wso2.com/v1alpha1 kind: Authentication @@ -88,7 +88,7 @@ metadata: namespace: gateway-integration-test-infra spec: override: - disabled: true + disabled: true targetRef: group: gateway.networking.k8s.io kind: API @@ -102,8 +102,8 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -112,11 +112,11 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v2.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v2.gateway-integration-test-infra + port: 8080 --- # To test whether we can successfully update already existing API with sandbox endpoints. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: prod-and-sand-apis @@ -129,8 +129,8 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - prod-httproute + - prod-httproute sandbox: - routeRefs: - - sand-httproute + - sand-httproute organization: wso2-org diff --git a/test/integration/integration/tests/resources/tests/ratelimit-priority.yaml b/test/integration/integration/tests/resources/tests/ratelimit-priority.yaml index 30dab71549..3792f9519c 100644 --- a/test/integration/integration/tests/resources/tests/ratelimit-priority.yaml +++ b/test/integration/integration/tests/resources/tests/ratelimit-priority.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: ratelimit-priority @@ -28,7 +28,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - ratelimit-priority-httproute + - ratelimit-priority-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -38,36 +38,36 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - ratelimit-priority.test.gw.wso2.com + - ratelimit-priority.test.gw.wso2.com rules: - - matches: - - path: - type: PathPrefix - value: /v2/echo-full - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: PathPrefix - value: /v2/echo - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: RateLimitPolicy - name: ratelimitter-r1 + - matches: + - path: + type: PathPrefix + value: /v2/echo-full + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: PathPrefix + value: /v2/echo + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: RateLimitPolicy + name: ratelimitter-r1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -76,8 +76,8 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 --- apiVersion: dp.wso2.com/v1alpha3 kind: RateLimitPolicy diff --git a/test/integration/integration/tests/resources/tests/resource-scopes.yaml b/test/integration/integration/tests/resources/tests/resource-scopes.yaml index b2a4444a44..44ef76abce 100644 --- a/test/integration/integration/tests/resources/tests/resource-scopes.yaml +++ b/test/integration/integration/tests/resources/tests/resource-scopes.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: resource-scopes @@ -27,7 +27,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - resource-scopes-httproute + - resource-scopes-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,44 +37,44 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - resource-scopes.test.gw.wso2.com + - resource-scopes.test.gw.wso2.com rules: - - matches: - - path: - type: Exact - value: /pets/findByTags - method: GET - filters: - - type: ExtensionRef - extensionRef: - group: dp.wso2.com - kind: Scope - name: pet-scopes - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /pet/(\d{1,3}) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /pet/\1 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /pets/findByTags + method: GET + filters: + - type: ExtensionRef + extensionRef: + group: dp.wso2.com + kind: Scope + name: pet-scopes + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /pet/(\d{1,3}) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /pet/\1 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha1 kind: Scope @@ -93,5 +93,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080 diff --git a/test/integration/integration/tests/resources/tests/trailing-slash.yaml b/test/integration/integration/tests/resources/tests/trailing-slash.yaml index eea7d2c912..1734f5618b 100644 --- a/test/integration/integration/tests/resources/tests/trailing-slash.yaml +++ b/test/integration/integration/tests/resources/tests/trailing-slash.yaml @@ -14,7 +14,7 @@ # specific language governing permissions and limitations # under the License. -apiVersion: dp.wso2.com/v1alpha2 +apiVersion: dp.wso2.com/v1alpha3 kind: API metadata: name: trailing-slash @@ -27,7 +27,7 @@ spec: #definitionFileRef: definition-file production: - routeRefs: - - trailing-slash-httproute + - trailing-slash-httproute organization: wso2-org --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -37,134 +37,134 @@ metadata: namespace: gateway-integration-test-infra spec: parentRefs: - - group: gateway.networking.k8s.io - kind: Gateway - name: wso2-apk-default - namespace: apk-integration-test - sectionName: httpslistener + - group: gateway.networking.k8s.io + kind: Gateway + name: wso2-apk-default + namespace: apk-integration-test + sectionName: httpslistener hostnames: - - trailing-slash.test.gw.wso2.com + - trailing-slash.test.gw.wso2.com rules: - - matches: - - path: - type: Exact - value: /echo-full/no-slash/findByStatus - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/no-slash/findByStatus - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /echo-full/no-slash/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/no-slash/\1 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /echo-full/no-slash/([^/]+)/pet/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/no-slash/\1/pet/\2 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: Exact - value: /echo-full/with-slash/findByStatus - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/with-slash/findByStatus/ - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /echo-full/with-slash/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/with-slash/\1/ - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /echo-full/with-slash/([^/]+)/pet/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/with-slash/\1/pet/\2/ - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: Exact - value: /echo-full/chars - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/chars - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 - - matches: - - path: - type: RegularExpression - value: /echo-full/with-param/([^/]+) - method: GET - filters: - - type: URLRewrite - urlRewrite: - path: - type: ReplaceFullPath - replaceFullPath: /v2/echo-full/with-param/\1 - backendRefs: - - group: dp.wso2.com - kind: Backend - name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /echo-full/no-slash/findByStatus + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/no-slash/findByStatus + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /echo-full/no-slash/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/no-slash/\1 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /echo-full/no-slash/([^/]+)/pet/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/no-slash/\1/pet/\2 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /echo-full/with-slash/findByStatus + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/with-slash/findByStatus/ + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /echo-full/with-slash/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/with-slash/\1/ + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /echo-full/with-slash/([^/]+)/pet/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/with-slash/\1/pet/\2/ + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: Exact + value: /echo-full/chars + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/chars + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 + - matches: + - path: + type: RegularExpression + value: /echo-full/with-param/([^/]+) + method: GET + filters: + - type: URLRewrite + urlRewrite: + path: + type: ReplaceFullPath + replaceFullPath: /v2/echo-full/with-param/\1 + backendRefs: + - group: dp.wso2.com + kind: Backend + name: infra-backend-v1 --- apiVersion: dp.wso2.com/v1alpha2 kind: Backend @@ -173,5 +173,5 @@ metadata: namespace: gateway-integration-test-infra spec: services: - - host: infra-backend-v1.gateway-integration-test-infra - port: 8080 + - host: infra-backend-v1.gateway-integration-test-infra + port: 8080