Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow regex for label keys #10233

Closed
Tracked by #22526
deusxanima opened this issue Feb 8, 2022 · 4 comments
Closed
Tracked by #22526

Allow regex for label keys #10233

deusxanima opened this issue Feb 8, 2022 · 4 comments
Assignees
Labels
c-dx Internal Customer Reference c-ju Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements IICD Internal Teleport Reference Label rbac Issues related to Role Based Access Control

Comments

@deusxanima
Copy link
Contributor

deusxanima commented Feb 8, 2022

What

Would like to be able to use regex to match keys in RBAC label configs to allow for easier scalability in certain environments.

Example:

node_labels:
      'project-code': 'elmo'
      'project-label': 'elmo'

would become

    node_labels:
      '^project-(.*)$'': 'elmo'

Why

Customer ask to help with scalability

gz#4008

@deusxanima deusxanima added feature-request Used for new features in Teleport, improvements to current should be #enhancements c-ju Internal Customer Reference labels Feb 8, 2022
@stevenGravy stevenGravy added the rbac Issues related to Role Based Access Control label Feb 17, 2022
@corkrean corkrean added the c-dx Internal Customer Reference label Jul 19, 2022
@russjones
Copy link
Contributor

node_labels:
   service: '^project-(.*)$''
   service-type: '^project-(.*)$''

@yjperez yjperez added the IICD Internal Teleport Reference Label label Mar 31, 2023
@jdconti jdconti mentioned this issue May 30, 2023
14 tasks
@zmb3
Copy link
Collaborator

zmb3 commented May 30, 2023

The proposal is to support a syntax like the following:

contains(labels_matching(labels, "^project-.*$"), "elmo")

@russjones
Copy link
Contributor

@jdconti Take a look at the above and tell us if this works for you?

@nklaassen
Copy link
Contributor

This is addressed by label expressions released in 13.1.1

For example you can now write:

node_labels_expression: |
  contains(labels_matching("^project-(code|label)$"), "elmo")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-dx Internal Customer Reference c-ju Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements IICD Internal Teleport Reference Label rbac Issues related to Role Based Access Control
Projects
None yet
Development

No branches or pull requests

7 participants