-
Notifications
You must be signed in to change notification settings - Fork 303
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
Create skeleton code for degraded mode procedure #1952
Create skeleton code for degraded mode procedure #1952
Conversation
Hi @sawsa307. 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 Once the patch is verified, the new status will be reflected by the 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. |
3bce024
to
e8e77a4
Compare
/assign @swetharepakula |
43b7959
to
5a9c63b
Compare
5a9c63b
to
e6ea78d
Compare
e6ea78d
to
75a2c95
Compare
75a2c95
to
12c8597
Compare
037b7c0
to
1fcc53a
Compare
pkg/neg/syncers/utils.go
Outdated
endpointPodMap := negtypes.EndpointPodMap{} | ||
for _, ed := range eds { | ||
// skip custom endpoint slice so it won't block the neg api call from succeeding | ||
if val, ok := ed.Meta.Labels[discovery.LabelManagedBy]; !ok || val != "endpointslice-controller.k8s.io" { |
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.
We should still validate custom endpoints. We should add them if they are valid pods.
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.
this also means we won't be adding the customer endpoints to the NEG?
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.
Removed this part. Thanks!
1fcc53a
to
0a32eb7
Compare
344d3db
to
e92dc66
Compare
pkg/neg/syncers/utils_test.go
Outdated
t.Run(tc.desc, func(t *testing.T) { | ||
testEndpointSlices := getTestEndpointSlices(testService, testNamespace) | ||
|
||
testEndpointSlices[2].ObjectMeta.Labels[discovery.LabelManagedBy] = tc.managedByLabel |
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.
add this as a testcase instead of modifying the EPS after the fact.
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.
Updated. Removing this since the part that filter custom endpoint slice is deleted #1952 (comment).
pkg/neg/syncers/utils.go
Outdated
// validatePod checks if this pod is a valid pod resource | ||
func validatePod(pod *apiv1.Pod) bool { | ||
return true | ||
} |
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.
Add this check in only when it is ready.
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.
Removed. Thanks!
e92dc66
to
6658372
Compare
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.
Last remaining comments are about logging and negative test cases. Otherwise the functionality looks good to me.
} | ||
for _, endpointAddress := range ed.Addresses { | ||
if endpointAddress.TargetRef == nil { | ||
continue |
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.
add a log to indicate no matching targetRef
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.
Added. Thanks!
pkg/neg/syncers/utils_test.go
Outdated
@@ -1250,6 +1536,7 @@ func getTestEndpointSlices(name, namespace string) []*discovery.EndpointSlice { | |||
notReady := false | |||
emptyNamedPort := "" | |||
testNamedPort := testNamedPort | |||
managedByController := "endpointslice-controller.k8s.io" |
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.
why is this change necessary?
6658372
to
28b435a
Compare
28b435a
to
58410c5
Compare
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.
/lgtm
/approve
/ok-to-test |
Create skeleton for degraded mode procedure. It will be enabled with enableDegradedMode flag, and they will be created in a different PR when the implementation is done.
58410c5
to
155f260
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sawsa307, swetharepakula The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Create skeleton code for degraded mode procedure. Implementation for filling missing information and filter invalid pod will come in separate PRs.