Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
update readme (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Irving authored Mar 22, 2019
1 parent afba7e9 commit 4c57c06
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
# nidhogg
# Nidhogg

Nidhogg is a controller that taints nodes based on whether a Pod from a specific Daemonset is running on them.

Sometimes you have a Daemonset that is so important that you don't want other pods to run on your node until that Daemonset is up and running on the node. Nidhogg solves this problem by tainting the node until this your daemonset pod is ready, preventing pods that don't tolerate the taint from scheduling there.

Nidhogg was built using [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder)

## Usage

Nidhogg requires a json config file to tell it what Daemonsets to watch and what nodes to act on.
`nodeSelector` is a map of keys/values corresponding to node labels. `daemonsets` is an array of Daemonsets to watch, each containing two fields `name` and `namespace`. Nodes are tainted with taint that follows the format of `<daemonset-name>-not-ready:NoSchedule`.

Example:

```json
{
"nodeSelector": {
"node-role.kubernetes.io/node": ""
},
"daemonsets": [
{
"name": "kiam",
"namespace": "kube-system"
}
]
}
```
This example will taint any nodes that have the label `node-role.kubernetes.io/node=""` if they do not have a running and ready pod from the `kiam` daemonset in the `kube-system` namespace.
It will add a taint of `kiam-not-ready:NoSchedule` until there is a ready kiam pod on the node.

## Deploying
Docker images can be found at https://quay.io/uswitch/nidhogg

Example [Kustomize](https://github.com/kubernetes-sigs/kustomize) manifests can be found [here](/config) to quickly deploy this to a cluster.

## Flags
```
-config-file string
Path to config file (default "config.json")
-kubeconfig string
Paths to a kubeconfig. Only required if out-of-cluster.
-master string
The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
-metrics-addr string
The address the metric endpoint binds to. (default ":8080")
```

0 comments on commit 4c57c06

Please sign in to comment.