This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afba7e9
commit 4c57c06
Showing
1 changed file
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
``` |