{"id":13839363,"url":"https://github.com/banzaicloud/nodepool-labels-operator","last_synced_at":"2025-04-13T16:53:41.822Z","repository":{"id":37458498,"uuid":"169998414","full_name":"banzaicloud/nodepool-labels-operator","owner":"banzaicloud","description":"Nodepool Labels operator for Kubernetes","archived":false,"fork":false,"pushed_at":"2023-03-01T06:06:09.000Z","size":225,"stargazers_count":69,"open_issues_count":13,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T03:40:29.899Z","etag":null,"topics":["banzai-cloud","kubernetes","labeling","operator"],"latest_commit_sha":null,"homepage":"https://banzaicloud.com","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/banzaicloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-10T16:23:16.000Z","updated_at":"2023-02-28T16:55:09.000Z","dependencies_parsed_at":"2024-01-20T21:46:17.584Z","dependency_job_id":"8abb0819-72a0-4a69-af8a-fb9ea5ff2888","html_url":"https://github.com/banzaicloud/nodepool-labels-operator","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banzaicloud%2Fnodepool-labels-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banzaicloud%2Fnodepool-labels-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banzaicloud%2Fnodepool-labels-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banzaicloud%2Fnodepool-labels-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banzaicloud","download_url":"https://codeload.github.com/banzaicloud/nodepool-labels-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750010,"owners_count":21155682,"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":["banzai-cloud","kubernetes","labeling","operator"],"created_at":"2024-08-04T17:00:20.421Z","updated_at":"2025-04-13T16:53:41.802Z","avatar_url":"https://github.com/banzaicloud.png","language":"Go","funding_links":[],"categories":["Operator"],"sub_categories":[],"readme":"# Nodepool Labels Operator\n\n \u003eA **node pool** is a subset of node instances within a cluster with the same configuration, however, the overall cluster can contain multiple node pools as well as heterogeneous nodes/configurations. The Pipeline platform can manage any number of node pools on a Kubernetes cluster, each with different configurations - e.g. node pool 1 is local SSD, node pool 2 is spot or preemptible-based, node pool 3 contains GPUs - these configurations are turned into actual cloud-specific instances.\n\nThis operator watches node events to catch when a node joins the cluster. It uses a [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) to keep track of the desired list of node labels for the nodes of a node pool. There is one such CR per node pool.\n[Pipeline](https://beta.banzaicloud.io/) creates the CRs with the list of desired labels for each node pool and updates these when the user updates the node pool labels. The operator takes care of placing the labels listed in the CR to all the nodes that belong to the corresponding node pool. Since the concept of a node pool doesn't exists in Kubernetes, [Pipeline](https://beta.banzaicloud.io/) tracks what node pool a node belongs to via the `node.banzaicloud.io/nodepool: \u003cnode pool name\u003e` node label. The `operator` relies on this label to identify the nodes of a node pool. If `node.banzaicloud.io/nodepool` label is not available than it falls back to cloud specific node labels to identify the node pool a node belongs to:\n\n* AKS: `agent: \u003cnode pool name\u003e`\n* GKE: `cloud.google.com/gke-nodepool: \u003cnode pool name\u003e`\n\nAs the desired labels descibred in the CR for a nodepool only contains labels which should be set on the related nodes the operator uses an annotation (`nodepool.banzaicloud.io/managed-labels`) on each node to keep track of the managed labels and it will removed those managed labels which are not present in the desired state.\n\n## Installing the operator\n\n```bash\nhelm repo add  banzai-stable http://kubernetes-charts.banzaicloud.com/branch/master\nhelm install banzai-stable/nodepool-labels-operator\n```\n\n## Example\n\n```bash\ncat \u003c\u003cEOF | kubectl create -f -\napiVersion: labels.banzaicloud.io/v1alpha1\nkind: NodePoolLabelSet\nmetadata:\n  name: test-pool-2\nspec:\n  labels:\n    environment: \"testing\"\n    team: \"rnd\"\nEOF\n```\n\n```bash\n# kubectl describe node gke-standard-cluster-1-test-pool-2-1be3b06d-42wd\n\nName:               gke-standard-cluster-1-test-pool-2-1be3b06d-42wd\nRoles:              \u003cnone\u003e\nLabels:             environment=testing\n                    team=rnd\nAnnotations:        nodepool.banzaicloud.io/managed-labels: [\"environment\",\"team\"]\n```\n\n## Contributing\n\nIf you find this project useful here's how you can help:\n\n* Send a pull request with your new features and bug fixes\n* Help new users with issues they may encounter\n* Support the development of this project and star this repo!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanzaicloud%2Fnodepool-labels-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanzaicloud%2Fnodepool-labels-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanzaicloud%2Fnodepool-labels-operator/lists"}