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-weightAll three apply to
Service,ServiceEntry, andNamespace, the same service-level scope, and deliberately notPod/WorkloadEntry. The weight is a service-level traffic split keyed off the destination service, so a per-workloadtarget has no meaning here. This is why the scope is narrower than
istio.io/use-waypoint, which legitimately covers workloads too.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.