-
Notifications
You must be signed in to change notification settings - Fork 83
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
add interface for ignoring identity through command line #267
Conversation
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, a small change requested and a question.
@@ -0,0 +1,5 @@ | |||
package clusters | |||
|
|||
type EndpointSuspender interface { |
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.
Refactor this to EndpointUpdateSuspender?
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.
How about ServiceEntryUpdateSuspender
?
if des.ignoredIdentityCache.EnvironmentsByIdentity[identity] != nil { | ||
identityEnvironments := des.ignoredIdentityCache.EnvironmentsByIdentity[identity] | ||
if len(identityEnvironments) == 0 || (len(identityEnvironments) == 1 && identityEnvironments[0] == "") { | ||
log.Printf("%s, identity: %s", alertMsgSuspensionForIdentityInAllEnvironments, identity) |
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.
(len(identityEnvironments) == 1 && identityEnvironments[0] == "")
is this a special case or just a safety check?
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.
Yes, this is the case when the entry is like:
identityByEnvironment: map[string][]string{
"identity": []string{""},
}
Signed-off-by: Anubhav Aeron <[email protected]>
Signed-off-by: Anubhav Aeron <[email protected]>
Signed-off-by: Anubhav Aeron <[email protected]>
c8c0048
to
5c19170
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
Signed-off-by: Anubhav Aeron <[email protected]> Co-authored-by: Anubhav Aeron <[email protected]>
add interface for ignoring identity through command line (#267)
* Adding codecov/patch config * Adding 90% patch restriction for coverage * Fixing codecov config
Changes:
Add interface for endpoint generation suspension so that other implementations can be easily swapped with the current command line implementation.