-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSSM-11147 Istio Ambient mode waypoint docs: Waypoint proxy #100097
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
Open
shreyasiddhartha
wants to merge
1
commit into
openshift:service-mesh-docs-main
Choose a base branch
from
shreyasiddhartha:OSSM-11147
base: service-mesh-docs-main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,4 +108,3 @@ | |
:JaegerVersion: 1.47.0 | ||
//CLI | ||
:oc-first: pass:quotes[OpenShift CLI (`oc`)] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * service-mesh-docs-main/install/ossm-istio-ambient-mode.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="ossm-about-istio-ambient-waypoint_{context}"] | ||
= About waypoint proxies in Istio ambient mode | ||
|
||
After setting up {istio} ambient mode with ztunnel proxies, you can add waypoint proxies to enable advanced Layer 7 (L7) processing features that {istio} provides. | ||
|
||
{istio} ambient mode separates the functionality of {istio} into two layers: | ||
|
||
* A secure Layer 4 (L4) overlay managed by ztunnel proxies | ||
|
||
* An L7 layer managed by optional waypoint proxies | ||
|
||
A waypoint proxy is an Envoy-based proxy that performs L7 processing for workloads running in ambient mode. It functions as a gateway to a resource such as a namespace, service, or pod. You can install, upgrade, and scale waypoint proxies independently of applications. The configuration uses the {k8s} Gateway API. | ||
|
||
Unlike the sidecar model, where each workload runs its own Envoy proxy, waypoint proxies reduce resource use by serving multiple workloads within the same security boundary, such as all workloads in a namespace. | ||
|
||
A destination waypoint enforces policies by acting as a gateway. All incoming traffic to a resource—namespace, service, or pod—passes through the waypoint for policy enforcement. | ||
|
||
The `ztunnel` node proxy manages L4 functions in ambient mode, including mutual Transport Layer Security (mTLS) encryption, L4 traffic processing, and telemetry. Ztunnel and waypoint proxies communicate using HBONE (HTTP-Based Overlay Network), a protocol that tunnels traffic over HTTP/2 CONNECT with mutual TLS (mTLS) on port `15008`. | ||
|
||
You can add a waypoint proxy if workloads require any of the following L7 capabilities: | ||
|
||
Traffic management:: Advanced HTTP routing, load balancing, circuit breaking, rate limiting, fault injection, retries, and timeouts | ||
|
||
Security:: Authorization policies based on L7 attributes such as request type or HTTP headers | ||
|
||
Observability:: HTTP metrics, access logging, and tracing for application traffic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * service-mesh-docs-main/install/ossm-istio-ambient-mode.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="ossm-deploying-waypoint-proxy_{context}"] | ||
= Deploying a waypoint proxy | ||
|
||
You can deploy a waypoint proxy in the `bookinfo` application namespace to route traffic through the {istio} ambient data plane and enforce L7 policies. | ||
|
||
.Prerequisites | ||
|
||
* You have logged in to the {ocp-product-title} 4.19 or later, which provides supported {k8s} Gateway API custom resource definitions (CRDs) required for ambient mode functionality. | ||
|
||
* You have the {SMProductName} Operator 3.2.0 or later installed on the OpenShift cluster. | ||
|
||
* You have {istio} deployed in ambient mode. | ||
|
||
* You have deployed the `bookinfo` sample application for the following example. | ||
|
||
* You have added the `label istio.io/dataplane-mode=ambient` to the target namespace. | ||
|
||
.Procedure | ||
|
||
. Deploy a waypoint proxy in the `bookinfo` application namespace similar to the following example: | ||
+ | ||
.Example configuration | ||
[source,yaml] | ||
---- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
labels: | ||
istio.io/waypoint-for: service | ||
name: waypoint | ||
namespace: bookinfo | ||
spec: | ||
gatewayClassName: istio-waypoint | ||
listeners: | ||
- name: mesh | ||
port: 15008 | ||
protocol: HBONE | ||
---- | ||
|
||
. Apply the `waypoint` custom resource (CR) by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f waypoint.yaml | ||
---- | ||
+ | ||
The `istio.io/waypoint-for: service` label indicates that the waypoint handles traffic for services. The label determines the type of traffic processed. For more information, see "Waypoint traffic types". | ||
|
||
. Enroll the `bookinfo` namespace to use the waypoint by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc label namespace bookinfo istio.io/use-waypoint=waypoint | ||
---- | ||
|
||
After enrolling the namespace, requests from any pods using the ambient data plane to services in bookinfo will route through the waypoint for L7 processing and policy enforcement. | ||
|
||
.Verification | ||
|
||
. Confirm that the waypoint proxy is used by all the services in the `bookinfo` namespace by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ istioctl ztunnel-config svc --namespace ztunnel | ||
---- | ||
+ | ||
.Example output | ||
[source,termional] | ||
---- | ||
NAMESPACE SERVICE NAME SERVICE VIP WAYPOINT ENDPOINTS | ||
bookinfo details 172.30.15.248 waypoint 1/1 | ||
bookinfo details-v1 172.30.114.128 waypoint 1/1 | ||
bookinfo productpage 172.30.155.45 waypoint 1/1 | ||
bookinfo productpage-v1 172.30.76.27 waypoint 1/1 | ||
bookinfo ratings 172.30.24.145 waypoint 1/1 | ||
bookinfo ratings-v1 172.30.139.144 waypoint 1/1 | ||
bookinfo reviews 172.30.196.50 waypoint 3/3 | ||
bookinfo reviews-v1 172.30.172.192 waypoint 1/1 | ||
bookinfo reviews-v2 172.30.12.41 waypoint 1/1 | ||
bookinfo reviews-v3 172.30.232.12 waypoint 1/1 | ||
bookinfo waypoint 172.30.92.147 None 1/1 | ||
---- | ||
|
||
[NOTE] | ||
==== | ||
You can also configure only specific services or pods to use a waypoint by labeling the respective service or pod. When enrolling a pod explicitly, also add the `istio.io/waypoint-for: workload` label to the corresponding `gateway` resource. | ||
==== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * service-mesh-docs-main/install/ossm-istio-ambient-mode.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="ossm-deploying-waypoint-using-gateway-api_{context}"] | ||
= Deploying waypoint proxies using gateway API | ||
|
||
You can deploy waypoint proxies using {k8s} Gateway resource. | ||
|
||
.Prerequisites | ||
|
||
* You have logged in to the {ocp-product-title} 4.19 or later, which provides supported {k8s} Gateway API CRDs required for ambient mode functionality. | ||
|
||
* You have the {SMProductName} Operator 3.2.0 or later installed on the OpenShift cluster. | ||
|
||
* You have {istio} deployed in ambient mode. | ||
|
||
* You have applied the required labels to workloads or namespaces to enable `ztunnel` traffic redirection. | ||
|
||
[IMPORTANT] | ||
==== | ||
{istio} ambient mode is not compatible with clusters that use {SMProductName} 2.6 or earlier. You must not deploy both versions in the same cluster. | ||
==== | ||
|
||
.Procedure | ||
|
||
* On {ocp-product-title} 4.18 and earlier, install the community-maintained {k8s} Gateway API CRDs by running the following command: | ||
shreyasiddhartha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[source,terminal] | ||
---- | ||
$ oc get crd gateways.gateway.networking.k8s.io &> /dev/null || \ | ||
{ oc apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml; } | ||
---- | ||
+ | ||
From {ocp-product-title} 4.19 onwards, the Gateway API CRDs are installed by default. | ||
|
||
[NOTE] | ||
==== | ||
The CRDs are community maintained and not supported by Red Hat. Upgrading to {ocp-product-title} 4.19 or later, which includes supported Gateway API CRDs, may disrupt applications. | ||
==== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Module included in the following assemblies: | ||
|
||
// * service-mesh-docs-main/install/ossm-istio-ambient-mode.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="ossm-enabling-cross-namespace-waypoint-usage_{context}"] | ||
= Enabling cross-namespace waypoint usage | ||
|
||
You can use a cross-namespace waypoint to allow resources in one namespace to route traffic through a waypoint deployed in a different namespace. | ||
|
||
.Procedure | ||
|
||
. Create a `Gateway` resource that allows workloads in the `bookinfo` namespace to use the `waypoint-default` from the `default` namespace similar to the following example: | ||
+ | ||
.Example configuration | ||
[source,yaml] | ||
---- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: waypoint-default | ||
namespace: default | ||
spec: | ||
gatewayClassName: istio-waypoint | ||
listeners: | ||
- name: mesh | ||
port: 15008 | ||
protocol: HBONE | ||
allowedRoutes: | ||
namespaces: | ||
from: Selector | ||
selector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: bookinfo | ||
---- | ||
|
||
. Apply the cross-namespace waypoint by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f waypoint-default.yaml | ||
---- | ||
|
||
. Add the labels required to use a cross-namespace waypoint: | ||
|
||
.. Add the `istio.io/use-waypoint-namespace` label to specify the namespace where the waypoint resides by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc label namespace bookinfo istio.io/use-waypoint-namespace=default | ||
---- | ||
|
||
.. Add the `istio.io/use-waypoint` label to specify the waypoint to use by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc label namespace bookinfo istio.io/use-waypoint=waypoint-default | ||
---- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.