Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to contour 1.26 and use gateway-provisioner #555

Merged
merged 9 commits into from
Oct 12, 2023
Merged
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ kubectl apply -f ./third_party/istio
#### Contour
```bash
echo ">> Bringing up Contour"
kubectl apply -f "https://raw.githubusercontent.com/projectcontour/contour-operator/${CONTOUR_VERSION}/examples/operator/operator.yaml"
kubectl apply -f "https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VERSION}/examples/render/contour-gateway-provisioner.yaml"

# wait for operator deployment to be Available
kubectl wait deploy --for=condition=Available --timeout=60s -n "contour-operator" -l '!job-name'
kubectl wait deploy --for=condition=Available --timeout=60s -n "projectcontour" contour-gateway-provisioner

echo ">> Deploy Gateway API resources"
kubectl apply -f ./third_party/contour
Expand Down
2 changes: 1 addition & 1 deletion docs/test-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ The following Gateway API version and Ingress were tested as part of the release
| Ingress | Tested version | Unavailable features |
| ------- | ----------------------- | ------------------------------ |
| Istio | v1.19.0 | retry,httpoption |
| Contour | v1.24.0 | httpoption,basics/http2,websocket,websocket/split,grpc,grpc/split,update,host-rewrite |
| Contour | v1.26.0 | httpoption,basics/http2,grpc,grpc/split,update |
4 changes: 2 additions & 2 deletions hack/test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
export GATEWAY_API_VERSION="v0.8.1"
export ISTIO_VERSION="1.19.0"
export ISTIO_UNSUPPORTED_E2E_TESTS="retry,httpoption"
export CONTOUR_VERSION="v1.24.0"
export CONTOUR_UNSUPPORTED_E2E_TESTS="httpoption,basics/http2,websocket,websocket/split,grpc,grpc/split,update,host-rewrite"
export CONTOUR_VERSION="v1.26.0"
export CONTOUR_UNSUPPORTED_E2E_TESTS="httpoption,basics/http2,grpc,grpc/split,update"
9 changes: 5 additions & 4 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function parse_flags() {
;;
--contour)
readonly INGRESS=contour
readonly GATEWAY_OVERRIDE=envoy
readonly GATEWAY_OVERRIDE=envoy-knative-gateway
readonly GATEWAY_NAMESPACE_OVERRIDE=contour-external
readonly UNSUPPORTED_E2E_TESTS="${CONTOUR_UNSUPPORTED_E2E_TESTS}"
return 1
Expand Down Expand Up @@ -100,7 +100,7 @@ function teardown_networking() {
kubectl delete -f "${REPO_ROOT_DIR}/third_party/${INGRESS}"

if [[ "$INGRESS" == "contour" ]]; then
kubectl delete -f "https://raw.githubusercontent.com/projectcontour/contour-operator/${CONTOUR_VERSION}/examples/operator/operator.yaml"
kubectl delete -f "https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VERSION}/examples/render/contour-gateway-provisioner.yaml"
else
istioctl uninstall -y --purge
kubectl delete namespace istio-system
Expand All @@ -109,8 +109,9 @@ function teardown_networking() {

function setup_contour() {
# Version is selected is in $REPO_ROOT/hack/test-env.sh
kubectl apply -f "https://raw.githubusercontent.com/projectcontour/contour-operator/${CONTOUR_VERSION}/examples/operator/operator.yaml" && \
kubectl wait deploy --for=condition=Available --timeout=60s -n "contour-operator" -l '!job-name' && \
kubectl apply -f "https://raw.githubusercontent.com/projectcontour/contour/${CONTOUR_VERSION}/examples/render/contour-gateway-provisioner.yaml" && \
kubectl wait deploy --for=condition=Available --timeout=60s -n projectcontour contour-gateway-provisioner && \
kubectl wait deploy --for=condition=Available --timeout=60s -n gateway-system gateway-api-admission-server && \
kubectl apply -f "${REPO_ROOT_DIR}/third_party/contour"

local ret=$?
Expand Down
4 changes: 2 additions & 2 deletions third_party/contour/config-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ data:
ExternalIP:
class: contour
gateway: contour-external/knative-gateway
service: contour-external/envoy
service: contour-external/envoy-knative-gateway
ClusterLocal:
class: contour
gateway: contour-internal/knative-local-gateway
service: contour-internal/envoy
service: contour-internal/envoy-knative-local-gateway
35 changes: 18 additions & 17 deletions third_party/contour/gateway-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,31 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: contour-operator
name: contour-external
---
apiVersion: operator.projectcontour.io/v1alpha1
kind: Contour
kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
name: contour-external
namespace: contour-external
name: contour-external-gatewayclass
spec:
gatewayControllerName: projectcontour.io/contour-external/contour
namespace:
name: contour-external
ingressClassName: contour-external
networkPublishing:
envoy:
type: LoadBalancerService
controllerName: projectcontour.io/gateway-controller
parametersRef:
kind: ContourDeployment
group: projectcontour.io
name: contour-external-gatewayclass
namespace: contour-external
---
kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ContourDeployment
apiVersion: projectcontour.io/v1alpha1
metadata:
name: contour-external-gatewayclass
namespace: contour-external
spec:
controllerName: projectcontour.io/contour-external/contour
runtimeSettings:
enableExternalNameService: true
contour:
deployment:
replicas: 1
---
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1beta1
Expand All @@ -48,7 +49,7 @@ metadata:
spec:
gatewayClassName: contour-external-gatewayclass
listeners:
- name: default
- name: http
port: 80
protocol: HTTP
allowedRoutes:
Expand Down
43 changes: 21 additions & 22 deletions third_party/contour/gateway-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,34 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: contour-operator
name: contour-internal
---
apiVersion: operator.projectcontour.io/v1alpha1
kind: Contour
kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
name: contour-internal
namespace: contour-internal
name: contour-internal-gatewayclass
spec:
gatewayControllerName: projectcontour.io/contour-internal/contour
namespace:
name: contour-internal
ingressClassName: contour-internal
networkPublishing:
envoy:
containerPorts:
- name: http
portNumber: 8081
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dprotaso @nak3 how was this used? Seems like the gateway below just used port 80?

Not sure if we can define this using the gateway-provisioner. If this is needed, we probably need to use helm to have more configuration flags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@nak3 nak3 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the 8081 port is used for prober. The current implementation lists endpoint IP which is 8081, and probe against it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, is this still needed? Tests seem to pass without it.

- name: https
portNumber: 8443
type: ClusterIPService
controllerName: projectcontour.io/gateway-controller
parametersRef:
kind: ContourDeployment
group: projectcontour.io
name: contour-internal-gatewayclass
namespace: contour-internal
---
kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ContourDeployment
apiVersion: projectcontour.io/v1alpha1
metadata:
name: contour-internal-gatewayclass
namespace: contour-internal
spec:
controllerName: projectcontour.io/contour-internal/contour
runtimeSettings:
enableExternalNameService: true
envoy:
networkPublishing:
type: ClusterIPService
contour:
deployment:
replicas: 1
---
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1beta1
Expand All @@ -53,7 +52,7 @@ metadata:
spec:
gatewayClassName: contour-internal-gatewayclass
listeners:
- name: default
- name: http
port: 80
protocol: HTTP
allowedRoutes:
Expand Down
Loading