-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fix webhook for virtual workers #198
Fix webhook for virtual workers #198
Conversation
pkg/webhook/validate.go
Outdated
@@ -285,5 +285,11 @@ func validateNicModel(selector *sriovnetworkv1.SriovNetworkNicSelector, iface *s | |||
if sriovnetworkv1.IsSupportedModel(iface.Vendor, iface.DeviceID) { | |||
return true | |||
} | |||
|
|||
// if running on shiftstack and requested a netfilter check if the device ID for the VF is in supported list are allowed. | |||
if selector.NetFilter != "" && selector.NetFilter == iface.NetFilter && sriovnetworkv1.IsVfSupportedModel(iface.Vendor, iface.DeviceID) { |
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.
Is netfilter always used in shift on stack?
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.
I think that is the case @atyronesmith please confirm
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.
For sriov, it should be used. However, it is not strictly required. I thought about suggesting the use of virtual flag (passing it during process creation), but I went for simplicity. Maybe it would be better to use the virtual flag as the decision point for using the third column.
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 more I think about it, I am convincing myself that the webhook process should use the virtual flag and that selector.Netfilter != "" should not be used as the deciding factor.
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.
What is the virtual flag?
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.
My fault. I forgot that the webhook doesn't include 'platformType' as it's not a daemon. PlatformType is set by looking for the network_data.json file on the workers. I guess a similar mechanism would need to be used for the webhook.
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.
@atyronesmith can you give it another look please I use the node to check the environment
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.
Reserving for a discussion...
a8a1b9c
to
53c0db3
Compare
this commit fix the validation webhook to support virtual workers using PCI passthrough Signed-off-by: Sebastian Sch <sebassch@gmail.com>
53c0db3
to
8f4d42f
Compare
The new version looks good to me. |
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
this commit fix the validation webhook to support virtual workers using PCI passthrough
Signed-off-by: Sebastian Sch sebassch@gmail.com