{"id":17268519,"url":"https://github.com/leonnicolas/nudl","last_synced_at":"2025-03-22T18:34:33.737Z","repository":{"id":39674214,"uuid":"323417594","full_name":"leonnicolas/nudl","owner":"leonnicolas","description":"Kubernetes node labeler for usb devices","archived":false,"fork":false,"pushed_at":"2025-02-14T09:30:33.000Z","size":10410,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T18:01:46.334Z","etag":null,"topics":["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-21T18:31:31.000Z","updated_at":"2025-02-14T09:29:21.000Z","dependencies_parsed_at":"2024-06-21T15:23:56.213Z","dependency_job_id":"ae11db8c-c024-4eae-9301-ffd023918afd","html_url":"https://github.com/leonnicolas/nudl","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnudl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnudl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnudl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonnicolas%2Fnudl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonnicolas","download_url":"https://codeload.github.com/leonnicolas/nudl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245003684,"owners_count":20545645,"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","labels"],"created_at":"2024-10-15T08:13:33.858Z","updated_at":"2025-03-22T18:34:33.440Z","avatar_url":"https://github.com/leonnicolas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nudl\n\nNode Usb Device Labeler - label Kubernetes nodes according to their USB devices.\n\n[![ci](https://github.com/leonnicolas/nudl/actions/workflows/push.yaml/badge.svg)](https://github.com/leonnicolas/nudl/actions/workflows/push.yaml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/leonnicolas/nudl?color=blue)](https://hub.docker.com/r/leonnicolas/nudl)\n\n## Usage\n\nApply the example configuration\n```bash\nkubectl apply -f https://raw.githubusercontent.com/leonnicolas/nudl/main/example.yaml\n```\n\n### Configure the Labeler\n```\nUsage of ./nudl:\n      --hostname string         Hostname of the node on which this process is running\n      --human-readable          use human readable label names instead of hex codes, possibly not all codes can be translated (default true)\n      --kubeconfig string       path to kubeconfig\n      --label-prefix string     prefix for labels (default \"nudl.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-contain strings      list of strings, usb devices containing these case-insensitive strings will not be considered for labeling\n      --update-time duration    renewal time for labels in seconds (default 10s)\n      --usb-debug int           libusb debug level (0..3)\n```\n\n### Label USB devices\n\nIf __--human-readable=false__, vendor and device codes will be four hex characters each. The generated label will be of the form:\n```\n\u003clabel_prefix\u003e/\u003cvendor\u003e_\u003cdevice\u003e=true\n```\nfor example:\n```\nnudl.squat.ai/04f2_b420=true\n```\nOtherwise __nudl__ will try to translate the vendor and device codes into human readable strings using the [usbid](https://godoc.org/github.com/google/gousb/usbid) package, which uses [http://www.linux-usb.org/usb.ids](http://www.linux-usb.org/usb.ids). If the codes are not found, the name defaults to _Unknown_. Since some characters are not allowed in Kubernetes labels, forbidden characters are converted into \"-\".\n\nThe above example would look like:\n```\nnudl.squat.ai/Chicony-Electronics-Co.--Ltd_Unknown:true\n```\n\nCheck out [http://www.linux-usb.org/usb-ids.html](http://www.linux-usb.org/usb-ids.html) for more information about what devices are known.\n\n### Exclude USB devices\nUse the `--no-contain` flag to exclude USB devices that can be ignored, e.g. USB hubs.\n\n### Outside the cluster\n```bash\ndocker run --rm -v ~/.kube:/mnt leonnicolas/nudl --kubeconfig /mnt/k3s.yaml --hostname example_host\n```\n\n## Images\n\nImages can be found on [Docker Hub](https://hub.docker.com/r/leonnicolas/nudl) `leonnicolas/nudl` and [GitHub Container Registry](https://ghcr.io) `ghcr.io/leonnicolas/nudl`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonnicolas%2Fnudl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonnicolas%2Fnudl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonnicolas%2Fnudl/lists"}