{"id":13795588,"url":"https://github.com/uswitch/nidhogg","last_synced_at":"2025-05-12T23:32:36.240Z","repository":{"id":49856490,"uuid":"176693491","full_name":"uswitch/nidhogg","owner":"uswitch","description":"Kubernetes Node taints based on Daemonset Pods","archived":true,"fork":false,"pushed_at":"2024-02-20T20:42:59.000Z","size":29075,"stargazers_count":76,"open_issues_count":15,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-14T16:06:01.560Z","etag":null,"topics":["kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uswitch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T08:56:54.000Z","updated_at":"2024-11-03T17:35:32.000Z","dependencies_parsed_at":"2024-02-20T21:58:46.846Z","dependency_job_id":null,"html_url":"https://github.com/uswitch/nidhogg","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fnidhogg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fnidhogg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fnidhogg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fnidhogg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uswitch","download_url":"https://codeload.github.com/uswitch/nidhogg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253841087,"owners_count":21972587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes"],"created_at":"2024-08-03T23:00:59.095Z","updated_at":"2025-05-12T23:32:31.219Z","avatar_url":"https://github.com/uswitch.png","language":"Go","funding_links":[],"categories":["Kubernetes"],"sub_categories":[],"readme":"🚨 THIS REPO IS NOW BEING ABANDONED 🚨\n\n⚠️⚠️⚠️⚠️⚠️⚠️ Please read ⚠️⚠️⚠️⚠️⚠️⚠️\n\nIf you are interested in using a maintened fork of this repo, please use [pelotech-nidhogg](https://github.com/pelotech/nidhogg), the fork that the engineering team at Pelotech have kindly agreed to maintain.\n\nSee [this issue for more details](https://github.com/uswitch/nidhogg/issues/43)\n\n⚠️⚠️⚠️⚠️⚠️⚠️ END of please read ⚠️⚠️⚠️⚠️⚠️⚠️\n\nWe are only a small team and we don't have the capacity to maintain a tool we don't use anymore, so from now on we will be moving this repo to Abandoned but we are happy that a team like the one at Pelotech is investing in this solution and giving back to the open source community by maintaining an active fork. \n\n# Nidhogg\n\nNidhogg is a controller that taints nodes based on whether a Pod from a specific Daemonset is running on them.\n\nSometimes 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 your Daemonset pod is ready, preventing pods that don't tolerate the taint from scheduling there.\n\nNidhogg annotate the node when all the required taints are removed: `nidhogg.uswitch.com/first-time-ready: 2006-01-02T15:04:05Z`\n\nNidhogg was built using [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder)\n\n## Usage\n\nNidhogg requires a yaml/json config file to tell it what Daemonsets to watch and what nodes to act on.\n`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 `nidhogg.uswitch.com/namespace.name:NoSchedule`.\n\nExample:\n\nYAML:\n```yaml\nnodeSelector:\n  node-role.kubernetes.io/node\ndaemonsets:\n  - name: kiam\n    namespace: kube-system  \n```\nJSON:\n\n```json\n{\n  \"nodeSelector\": [\n    \"node-role.kubernetes.io/node\",\n    \"!node-role.kubernetes.io/master\",\n    \"aws.amazon.com/ec2.asg.name in (standard, special)\"\n  ],\n  \"daemonsets\": [\n    {\n      \"name\": \"kiam\",\n      \"namespace\": \"kube-system\"\n    }\n  ]\n}\n```\nThis example will select any nodes in AWS ASGs named \"standard\" or \"special\" that have the label \n`node-role.kubernetes.io/node` present, and no nodes with label `node-role.kubernetes.io/master`. If the matching nodes \ndo not have a running and ready pod from the `kiam` daemonset in the `kube-system` namespace. It will add a taint of \n`nidhogg.uswitch.com/kube-system.kiam:NoSchedule` until there is a ready kiam pod on the node.\n\nIf you want pods to be able to run on the nidhogg tainted nodes you can add a toleration:\n\n```yaml\nspec:\n  tolerations:\n  - key: nidhogg.uswitch.com/kube-system.kiam\n    operator: \"Exists\"\n    effect: NoSchedule\n```\n\n## Deploying\nDocker images can be found at https://quay.io/uswitch/nidhogg\n\nExample [Kustomize](https://github.com/kubernetes-sigs/kustomize) manifests can be found  [here](/config) to quickly deploy this to a cluster.\n\n## Flags\n```\n-config-file string\n    Path to config file (default \"config.json\")\n-kubeconfig string\n    Paths to a kubeconfig. Only required if out-of-cluster.\n-leader-configmap string\n    Name of configmap to use for leader election\n-leader-election\n    enable leader election\n-leader-namespace string\n    Namespace where leader configmap located\n-master string\n    The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.\n-metrics-addr string\n    The address the metric endpoint binds to. (default \":8080\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Fnidhogg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuswitch%2Fnidhogg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Fnidhogg/lists"}