Skip to content

Commit

Permalink
add contour-gateway.yaml to third_party folder (#14998)
Browse files Browse the repository at this point in the history
* add contour-gateway.yaml to third_party folder

* list gateway api related files that work with istio to avoid conflict with contour-gateway.yaml
  • Loading branch information
izabelacg authored Mar 11, 2024
1 parent 455d3e5 commit 3e119d5
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
154 changes: 154 additions & 0 deletions third_party/gateway-api-latest/contour-gateway.yaml
Original file line number Diff line number Diff line change
@@ -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

---

0 comments on commit 3e119d5

Please sign in to comment.