barpilot / node-labeler-operator Goto Github PK
View Code? Open in Web Editor NEWkubernetes operator to auto label/taint/annotate node based on CRD
License: Apache License 2.0
kubernetes operator to auto label/taint/annotate node based on CRD
License: Apache License 2.0
There is another node label operator by redhat (https://github.com/openshift-kni/node-label-operator) which supports node name patterns (regex) for labeling, however it doesn't support taints. We need to taint and label nodes based on their name, e.g:
node-infra-0
node-infra-1
It would be really nice if we could have a selector with regex match, like a mixture of these operators to have Labeler objects such as:
apiVersion: labeler.barpilot.io/v1alpha1
kind: Labeler
metadata:
name: spare-prefer-taint
labels:
operator: node-labeler-operator
spec:
nodeNamePatterns:
- "node-infra-.*"
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- "linux"
merge:
labels:
node-role.kubernetes.io/infra: "true"
taints:
- effect: NoExecute
key: node-role.kubernetes.io/infra
Which selects all nodes which match nodeSelectorTerms
AND then filters the ones which match one of nodeNamePatterns
, and only apply the labels and taints to those.
Another more general method is to have this regex matching for labels, with introducing a new seletor operator such as key: "kubernetes.io/host", operator: "match", values: ["somepattern.*"]
however as it violates the standard of matchExpressions of k8s, I think this latter method is not good, and the first one is more clear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.