{"id":17370110,"url":"https://github.com/gianarb/kube-aws-node-labeler","last_synced_at":"2025-03-27T18:45:19.440Z","repository":{"id":64305107,"uuid":"186249576","full_name":"gianarb/kube-aws-node-labeler","owner":"gianarb","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-13T07:38:32.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T21:43:41.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gianarb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-12T12:02:50.000Z","updated_at":"2020-05-07T09:14:50.000Z","dependencies_parsed_at":"2023-01-15T10:30:51.618Z","dependency_job_id":null,"html_url":"https://github.com/gianarb/kube-aws-node-labeler","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Fkube-aws-node-labeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Fkube-aws-node-labeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Fkube-aws-node-labeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Fkube-aws-node-labeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gianarb","download_url":"https://codeload.github.com/gianarb/kube-aws-node-labeler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245905248,"owners_count":20691753,"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":[],"created_at":"2024-10-16T00:23:35.044Z","updated_at":"2025-03-27T18:45:19.420Z","avatar_url":"https://github.com/gianarb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"I was looking for a way to automatically set labels to a Kubernetes node based\non the tags the EC2 has.\n\nI wrote a small application that uses an informer to take action every time a\nnew node joins the cluster. If the node has the label\n`failure-domain.beta.kubernetes.io/region` it is able to look for the instance\ntags from AWS. Specifically it looks for instance tags like:\n\n```\nkubernetes/aws-labeler/label/type=ci\n```\nIf the EC2 has this tag the Kubernetes node will have a label called\n\n```\nawslabeler.com/type=ci\n```\nThat you can use to schedule your pods.\n\nOther than labels it also support taints:\n\nAWS EC2 tags like:\n```\nkubernetes/aws-labeler/taint/type=ci:NoExecute\n```\nWill become:\n\n```\nawslabeler.com/type=ci:NoExecute\n```\n\n## Build\n\n```\n$ make docker\n```\nCreates an image\n\n\n## Deploy to Kubernetes\n\n1. You need to create a service account for this `pod` becauase it needs access\n   to the nodes resources. Get, watch, update is enough.\n2. You need to give access to AWS so you need to configure a IAM role for your\n   pod, or share a credential file or via envvar.\n\n## Try locally\n\nIt really depends on your setup as usual but in my case I use this command:\n```\nAWS_PROFILE=my-credentials-profile KUBECONFIG=/home/myhome/.kube/config go run cmd/aws-node-labeler/main.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianarb%2Fkube-aws-node-labeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgianarb%2Fkube-aws-node-labeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianarb%2Fkube-aws-node-labeler/lists"}