-
Notifications
You must be signed in to change notification settings - Fork 240
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
multus: add support for the Multus daemonset #54
Conversation
bindata/network/multus/multus.yaml
Outdated
serviceAccountName: multus | ||
containers: | ||
- name: kube-multus | ||
image: nfvpe/multus:latest |
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.
You probably know this, but the image url will need to be templated through like the others.
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 we want to use nfvpe/multus or pull from official registry, one of the issue I hit was that occasionally the latest nfvpe/multus image doesn't support reading kubelet device plugin checkpoint file which results in failure of configuring sriov-cni. not sure if it's because nfvpe/multus:latest may be updated by builds from different branches.
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.
yep, hence the WIP :)
pkg/network/render.go
Outdated
@@ -185,9 +213,9 @@ func RenderAdditionalNetworks(conf *netv1.NetworkConfigSpec, manifestDir string) | |||
return nil, errors.Errorf("invalid Additional Network Configuration: %v", errs) | |||
} | |||
|
|||
// render Multus when additional networks is provided | |||
// render the CRD when additional networks are provided |
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.
As per our previous discussion, we need to render the CRD whenever Multus is enabled so administrators can create additional networks out-of-band. I suspect that Multus also needs the CRD to exist to prevent errors.
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 don't think Multus cares. It only looks for the pod annotations, and only then does it try to get the networks using the CRD. So it's not going to block pods that don't use multiple networks. But yeah, CRD should get rendered anyway.
bindata/network/multus/multus.yaml
Outdated
serviceAccountName: multus | ||
containers: | ||
- name: kube-multus | ||
image: nfvpe/multus:latest |
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 we want to use nfvpe/multus or pull from official registry, one of the issue I hit was that occasionally the latest nfvpe/multus image doesn't support reading kubelet device plugin checkpoint file which results in failure of configuring sriov-cni. not sure if it's because nfvpe/multus:latest may be updated by builds from different branches.
pkg/network/render.go
Outdated
if len(ans) > 0 { | ||
objs, err := renderMultusConfig(manifestDir) | ||
objs, err := renderAdditionalNetworksCRD(manifestDir) |
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.
Rendering of CRD and CR may fail in a single run, some details here
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.
@zshi-redhat yeah, that's pretty odd and I think a bug somewhere in the Kube parts. If we create the CRD first, there's no reason that creating a subsequent CR should fail.
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.
@dcbw I still see this failure with the latest version of PR, not sure if it's specified to how I run the test (run the binary of cluster-network-operator in one of the master nodes). did you ever hit this issue?
@@ -41,6 +48,7 @@ func Validate(conf *netv1.NetworkConfigSpec) error { | |||
errs := []error{} | |||
|
|||
errs = append(errs, ValidateDefaultNetwork(conf)...) | |||
errs = append(errs, ValidateMultus(conf)...) |
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.
Shall we also validate additional networks here? If it's not provided, validation of additional network returns immediately.
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.
@zshi-redhat no, the validate of additional networks would be handled by the additional network rendering, not multus rendering. Multus and AdditionalNetworks are completely separate codepaths that do not depend on each other.
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.
Sorry, I added the comment in the wrong line, I mean add validation of additional network in a separate line so that controller will capture the failure immediately instead of reaching the render phase. just little optimization as it will anyway be validated before rendering.
At this point, let's wait until we actually have use-cases for those things before we put them into the operator. I honestly don't think namespaceIsolation is worthwhile here, that's what the Admission Controller and RBAC is for. logLevel and logFile would be controlled by the Network operator when increased debugging is called for, but shouldn't be a user-visible option. Almost everything that multus allows configuration for, should be handled automatically by the operator and not be a passthrough option to the user. |
Ok, understood, Operator would be the only user-facing interface, if there needs to be an user-configurable parameter to multus, it will be exposed in the operator level. |
@zshi-redhat yeah, at least for now. Let's keep things simple because once we add something, we can't easily remove it :) |
4f01da2
to
555d35f
Compare
/retest flake is during install:
|
e634bea
to
555d35f
Compare
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
NOTE: we are waiting on openshift/release#2570 to land, which will provide the official images for Multus. Once that lands, I will remove the "hack: no images for now" commit and update the image references. But this PR demonstrates that Multus passes CI even without official images. |
@danwinship real images added now, FWIW |
/retest |
Multus will be installed by default but can be turned off by setting the DisableMultiNetwork property of the Cluster Network Operator object to 'true'.
/retest
|
/retest |
@danwinship look better now? |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, dcbw, squeed 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 |
/test all |
/hold cancel |
/retest Please review the full test history for this PR and help us cut down flakes. |
The following don't seem network related...
|
/retest Please review the full test history for this PR and help us cut down flakes. |
+100 |
Multus will be installed by default but can be turned off by
setting the DisableMultiNetwork property of the Cluster Network Operator
object to 'true'.
[NOTE: we are waiting on https://github.com/openshift/release/pull/2570 to land, which will provide the official images for Multus. Once that lands, I will remove the "hack: no images for now" commit and update the image references.]