You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,26 @@
1
1
# Node Maintenance Operator
2
2
3
3
The node-maintenance-operator is an operator generated from the [operator-sdk](https://github.com/operator-framework/operator-sdk).
4
-
The purpose of this operator is to watch for new or deleted custom resources called NodeMaintenance which indicate that a node in the cluster should either:
5
-
- NodeMaintenance CR created: move node into maintenance, cordon the node - set it as unschedulable and evict the pods (which can be evicted) from that node.
6
-
- NodeMaintenance CR deleted: remove pod from maintenance and uncordon the node - set it as schedulable.
4
+
The purpose of this operator is to watch for new or deleted custom resources called `NodeMaintenance` which indicate that a node in the cluster should either:
5
+
-`NodeMaintenance` CR created: move node into maintenance, cordon the node - set it as unschedulable, and evict the pods (which can be evicted) from that node.
6
+
-`NodeMaintenance` CR deleted: remove pod from maintenance and uncordon the node - set it as schedulable.
7
7
8
-
> *Note*: The current behavior of the operator is to mimic `kubectl drain <node name>`
9
-
> as performed in [medik8s - evict all VMs and Pods on a node ](https://kubevirt.io/user-guide//operations/node_maintenance/#evict-all-vms-and-pods-from-a-node)
8
+
> *Note*: The current behavior of the operator is to mimic `kubectl drain <node name>`.
10
9
11
10
## Build and run the operator
12
11
13
12
There are two ways to run the operator:
14
13
15
-
- Deploy the latest version, which was built from master branch, to a running Openshift/Kubernetes cluster.
16
-
- Build and run or deploy from sources to a running or to be created Openshift/Kubernetes cluster.
14
+
- Deploy the latest version, which was built from master branch, to a running OpenShift/Kubernetes cluster.
15
+
- Build and deploy from sources to a running or to be created OpenShift/Kubernetes cluster.
17
16
18
17
### Deploy the latest version
19
18
20
19
After every PR merge to master images were build and pushed to `quay.io`.
21
20
For deployment of NMO using these images you need:
22
21
23
-
- a running Openshift cluster, or a Kubernetes cluster with OLM installed.
24
-
-`operator-sdk` binary installed, see https://sdk.operatorframework.io/docs/installation/
22
+
- a running OpenShift cluster, or a Kubernetes cluster with OLM installed.
23
+
-`operator-sdk` binary installed, see https://sdk.operatorframework.io/docs/installation/.
25
24
- a valid `$KUBECONFIG` configured to access your cluster.
26
25
27
26
Then run `operator-sdk run bundle quay.io/medik8s/node-maintenance-operator-bundle:latest`
@@ -36,8 +35,8 @@ Follow the instructions [here](https://sdk.operatorframework.io/docs/building-op
36
35
37
36
To set maintenance on a node a `NodeMaintenance` CustomResource should be created.
38
37
The `NodeMaintenance` CR spec contains:
39
-
- nodeName: The name of the node which will be put into maintenance.
40
-
- reason: the reason for the node maintenance.
38
+
- nodeName: The name of the node which will be put into maintenance mode.
39
+
- reason: The reason why the node will be under maintenance.
41
40
42
41
Create the example `NodeMaintenance` CR found at `config/samples/nodemaintenance_v1beta1_nodemaintenance.yaml`:
0 commit comments