gateway-api: setup tips and warnings corrections (#13899)

* gateway-api: setup tips and warnings corrections

* regen

* remove obsolete snip
This commit is contained in:
Frank Budinsky 2023-09-19 19:28:03 -04:00 committed by GitHub
parent 8bb664eb66
commit 86eff5d563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 65 deletions

View File

@ -1,20 +0,0 @@
---
---
{{< warning >}}
This document uses [experimental features](https://gateway-api.sigs.k8s.io/concepts/versioning/#release-channels-eg-experimental-standard)
of the Kubernetes Gateway API which require the alpha version of the CRDs. Before proceeding with this task, make sure to:
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

@ -1,6 +1,9 @@
--- ---
--- ---
{{< boilerplate gateway-api-support >}} {{< tip >}}
{{< boilerplate gateway-api-future >}}
{{< boilerplate gateway-api-choose >}}
{{< /tip >}}
{{< warning >}} {{< warning >}}
Note that this document uses the Gateway API to configure internal mesh (east-west) traffic, Note that this document uses the Gateway API to configure internal mesh (east-west) traffic,
@ -8,4 +11,19 @@ i.e., not just ingress (north-south) traffic.
Configuring internal mesh traffic is an Configuring internal mesh traffic is an
[experimental feature](https://gateway-api.sigs.k8s.io/geps/overview/#status) [experimental feature](https://gateway-api.sigs.k8s.io/geps/overview/#status)
of the Gateway API, currently under development. of the Gateway API, currently under development.
If using the Gateway API instructions, before proceeding make sure to:
1) Install the **experimental 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 Gateway API 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 >}} {{< /warning >}}

View File

@ -1,29 +0,0 @@
#!/bin/bash
# shellcheck disable=SC2034,SC2153,SC2155,SC2164
# Copyright Istio Authors. All Rights Reserved.
#
# 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
#
# http://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.
####################################################################################################
# WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE:
# boilerplates/gateway-api-experimental.md
####################################################################################################
bpsnip_gateway_api_experimental_install_experimental_crds() {
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=f98e94a5305e3a08cb14f8a03470f8f3bdf6d54c" | 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

@ -19,4 +19,11 @@
# WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE: # WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE:
# boilerplates/gateway-api-gamma-support.md # boilerplates/gateway-api-gamma-support.md
#################################################################################################### ####################################################################################################
source "content/en/boilerplates/snips/gateway-api-support.sh"
bpsnip_gateway_api_gamma_support_install_experimental_crds() {
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=f98e94a5305e3a08cb14f8a03470f8f3bdf6d54c" | kubectl apply -f -
}
bpsnip_gateway_api_gamma_support_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

@ -19,8 +19,8 @@ source "tests/util/gateway-api.sh"
install_gateway_api_crds install_gateway_api_crds
# @setup profile=none # @setup profile=none
source "content/en/boilerplates/snips/gateway-api-experimental.sh" source "content/en/boilerplates/snips/gateway-api-gamma-support.sh"
bpsnip_gateway_api_experimental_enable_alpha_crds bpsnip_gateway_api_gamma_support_enable_alpha_crds
source "content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/test.sh" source "content/en/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/test.sh"
# @cleanup # @cleanup

View File

@ -17,9 +17,7 @@ The example HTTPS service used for this task is a simple [NGINX](https://www.ngi
In the following steps you first deploy the NGINX service in your Kubernetes cluster. In the following steps you first deploy the NGINX service in your Kubernetes cluster.
Then you configure a gateway to provide ingress access to the service via host `nginx.example.com`. Then you configure a gateway to provide ingress access to the service via host `nginx.example.com`.
{{< boilerplate gateway-api-support >}} {{< boilerplate gateway-api-gamma-support >}}
{{< boilerplate gateway-api-experimental >}}
## Before you begin ## Before you begin

View File

@ -19,8 +19,7 @@
# WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE: # WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE:
# docs/tasks/traffic-management/ingress/ingress-sni-passthrough/index.md # docs/tasks/traffic-management/ingress/ingress-sni-passthrough/index.md
#################################################################################################### ####################################################################################################
source "content/en/boilerplates/snips/gateway-api-support.sh" source "content/en/boilerplates/snips/gateway-api-gamma-support.sh"
source "content/en/boilerplates/snips/gateway-api-experimental.sh"
snip_generate_client_and_server_certificates_and_keys_1() { snip_generate_client_and_server_certificates_and_keys_1() {
mkdir example_certs mkdir example_certs

View File

@ -19,8 +19,8 @@ source "tests/util/gateway-api.sh"
install_gateway_api_crds install_gateway_api_crds
# @setup profile=none # @setup profile=none
source "content/en/boilerplates/snips/gateway-api-experimental.sh" source "content/en/boilerplates/snips/gateway-api-gamma-support.sh"
bpsnip_gateway_api_experimental_enable_alpha_crds bpsnip_gateway_api_gamma_support_enable_alpha_crds
source "content/en/docs/tasks/traffic-management/tcp-traffic-shifting/test.sh" source "content/en/docs/tasks/traffic-management/tcp-traffic-shifting/test.sh"
# @cleanup # @cleanup

View File

@ -19,9 +19,7 @@ In this task, you will send 100% of the TCP traffic to `tcp-echo:v1`.
Then, you will route 20% of the TCP traffic to `tcp-echo:v2` using Istio's Then, you will route 20% of the TCP traffic to `tcp-echo:v2` using Istio's
weighted routing feature. weighted routing feature.
{{< boilerplate gateway-api-support >}} {{< boilerplate gateway-api-gamma-support >}}
{{< boilerplate gateway-api-experimental >}}
## Before you begin ## Before you begin

View File

@ -19,8 +19,7 @@
# WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE: # WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. PLEASE MODIFY THE ORIGINAL MARKDOWN FILE:
# docs/tasks/traffic-management/tcp-traffic-shifting/index.md # docs/tasks/traffic-management/tcp-traffic-shifting/index.md
#################################################################################################### ####################################################################################################
source "content/en/boilerplates/snips/gateway-api-support.sh" source "content/en/boilerplates/snips/gateway-api-gamma-support.sh"
source "content/en/boilerplates/snips/gateway-api-experimental.sh"
snip_set_up_the_test_environment_1() { snip_set_up_the_test_environment_1() {
kubectl create namespace istio-io-tcp-traffic-shifting kubectl create namespace istio-io-tcp-traffic-shifting