diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 8c20f55ff3be..95b94c8a3d54 100644 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -284,7 +284,9 @@ function install() { elif is_ingress_class gateway-api; then # This installs an istio version that works with the v1alpha1 gateway api YTT_FILES+=("${E2E_YAML_DIR}/gateway-api/install") - YTT_FILES+=("${REPO_ROOT_DIR}/third_party/${ingress}-latest") + YTT_FILES+=("${REPO_ROOT_DIR}/third_party/${ingress}-latest/gateway-api.yaml") + YTT_FILES+=("${REPO_ROOT_DIR}/third_party/${ingress}-latest/net-gateway-api.yaml") + YTT_FILES+=("${REPO_ROOT_DIR}/third_party/${ingress}-latest/istio-gateway.yaml") else YTT_FILES+=("${REPO_ROOT_DIR}/third_party/${ingress}-latest") fi diff --git a/third_party/gateway-api-latest/contour-gateway.yaml b/third_party/gateway-api-latest/contour-gateway.yaml new file mode 100644 index 000000000000..d3e6630ab4c0 --- /dev/null +++ b/third_party/gateway-api-latest/contour-gateway.yaml @@ -0,0 +1,154 @@ +# Copyright 2021 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-gateway + namespace: knative-serving + labels: + serving.knative.dev/release: devel +data: + visibility: | + ExternalIP: + class: contour + gateway: contour-external/knative-gateway + service: contour-external/envoy-knative-gateway + ClusterLocal: + class: contour + gateway: contour-internal/knative-local-gateway + service: contour-internal/envoy-knative-local-gateway + +--- +# Copyright 2021 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Namespace +metadata: + name: contour-external +--- +kind: GatewayClass +apiVersion: gateway.networking.k8s.io/v1beta1 +metadata: + name: contour-external-gatewayclass +spec: + controllerName: projectcontour.io/gateway-controller + parametersRef: + kind: ContourDeployment + group: projectcontour.io + name: contour-external-gatewayclass + namespace: contour-external +--- +kind: ContourDeployment +apiVersion: projectcontour.io/v1alpha1 +metadata: + name: contour-external-gatewayclass + namespace: contour-external +spec: + runtimeSettings: + enableExternalNameService: true + contour: + deployment: + replicas: 1 +--- +kind: Gateway +apiVersion: gateway.networking.k8s.io/v1beta1 +metadata: + name: knative-gateway + namespace: contour-external +spec: + gatewayClassName: contour-external-gatewayclass + listeners: + - name: http + port: 80 + protocol: HTTP + allowedRoutes: + namespaces: + from: All + +--- +# Copyright 2021 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Namespace +metadata: + name: contour-internal +--- +kind: GatewayClass +apiVersion: gateway.networking.k8s.io/v1beta1 +metadata: + name: contour-internal-gatewayclass +spec: + controllerName: projectcontour.io/gateway-controller + parametersRef: + kind: ContourDeployment + group: projectcontour.io + name: contour-internal-gatewayclass + namespace: contour-internal +--- +kind: ContourDeployment +apiVersion: projectcontour.io/v1alpha1 +metadata: + name: contour-internal-gatewayclass + namespace: contour-internal +spec: + runtimeSettings: + enableExternalNameService: true + envoy: + networkPublishing: + type: ClusterIPService + contour: + deployment: + replicas: 1 +--- +kind: Gateway +apiVersion: gateway.networking.k8s.io/v1beta1 +metadata: + name: knative-local-gateway + namespace: contour-internal +spec: + gatewayClassName: contour-internal-gatewayclass + listeners: + - name: http + port: 80 + protocol: HTTP + allowedRoutes: + namespaces: + from: All + +---