diff --git a/README.md b/README.md index a5b72919f..98ff77201 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,26 @@ # Node Maintenance Operator The node-maintenance-operator is an operator generated from the [operator-sdk](https://github.com/operator-framework/operator-sdk). -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: - - 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. - - NodeMaintenance CR deleted: remove pod from maintenance and uncordon the node - set it as schedulable. +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: + - `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. + - `NodeMaintenance` CR deleted: remove pod from maintenance and uncordon the node - set it as schedulable. -> *Note*: The current behavior of the operator is to mimic `kubectl drain ` -> 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) +> *Note*: The current behavior of the operator is to mimic `kubectl drain `. ## Build and run the operator There are two ways to run the operator: -- Deploy the latest version, which was built from master branch, to a running Openshift/Kubernetes cluster. -- Build and run or deploy from sources to a running or to be created Openshift/Kubernetes cluster. +- Deploy the latest version, which was built from master branch, to a running OpenShift/Kubernetes cluster. +- Build and deploy from sources to a running or to be created OpenShift/Kubernetes cluster. ### Deploy the latest version After every PR merge to master images were build and pushed to `quay.io`. For deployment of NMO using these images you need: -- a running Openshift cluster, or a Kubernetes cluster with OLM installed. -- `operator-sdk` binary installed, see https://sdk.operatorframework.io/docs/installation/ +- a running OpenShift cluster, or a Kubernetes cluster with OLM installed. +- `operator-sdk` binary installed, see https://sdk.operatorframework.io/docs/installation/. - a valid `$KUBECONFIG` configured to access your cluster. 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 To set maintenance on a node a `NodeMaintenance` CustomResource should be created. The `NodeMaintenance` CR spec contains: -- nodeName: The name of the node which will be put into maintenance. -- reason: the reason for the node maintenance. +- nodeName: The name of the node which will be put into maintenance mode. +- reason: The reason why the node will be under maintenance. Create the example `NodeMaintenance` CR found at `config/samples/nodemaintenance_v1beta1_nodemaintenance.yaml`: