Code Monkey home page Code Monkey logo

node-labeler-operator's People

Contributors

guilhem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-labeler-operator's Issues

add regex support for node names or labels

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.