diff --git a/content/en/boilerplates/gateway-api-experimental.md b/content/en/boilerplates/gateway-api-experimental.md index 03515c61ea..32261ee1a0 100644 --- a/content/en/boilerplates/gateway-api-experimental.md +++ b/content/en/boilerplates/gateway-api-experimental.md @@ -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 >}} diff --git a/content/en/boilerplates/snips/gateway-api-experimental.sh b/content/en/boilerplates/snips/gateway-api-experimental.sh index 6851084c33..f6205f698e 100644 --- a/content/en/boilerplates/snips/gateway-api-experimental.sh +++ b/content/en/boilerplates/snips/gateway-api-experimental.sh @@ -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 +} diff --git a/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/index.md b/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/index.md index d82f754c00..4597747c01 100644 --- a/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/index.md +++ b/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/index.md @@ -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 diff --git a/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/snips.sh b/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/snips.sh index baa92240f2..521f3f1d3d 100644 --- a/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/snips.sh +++ b/content/en/docs/tasks/traffic-management/egress/egress-kubernetes-services/snips.sh @@ -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 diff --git a/content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/gtwapi_test.sh b/content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/gtwapi_test.sh index e95c5c62e8..82b5599a3e 100644 --- a/content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/gtwapi_test.sh +++ b/content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/gtwapi_test.sh @@ -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 diff --git a/content/en/docs/tasks/traffic-management/tcp-traffic-shifting/gtwapi_test.sh b/content/en/docs/tasks/traffic-management/tcp-traffic-shifting/gtwapi_test.sh index 0ab562d2f2..5b428a8c52 100644 --- a/content/en/docs/tasks/traffic-management/tcp-traffic-shifting/gtwapi_test.sh +++ b/content/en/docs/tasks/traffic-management/tcp-traffic-shifting/gtwapi_test.sh @@ -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 diff --git a/tests/setup/profile-default/doc_test.go b/tests/setup/profile-default/doc_test.go index f9def21786..adf96f1cef 100644 --- a/tests/setup/profile-default/doc_test.go +++ b/tests/setup/profile-default/doc_test.go @@ -42,5 +42,6 @@ values: pilot: env: PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true + PILOT_ENABLE_ALPHA_GATEWAY_API: false ` } diff --git a/tests/setup/profile-demo/doc_test.go b/tests/setup/profile-demo/doc_test.go index 4d247bda41..40d31371ff 100644 --- a/tests/setup/profile-demo/doc_test.go +++ b/tests/setup/profile-demo/doc_test.go @@ -43,5 +43,6 @@ values: pilot: env: PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true + PILOT_ENABLE_ALPHA_GATEWAY_API: false ` } diff --git a/tests/setup/profile-minimal/doc_test.go b/tests/setup/profile-minimal/doc_test.go index 54f133330b..048ded4553 100644 --- a/tests/setup/profile-minimal/doc_test.go +++ b/tests/setup/profile-minimal/doc_test.go @@ -44,6 +44,7 @@ values: pilot: env: PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING: true + PILOT_ENABLE_ALPHA_GATEWAY_API: false components: egressGateways: - enabled: false