|
| 1 | +--- |
| 2 | +title: Kubernetes-NMstate |
| 3 | +authors: |
| 4 | + - "@schseba" |
| 5 | +reviewers: |
| 6 | + |
| 7 | +approvers: |
| 8 | + - TBD |
| 9 | + |
| 10 | +creation-date: 2019-12-18 |
| 11 | +last-updated: 2019-12-18 |
| 12 | +status: |
| 13 | +--- |
| 14 | + |
| 15 | +# Kubernetes nmstate |
| 16 | + |
| 17 | +## Release Signoff Checklist |
| 18 | + |
| 19 | +- [ ] Enhancement is `implementable` |
| 20 | +- [ ] Design details are appropriately documented from clear requirements |
| 21 | +- [ ] Test plan is defined |
| 22 | +- [ ] Graduation criteria for dev preview, tech preview, GA |
| 23 | +- [ ] User-facing documentation is created in [openshift-docs](https://github.com/openshift/openshift-docs/) |
| 24 | + |
| 25 | +## Summary |
| 26 | + |
| 27 | +A proposal to deploy Kubernetes nmstate on OpenShift. |
| 28 | + |
| 29 | +Node-networking configuration driven by Kubernetes and executed by |
| 30 | +[nmstate](https://nmstate.github.io/). |
| 31 | + |
| 32 | +## Motivation |
| 33 | + |
| 34 | +With hybrid clouds, node-networking setup is becoming even more challenging. |
| 35 | +Different payloads have different networking requirements, and not everything |
| 36 | +can be satisfied as overlays on top of the main interface of the node (e.g. |
| 37 | +SR-IOV, L2, other L2). |
| 38 | +The [Container Network Interface](https://github.com/containernetworking/cni) |
| 39 | +(CNI) standard enables different |
| 40 | +solutions for connecting networks on the node with pods. Some of them are |
| 41 | +[part of the standard](https://github.com/containernetworking/plugins), and there are |
| 42 | +others that extend support for [Open vSwitch bridges](https://github.com/kubevirt/ovs-cni), |
| 43 | +[SR-IOV](https://github.com/hustcat/sriov-cni), and more... |
| 44 | + |
| 45 | +However, in all of these cases, the node must have the networks setup before the |
| 46 | +pod is scheduled. Setting up the networks in a dynamic and heterogenous cluster, |
| 47 | +with dynamic networking requirements, is a challenge by itself - and this is |
| 48 | +what this project is addressing. |
| 49 | + |
| 50 | +### Goals |
| 51 | + |
| 52 | +- Deploy Kubnetes-nmstate as part of openshift |
| 53 | + |
| 54 | +### Non-Goals |
| 55 | + |
| 56 | +- Replace SRIOV operator |
| 57 | + |
| 58 | +## Proposal |
| 59 | + |
| 60 | +A new Kubernetes-nmstate handler DaemonSet is deployed in the cluster part of the OpenShift installation. |
| 61 | +This DaemonSet contains nmstate package and interacts with the NetworkManager |
| 62 | +on the host by mounting the related dbus. The project contains two |
| 63 | +Custom Resource Definitions, `NodeNetworkState` and `NodeNetworkConfigurationPolicy`. |
| 64 | +`NodeNetworkState` objects are created per each node in the cluster and can be |
| 65 | +used to report available interfaces and network configuration. These objects |
| 66 | +are created by kubernetes-nmstate and must not be touched by a user. |
| 67 | +`NodeNetworkConfigurationPolicy` objects can be used to specify desired |
| 68 | +networking state per node or set of nodes. It uses API similar to `NodeNetworkState`. |
| 69 | + |
| 70 | +Kubernetes-nmstate DaemonSet creates a custom resource of `NodeNetworkState` type per each node and |
| 71 | +updates the network topology from each OpenShift node. |
| 72 | + |
| 73 | +User configures host network changes and apply a policy in `NodeNetworkConfigurationPolicy` custom |
| 74 | +resource. Network topology is configured via `desiredState` section in `NodeNetworkConfigurationPolicy`. |
| 75 | +Multiple `NodeNetworkConfigurationPolicy` custom resources can be created, Kubenetes-nmstate DaemonSet will merge |
| 76 | +all the `NodeNetworkConfigurationPolicy` custom resources according to priority definition and |
| 77 | +apply one profile that best matches with the node and update the `desiredState` section in `NodeNetworkState`. |
| 78 | + |
| 79 | +Upon receiving a notification event of `NodeNetworkState` update, |
| 80 | +Kubenetes-nmstate Daemon verify the correctness of `NodeNetworkState` custom resource and |
| 81 | +apply the selected profile to the specific node. |
| 82 | + |
| 83 | +### User Stories |
| 84 | + |
| 85 | +#### Bond creation |
| 86 | + |
| 87 | +Be able to create bond interfaces on OpenShift nodes. |
| 88 | + |
| 89 | +### Implementation Details |
| 90 | + |
| 91 | +The proposal introduces Kubernetes-nmstate as Tech Preview. |
| 92 | + |
| 93 | +## Design Details |
| 94 | + |
| 95 | +### Test Plan |
| 96 | + |
| 97 | +- Functional tests will be implemented |
| 98 | + |
| 99 | +### Graduation Criteria |
| 100 | + |
| 101 | +Initial support for Kubernetes-nmstate will be Tech Preview |
| 102 | + |
| 103 | +#### Tech Preview |
| 104 | + |
| 105 | +- Kubernetes-nmstate can be installed via container image |
| 106 | +- Host network topology can be configured via CRDs |
| 107 | + |
| 108 | +#### Tech Preview -> GA |
| 109 | + |
| 110 | +### Upgrade / Downgrade Strategy |
| 111 | + |
| 112 | +### Version Skew Strategy |
| 113 | + |
| 114 | +kubernetes-nmstate runs as a DaemonSet. |
| 115 | + |
| 116 | +## Implementation History |
| 117 | + |
| 118 | +### Version 4.4 |
| 119 | + |
| 120 | +Tech Preview |
| 121 | + |
| 122 | +## Infrastructure Needed |
| 123 | + |
| 124 | +This requires a github repo be created under openshift org to hold a clone from kubernetes-nmstate |
0 commit comments