-
Notifications
You must be signed in to change notification settings - Fork 319
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
Ignore wildcard interface names in interface check #38
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.
Thanks! Just a minor change for the comment :)
@@ -33,8 +34,14 @@ func AddRule(appPort, metadataAddress, hostInterface, hostIP string) error { | |||
return nil | |||
} | |||
|
|||
// CheckInterfaceExists - validates the interface passed exists for the given system | |||
// CheckInterfaceExists - validates the interface passed exists for the given system, ignores calico networks |
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.
Nit: it could be other networks as well, it's really about ignoring wildcard characters so i'd make this comment and the one below more generic.
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.
Changed wording from "ignores calico networks" to "ignores wildcard networks"
func CheckInterfaceExists(hostInterface string) error { | ||
|
||
if strings.Contains(hostInterface, "+") { | ||
// calico networks ignored |
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.
Changed from "calico networks ignored" to "wildcard networks ignored"
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.
@jtblin was there anything else you wanted changed on this PR?
I'm also interested on this |
Hey! Just wondering when you'd merge this. I'm currently running a custom version. (I could also help maintain) |
Sorry for the lag, I was on annual leave. Thanks for the fix! 👍 |
* patch to ignore interface names like cali+. jtblin#37 * updates per @jtblin - https://github.com/jtblin/kube2iam/pull/38\#pullrequestreview-13475489
Patch to ignore interface names like cali+
What is the problem/feature?
As per #37 calico networks are passed to kube2iam with the 'cali+' notation.
#34 did not take this into consideration.
How did it get fixed/implemented?
CheckInterfaceExists
that returnsnil
if a + is detected