{"id":17268400,"url":"https://github.com/leonnicolas/nkml","last_synced_at":"2025-04-14T08:05:25.405Z","repository":{"id":39674132,"uuid":"323668763","full_name":"leonnicolas/nkml","owner":"leonnicolas","description":"Kubernetes node labeler for kernel modules","archived":false,"fork":false,"pushed_at":"2024-12-07T01:13:29.000Z","size":7178,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T08:05:16.453Z","etag":null,"topics":["kernel-module","kubernetes","labels"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonnicolas.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":"2020-12-22T15:49:48.000Z","updated_at":"2024-12-07T00:55:27.000Z","dependencies_parsed_at":"2024-06-21T16:54:19.296Z","dependency_job_id":"80f84bdd-2e9d-4901-845b-8b3b64cde4ae","html_url":"https://github.com/leonnicolas/nkml","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnkml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnkml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnkml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnkml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonnicolas","download_url":"https://codeload.github.com/leonnicolas/nkml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248843819,"owners_count":21170488,"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":["kernel-module","kubernetes","labels"],"created_at":"2024-10-15T08:13:15.805Z","updated_at":"2025-04-14T08:05:25.329Z","avatar_url":"https://github.com/leonnicolas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nkml\n\nNode Kernel Module Labeler - label Kubernetes nodes according to their kernel modules.\n\n[![ci](https://github.com/leonnicolas/nkml/actions/workflows/push.yaml/badge.svg)](https://github.com/leonnicolas/nkml/actions/workflows/push.yaml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/leonnicolas/nkml?color=blue)](https://hub.docker.com/r/leonnicolas/nkml)\n\n## Usage\n\nApply the example configuration\n```bash\nkubectl apply -f https://raw.githubusercontent.com/leonnicolas/nkml/main/example.yaml\n```\nto label nodes with regard to the [WireGuard](https://www.wireguard.com/) kernel module.\n\n### Configure the Labeler\n```\nUsage of ./nkml:\n      --hostname string         Hostname of the node on which this process is running\n      --kubeconfig string       path to kubeconfig\n  -m, --label-mod strings       list of strings, kernel modules matching a string will be used as labels with values true, if found\n      --label-prefix string     prefix for labels (default \"nkml.squat.ai\")\n      --listen-address string   listen address for prometheus metrics server (default \":8080\")\n      --log-level string        Log level to use. Possible values: all, debug, info, warn, error, none (default \"info\")\n      --no-clean-up             Will not attempt to clean labels before shutting down\n      --update-time duration    renewal time for labels in seconds (default 10s)\n```\n\n__Note:__ to check kernel modules, __nkml__ needs access to the file _/proc/modules_.\n\n### Label Kernel Modules\nYou can label your nodes according to their kernel modules.\nUse the `--label-mod` flag to pass a list of strings.\nIf a kernel module found in __/proc/modules__ matches one of the input strings, then the node will be given a label of the format:\n```\t\n\u003clabel prefix\u003e/\u003cmodule name\u003e=true\t\n```\t\nfor example:\t\n```\t\nnkml.squat.ai/wireguard=true\t\n```\t\nIf the module is not found, the flag's value will be set to _false_.\n \n### Outside the cluster\n\n```bash\ndocker run --rm -v ~/.kube:/mnt leonnicolas/nkml --kubeconfig /mnt/k3s.yaml --label-mod=\"wireguard,fantasy\" --hostname example_host\n```\n\n## Images\n\nImages can be found on [Docker Hub](https://hub.docker.com/r/leonnicolas/nkml) `leonnicolas/nkml` and [GitHub Container Registry](https://ghcr.io) `ghcr.io/leonnicolas/nkml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonnicolas%2Fnkml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonnicolas%2Fnkml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonnicolas%2Fnkml/lists"}