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

meshregistry: nacos source support filtering instance #295

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

believening
Copy link
Contributor

@believening believening commented Feb 22, 2023

we get all instances registered in the registry, but in some cases need to filter some instances by its metadata, use the LabelSelector to achieve this.

We have introduced a new configuration item Selectors in the general configuration of source,which is a list of selectors that specify the set of service instances to be processed, configured in the same way as the k8s labelselector.

e.g. filter instances with env=dev in metadata

NacosSource:
  Enabled: true
  Address:
  - "http://127.0.0.1:8848"
  Mode: polling
  EndpointSelectors:
  - MatchExpressions:
    - Key: env
      Operator: NotIn
      Values:
      - "dev"

NOTE: only support Nacos registry now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants