-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Remove deprecated ESIPP beta annotations #50224
Remove deprecated ESIPP beta annotations #50224
Conversation
Hi @xiangpengzhao. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Maybe we want a release note for this PR as it removes some deprecated things? |
Thanks for the PR, will review it soon.
Yep, maybe something like:
/ok-to-test |
@MrHohn thanks for your suggestion on release note. I modify the release-note block as below.
Note that I use Dose this make sense? |
/release-note |
Thanks, the release note SGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codes look good, couple minor comments :)
pkg/api/service/util.go
Outdated
@@ -104,45 +87,16 @@ func NeedsHealthCheck(service *api.Service) bool { | |||
|
|||
// GetServiceHealthCheckNodePort Return health check node port for service, if one exists | |||
func GetServiceHealthCheckNodePort(service *api.Service) int32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it worth to get rid of this function? This is essentially checking service.Spec.HealthCheckNodePort
. As the beta API is removed we don't need this abstraction layer anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And so we could remove those unit tests as well :) WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I was also thinking to remove these helpers when I first hit them. As you said, they're not needed anymore. Will address this. Thanks!
pkg/api/service/util.go
Outdated
return 0 | ||
} | ||
return int32(p) | ||
} | ||
return service.Spec.HealthCheckNodePort | ||
} | ||
|
||
// ClearExternalTrafficPolicy resets the ExternalTrafficPolicy field. | ||
func ClearExternalTrafficPolicy(service *api.Service) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment here.
pkg/api/service/util.go
Outdated
if _, ok := service.Annotations[api.BetaAnnotationExternalTraffic]; ok { | ||
delete(service.Annotations, api.BetaAnnotationExternalTraffic) | ||
return | ||
} | ||
service.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType("") | ||
} | ||
|
||
// SetServiceHealthCheckNodePort sets the given health check node port on service. | ||
// It does not check whether this service needs healthCheckNodePort. | ||
func SetServiceHealthCheckNodePort(service *api.Service, hcNodePort int32) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same.
@MrHohn inline comments addressed. I sent a separate commit for easy review. Feel free to tell me if I need to squash them after your review. Thanks! |
0bf7313
to
ea1a577
Compare
Thanks, this looks great :) /assign @thockin |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MrHohn, thockin, xiangpengzhao Associated issue: 50187 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
What this PR does / why we need it:
Remove deprecated ESIPP beta annotations.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #50187Special notes for your reviewer:
/assign @MrHohn
/sig network
Release note: