{"id":46283071,"url":"https://github.com/jossware/node-provider-labeler","last_synced_at":"2026-03-04T06:18:36.112Z","repository":{"id":248302519,"uuid":"809197580","full_name":"jossware/node-provider-labeler","owner":"jossware","description":"Set Kubernetes Node metadata from cloud provider ids","archived":false,"fork":false,"pushed_at":"2024-07-30T01:41:24.000Z","size":226,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-30T14:15:00.891Z","etag":null,"topics":["cloud-providers","kubernetes","kubernetes-controller"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jossware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2024-06-02T01:44:22.000Z","updated_at":"2024-07-30T01:41:27.000Z","dependencies_parsed_at":"2024-07-28T13:58:21.967Z","dependency_job_id":"98c0da25-4d33-4aff-9f0b-4df67dcb795f","html_url":"https://github.com/jossware/node-provider-labeler","commit_stats":null,"previous_names":["jossware/node-provider-labeler"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jossware/node-provider-labeler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossware%2Fnode-provider-labeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossware%2Fnode-provider-labeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossware%2Fnode-provider-labeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossware%2Fnode-provider-labeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jossware","download_url":"https://codeload.github.com/jossware/node-provider-labeler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossware%2Fnode-provider-labeler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30074022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloud-providers","kubernetes","kubernetes-controller"],"created_at":"2026-03-04T06:18:34.866Z","updated_at":"2026-03-04T06:18:36.088Z","avatar_url":"https://github.com/jossware.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build](https://github.com/jossware/node-provider-labeler/actions/workflows/build.yaml/badge.svg)  ![release](https://github.com/jossware/node-provider-labeler/actions/workflows/release.yaml/badge.svg)  ![chart](https://github.com/jossware/node-provider-labeler/actions/workflows/chart.yaml/badge.svg)\n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/node-provider-labeler)](https://artifacthub.io/packages/search?repo=node-provider-labeler)\n\n# node-provider-labeler\n\nnode-provider-labeler is an open-source Kubernetes controller that monitors\nKubernetes Nodes for the `spec.providerID` field, which cloud providers\n[populate](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/node-v1/#NodeSpec)\nin the format: `\u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e`. When\n`node-provider-labeler` detects a `spec.providerID` field, it extracts\n(user-defined) information from the value and propagates that to Kubernetes\nmetadata (a label or an annotation or both) on the `Node` resource.\n\n## Features\n\n- **Cloud Provider Integration**: Can flexibly handle `spec.providerID` values\n  set by various cloud providers.\n- **Information Extraction**: Parses the provider-specific information from the\n  `spec.providerID` field in a flexible and configurable fashion.\n- **Node Labeling**: Adds the extracted information as a label or annotation on\n  the Kubernetes Node resource for easy identification and management.\n- **Rust Implementation**: Leverages Rust's performance and safety features for\n  robust and efficient operation.\n\n## Uses\n\n- **Cluster Management**: Simplifies the management and organization of nodes in\n  a Kubernetes cluster by automatically setting node metadata based on their\n  cloud provider IDs.\n- **Monitoring and Automation**: Enhances monitoring and automation tools that\n  rely on node metadata, allowing for more precise targeting and actions.\n\n## Install\n\nnode-provider-labeler runs as a Kubernetes deployment so you can manage and\ndeploy it in the same way you as your other Kubernetes workloads. We do provide\na [helm](https://helm.sh/) chart and a [kustomize](https://kustomize.io/) base\nto make it easy to get started.\n\n### Deploy via Helm\n\n``` shell\nhelm install node-provider-labeler oci://ghcr.io/jossware/charts/node-provider-labeler\n```\n\n### Deploy via Kustomize\n\n``` shell\nkustomize build https://github.com/jossware/node-provider-labeler.git/kustomize \\\n    | kubectl apply -f -\n```\n\n## Run\n\nBy default, node-provider-labeler will label nodes with a `provider-id` key and\nwith the value set to the last component of the `spec.providerID` field.\nExamples:\n\n| Provider | Provider ID                                                                                         | provider-id Value                        |\n|----------|-----------------------------------------------------------------------------------------------------|------------------------------------------|\n| EKS      | aws://us-west-2/i-0abcdef1234567890                                                                 | i-0abcdef1234567890                      |\n| GKE      | gce://my-project/us-central1-a/gke-cluster-1-default-pool-12345678-abc1                             | gke-cluster-1-default-pool-12345678-abc1 |\n| AKS      | azure://subscriptions/00000000/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myVM | myvm                                     |\n| Kind     | kind://podman/node-prov/node-prov-worker                                                            | node-prov-worker                         |\n\nIf you want to change the label key or value, use the `--label` flag when\nstarting the controller.\n\n``` shell\n  -l, --label \u003cLABEL\u003e\n          The label key and optional template to use for the label value.\n          The default is \"provider-id={:last}\" if there are no other labels or annotations configured.\n          Repeat to add multiple labels.\n```\n\nExamples:\n* --label=label-key\n* --label=label-key={:last} --label=other-label-key={0}-{1}\n\nSee [Templates](#templates) for more on how to define your label values.\n\nIf you'd rather annotate your node, use the `--annotation` flag:\n\n``` shell\n  -a, --annotation \u003cANNOTATION\u003e\n          The annotation key and optional template to use for the annotation value\n          Repeat to add multiple annotations.\n```\n\nExamples:\n* --annotation=annotation-key\n* --annotation=annotation-key={:last} --annotation=other-annotation-key={0}-{1}\n\nYou can use both the `--label` and `--annotation` flag(s) if you want to label\n_and_ annotate your nodes.\n\nnode-provider-labeler watches for `Node` resource events and reconciles metadata\nimmediately. It will also periodically reconcile `Node`s (every hour by\ndefault). You can change that interval with the `--requeue-duration` flag:\n\n``` shell\n      --requeue-duration \u003cREQUEUE_DURATION\u003e\n          Requeue reconciliation of a node after this duration in seconds\n\n          [default: 3600]\n```\n\n## Templates\n\nYou can write a string template to define how you want information extracted\nfrom `.spec.providerID` and into your metadata value. node-id-labeler parses the\n`providerID` and makes discovered information available via tokens you can use\nin your templates. It splits the value of the ID (the part after the provider\n\"protocol\") by \"/\" and it is possible to access individual parts by index or by\nnamed helpers.\n\nnode-provider-labeler will sometimes generate different values depending on\nwhether you are configuring a label or annotation (because of the differences in\nallowed characters in\n[label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)\nor\n[annotation](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set)\nvalues).\n\nLet's take a look at a concrete example for AWS: \"aws://us-west-2/i-0abcdef1234567890\". \n\n| Token       | Label Value                       | Annotation Value                    |\n|-------------|-----------------------------------|-------------------------------------|\n| {:provider} | aws                               | aws                                 |\n| {:last}     | i-0abcdef1234567890               | i-0abcdef1234567890                 |\n| {:first}    | us-west-2                         | us-west-2                           |\n| {:all}      | us-west-2_i-0abcdef1234567890     | us-west-2/i-0abcdef1234567890       |\n| {:url}      | aws_us-west-2_i-0abcdef1234567890 | aws://us-west-2/i-0abcdef1234567890 |\n| {0}         | us-west-2                         | us-west-2                           |\n| {1}         | i-0abcdef1234567890               | i-0abcdef1234567890                 |\n| {:node}     | ip-192-168-1-123.ec2.internal     | ip-192-168-1-123.ec2.internal       |\n\nOf course, you can combine tokens to define your value. Examples:\n\n| Template            | Label Value                      | Annotation Value                 |\n|---------------------|----------------------------------|----------------------------------|\n| {:provider}-{:last} | aws-i-0abcdef1234567890          | aws-i-0abcdef1234567890          |\n| {:first}-{:last}    | us-west-2-i-0abcdef1234567890    | us-west-2-i-0abcdef1234567890    |\n| id_{:all}           | id_us-west-2_i-0abcdef1234567890 | id_us-west-2/i-0abcdef1234567890 |\n\n## kubectl-node-provider-id\n\nYou can use the\n[kubectl-node-provider-id](https://github.com/jossware/kubectl-node-provider-id)\nplugin to more easily inspect `Node` provider IDs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossware%2Fnode-provider-labeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjossware%2Fnode-provider-labeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossware%2Fnode-provider-labeler/lists"}