Skip to content
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

Consume Topology Mode Annotation for AntreaProxy #5241

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

mengdie-song
Copy link
Contributor

New service.kubernetes.io/topology-mode annotation has been introduced as a replacement for the service.kubernetes.io/topology-aware-hints annotation. The service.kubernetes.io/topology-aware-hints annotation has been deprecated in K8s 1.27.

This change let AntreaProxy consume both annotations to support topology aware routing.

Fixes: #5122

New service.kubernetes.io/topology-mode annotation has been introduced
as a replacement for the service.kubernetes.io/topology-aware-hints annotation.
The service.kubernetes.io/topology-aware-hints annotation has been
deprecated in K8s 1.27.

This change let AntreaProxy consume both annotations to support
topology aware routing.

Fixes: antrea-io#5122
Signed-off-by: Mengdie Song <[email protected]>
@luolanzone luolanzone added this to the Antrea v1.13 release milestone Jul 13, 2023
Comment on lines +237 to +239
info.hintsAnnotation, ok = service.Annotations[v1.AnnotationTopologyAwareHints]
if !ok {
info.hintsAnnotation, _ = service.Annotations["service.kubernetes.io/topology-mode"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new annotation should be preferred when both annotations exist.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore the comment, I see you are following the same behavior as kube-proxy.

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn tnqn added area/proxy Issues or PRs related to proxy functions in Antrea action/release-note Indicates a PR that should be included in release notes. labels Jul 14, 2023
@tnqn
Copy link
Member

tnqn commented Jul 14, 2023

/skip-all

@tnqn tnqn merged commit 474414b into antrea-io:main Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/proxy Issues or PRs related to proxy functions in Antrea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Topology Hints Annotation is deprecated in v1.27 and will be removed
3 participants