-
Notifications
You must be signed in to change notification settings - Fork 70
Address Multi-Cluster Health Check Configuration Inconsistency #789
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
Changes from 11 commits
171aa55
92ff5c8
afcd1a5
0a29e1c
42944cf
b6151e3
84461af
106085f
15b0dd0
209aa8e
7f08fd9
1a76bfb
b73cf68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,10 @@ When attaching a policy to a resource, the following restrictions apply: | |
| - A policy can be attached to `ServiceExport`. | ||
| - The attached resource should exist in the same namespace as the policy resource. | ||
|
|
||
| ### Multi-Cluster Health Check Configuration | ||
|
|
||
| In multi-cluster deployments, TargetGroupPolicy health check configurations are automatically propagated across all clusters that participate in the service mesh. When a TargetGroupPolicy is applied to a ServiceExport, all target groups created for that service across different clusters will use the same health check configuration, ensuring consistent health monitoring regardless of which cluster contains the route resource. | ||
|
|
||
| The policy will not take effect if: | ||
| - The resource does not exist | ||
| - The resource is not referenced by any route | ||
|
|
@@ -32,12 +36,15 @@ However, the policy will not take effect unless the target is valid. | |
| of VPC Lattice TargetGroup resource, except for health check updates. | ||
| - Attaching TargetGroupPolicy to an existing ServiceExport will result in a replacement of VPC Lattice TargetGroup resource, except for health check updates. | ||
| - Removing TargetGroupPolicy of a resource will roll back protocol configuration to default setting. (HTTP1/HTTP plaintext) | ||
| - In multi-cluster deployments, TargetGroupPolicy changes will automatically propagate to all clusters participating in the service mesh, ensuring consistent configuration across the deployment. | ||
|
|
||
| ## Example Configurations | ||
|
|
||
| ## Example Configuration | ||
| ### Single Cluster Configuration | ||
|
|
||
| This will enable HTTPS traffic between the gateway and Kubernetes service, with customized health check configuration. | ||
|
|
||
| ``` | ||
| ```yaml | ||
mikestvz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| apiVersion: application-networking.k8s.aws/v1alpha1 | ||
| kind: TargetGroupPolicy | ||
| metadata: | ||
|
|
@@ -61,3 +68,38 @@ spec: | |
| protocolVersion: HTTP1 | ||
| statusMatch: "200" | ||
| ``` | ||
|
|
||
| ### Multi-Cluster Configuration | ||
|
|
||
| This example shows how to configure health checks for a ServiceExport in a multi-cluster deployment. The health check configuration will be automatically applied to all target groups across all clusters that participate in the service mesh. | ||
|
|
||
| ```yaml | ||
| apiVersion: application-networking.k8s.aws/v1alpha1 | ||
| kind: TargetGroupPolicy | ||
| metadata: | ||
| name: multi-cluster-policy | ||
| spec: | ||
| targetRef: | ||
| group: "application-networking.k8s.aws" | ||
| kind: ServiceExport | ||
| name: inventory-service | ||
| protocol: HTTP | ||
| protocolVersion: HTTP2 | ||
| healthCheck: | ||
| enabled: true | ||
| intervalSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| healthyThresholdCount: 2 | ||
| unhealthyThresholdCount: 3 | ||
| path: "/health" | ||
| port: 8080 | ||
| protocol: HTTP | ||
| protocolVersion: HTTP1 | ||
|
||
| statusMatch: "200-299" | ||
| ``` | ||
|
|
||
| In this multi-cluster example: | ||
| - The policy targets a `ServiceExport` named `inventory-service` | ||
| - All clusters with target groups for this service will use HTTP/2 for traffic and the specified health check configuration | ||
| - Health checks will use HTTP/1 on port 8080 with the `/health` endpoint | ||
| - The configuration ensures consistent health monitoring across all participating clusters | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,37 @@ The `{index}` in the annotation corresponds to the zero-based index of the rule | |
|
|
||
| Higher priority values indicate higher precedence, so requests to `/api/v2` will be matched by the first rule (priority 200) before the second rule (priority 100) is considered. | ||
|
|
||
| ### Multi-Cluster Health Check Configuration | ||
|
|
||
| In multi-cluster deployments, you can ensure consistent health check configuration across all clusters by applying TargetGroupPolicy to ServiceExport resources. This eliminates the previous limitation where only the cluster containing the route resource would receive the correct health check configuration. | ||
|
||
|
|
||
| #### Configuring Health Checks for ServiceExport | ||
|
|
||
| When you apply a TargetGroupPolicy to a ServiceExport, the health check configuration is automatically propagated to all target groups across all clusters that participate in the service mesh: | ||
|
|
||
| ```yaml | ||
| apiVersion: application-networking.k8s.aws/v1alpha1 | ||
| kind: TargetGroupPolicy | ||
| metadata: | ||
| name: multi-cluster-health-policy | ||
| spec: | ||
| targetRef: | ||
| group: "application-networking.k8s.aws" | ||
| kind: ServiceExport | ||
| name: my-service | ||
| healthCheck: | ||
| enabled: true | ||
| intervalSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| healthyThresholdCount: 2 | ||
| unhealthyThresholdCount: 3 | ||
| path: "/health" | ||
| port: 8080 | ||
| protocol: HTTP | ||
| protocolVersion: HTTP1 | ||
| statusMatch: "200-299" | ||
| ``` | ||
|
|
||
| ### IPv6 support | ||
|
|
||
| IPv6 address type is automatically used for your services and pods if | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.