gateway-api: doc tests should not run with alpha CRDs by default (#13782)

* gateway-api: Doc tests should not run with alpha CRDs by default

* Fix broken tests

* cleanup

* replace bad wikipedia server ip
This commit is contained in:
Frank Budinsky 2023-08-30 20:15:08 -04:00 committed by GitHub
parent ec66c12a95
commit e8e9b35f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 8 deletions

View File

@ -2,10 +2,19 @@
---
{{< warning >}}
This document uses [experimental features](https://gateway-api.sigs.k8s.io/concepts/versioning/#release-channels-eg-experimental-standard)
of the Kubernetes Gateway API. Make sure to install the experimental CRDs before using the Gateway API:
of the Kubernetes Gateway API which require the alpha version of the CRDs. Before proceeding with this task, make sure to:
{{< text syntax=bash snip_id=install_experimental_crds >}}
$ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref={{< k8s_gateway_api_version >}}" | kubectl apply -f -
{{< /text >}}
1) Install the alpha version of the Gateway API CRDs:
{{< text syntax=bash snip_id=install_experimental_crds >}}
$ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref={{< k8s_gateway_api_version >}}" | kubectl apply -f -
{{< /text >}}
2) Configure Istio to read the alpha resources by setting the `PILOT_ENABLE_ALPHA_GATEWAY_API` environment variable to `true`
when installing Istio:
{{< text syntax=bash snip_id=enable_alpha_crds >}}
$ istioctl install --set values.pilot.env.PILOT_ENABLE_ALPHA_GATEWAY_API=true --set profile=minimal -y
{{< /text >}}
{{< /warning >}}

View File

@ -23,3 +23,7 @@
bpsnip_gateway_api_experimental_install_experimental_crds() {
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v0.8.0-rc1" | kubectl apply -f -
}
bpsnip_gateway_api_experimental_enable_alpha_crds() {
istioctl install --set values.pilot.env.PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING=true --set values.pilot.env.PILOT_ENABLE_ALPHA_GATEWAY_API=true --set profile=minimal -y
}

View File

@ -180,8 +180,8 @@ $ kubectl delete service my-httpbin
name: my-wikipedia
subsets:
- addresses:
- ip: 91.198.174.192
- ip: 198.35.26.96
- ip: 208.80.153.224
ports:
- port: 443
name: tls

View File

@ -143,8 +143,8 @@ metadata:
name: my-wikipedia
subsets:
- addresses:
- ip: 91.198.174.192
- ip: 198.35.26.96
- ip: 208.80.153.224
ports:
- port: 443
name: tls

View File

@ -18,11 +18,16 @@
source "tests/util/gateway-api.sh"
install_gateway_api_crds
# @setup profile=minimal
# @setup profile=none
source "content/en/boilerplates/snips/gateway-api-experimental.sh"
bpsnip_gateway_api_experimental_enable_alpha_crds
source "content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/test.sh"
# @cleanup
snip_cleanup_2
snip_cleanup_3
snip_cleanup_4
istioctl uninstall --purge -y
kubectl delete ns istio-system
remove_gateway_api_crds

View File

@ -18,10 +18,15 @@
source "tests/util/gateway-api.sh"
install_gateway_api_crds
# @setup profile=default
# @setup profile=none
source "content/en/boilerplates/snips/gateway-api-experimental.sh"
bpsnip_gateway_api_experimental_enable_alpha_crds
source "content/en/docs/tasks/traffic-management/tcp-traffic-shifting/test.sh"
# @cleanup
snip_cleanup_2
snip_cleanup_3
istioctl uninstall --purge -y
kubectl delete ns istio-system
remove_gateway_api_crds

View File

@ -42,5 +42,6 @@ values:
pilot:
env:
PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true
PILOT_ENABLE_ALPHA_GATEWAY_API: false
`
}

View File

@ -43,5 +43,6 @@ values:
pilot:
env:
PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true
PILOT_ENABLE_ALPHA_GATEWAY_API: false
`
}

View File

@ -44,6 +44,7 @@ values:
pilot:
env:
PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true
PILOT_ENABLE_ALPHA_GATEWAY_API: false
components:
egressGateways:
- enabled: false