Add well-known labels and annotation for weighted waypoint canary#3735
Open
ymesika wants to merge 2 commits into
Open
Add well-known labels and annotation for weighted waypoint canary#3735ymesika wants to merge 2 commits into
ymesika wants to merge 2 commits into
Conversation
|
😊 Welcome @ymesika! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this does
Registers the well-known labels and annotation for the weighted waypoint canary feature (Design Doc), which lets a service shift a configurable percentage of its traffic to a second "canary" waypoint alongside its primary one. This is the migration primitive for moving a service between two waypoints (for example two waypoint revisions, or two waypoint implementations) without changing clients or introducing a second Service.
Three additions:
istio.io/use-waypoint-canaryistio.io/use-waypoint.istio.io/use-waypoint-canary-namespaceistio.io/use-waypoint-namespace).istio.io/use-waypoint-canary-weightThese apply to Service, ServiceEntry, and Namespace - the service-level scope. We deliberately scope alpha narrower than istio.io/use-waypoint (which also covers Pod/WorkloadEntry): a pod-scoped canary is logically valid for in-mesh traffic, but it would need a separate weighted field on the Workload API and ztunnel's workload path, and it can't apply to ingress traffic (which is keyed off the service). Keeping to service-level scope for alpha keeps the change minimal and behaves identically across in-mesh and ingress. Workload scope can follow later.
Example:
Scope
This PR only adds the API surface: the well-known label/annotation definitions. The implementation lands separately.
Why the canary references are labels but the weight is an annotation
The canary name references (
use-waypoint-canaryanduse-waypoint-canary-namespace) are labels, following theiruse-waypointanduse-waypoint-namespacesiblings.They name a waypoint the same way the primary reference does, so they live in the same space for consistency.
The weight is an annotation because it is a configuration value, not identity:
kubectl get -l weight=50is meaningless), so it does not belong in the labelspace. This is the standard Kubernetes label-vs-annotation split.
sidecar.istio.io/proxyCPULimit,sidecar.istio.io/proxyMemoryLimit,traffic.sidecar.istio.io/excludeInboundPorts, andtraffic.sidecar.istio.io/includeOutboundPorts. All are numeric or list config, all are annotations.