Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barpilot/node-labeler-operator
kubernetes operator to auto label/taint/annotate node based on CRD
https://github.com/barpilot/node-labeler-operator
annotations crd kubernetes kubernetes-operator labels operator taint
Last synced: 3 months ago
JSON representation
kubernetes operator to auto label/taint/annotate node based on CRD
- Host: GitHub
- URL: https://github.com/barpilot/node-labeler-operator
- Owner: barpilot
- License: apache-2.0
- Created: 2018-04-17T15:06:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T10:27:22.000Z (over 5 years ago)
- Last Synced: 2024-08-05T08:08:42.631Z (7 months ago)
- Topics: annotations, crd, kubernetes, kubernetes-operator, labels, operator, taint
- Language: Go
- Homepage:
- Size: 4.68 MB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-labeler-operator
kubernetes operator to auto label/taint/annotate node based on a CRD.[](https://github.com/barpilot/node-labeler-operator/releases)
[](https://travis-ci.org/barpilot/node-labeler-operator)
[](https://goreportcard.com/report/github.com/barpilot/node-labeler-operator)
[](https://hub.docker.com/r/barpilot/node-labeler-operator/)NOTE: This is an alpha-status project. We do regular tests on the code and functionality, but we can not assure a production-ready stability.
## Requirements
_node-labeler-operator_ is meant to be run on Kubernetes 1.8+. All dependecies have been vendored, so there's no need to any additional download.
## Usage
### Installation
In order to create _node-labeler-operator_ inside a Kubernetes cluster, the operator has to be deployed. It can be done with a deployment.
```
kubectl run node-labeler-operator --image=barpilot/node-labeler-operator --namespace=kube-system
```### Configuration
_node-labeler-operator_ is using a [CRD](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) for its configuration.
Here is a description of an object:
```yaml
apiVersion: labeler.barpilot.io/v1alpha1
kind: Labeler
metadata:
name: example
labels:
operator: node-labeler-operator
spec:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- minikube
- key: beta.kubernetes.io/os
operator: In
values:
- linux
- matchExpressions:
- key: another-node-label-key
operator: Exists
merge:
labels:
minikube: "true"
annotations:
node-labeler-operator: works
taints:
- key: dedicated
value: foo
effect: PreferNoSchedule
```
for more information about `nodeSelectorTerms` have a look at: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/### Cases
- VM on private cloud provider.
Nodes are removed on shutdown and so lose theirs attributes.## Features
- [x] Node selection
- [x] Adding attributes
- [x] Labels
- [x] Annotations
- [x] Taints
- [ ] Removing attributes
- [ ] Overwrite attributes