Skip to content

Improve service filteringΒ #33

@asimpleidea

Description

@asimpleidea

as of now omitting --metadata option makes the reader fatal as it does need a filter to do its job.

This may be improved by following the operator's convention:

  • --metadata=*/* = I don't care what metadata they have, just pull everything

    • This puts responsibility on the adaptor, who is now in charge of filtering the resources on its own, as it will receive resources with potentially lots of metadata.
    • An Info/Warn level log may be displayed to notify user about potentially retrieving lots of services this way
  • omitting --metadata = same behavior as above

  • --metadata=this,cnwan.io/that = I only want resources that have key "this" AND "cnwan.io/that"

    • service with this=one πŸ‘Ž
    • service with this=two;cnwan.io/that=three πŸ‘
  • --metadata=cnwan.io/* = I only want resources that have key with prefix "cnwan.io", regardless of the key's name

    • service with watch=enabled πŸ‘Ž
    • service with cnwan.io/watch=enabled;cnwan.io/traffic-profile=standard πŸ‘
  • --metadata=*/this = I only want resources that have key name "this", regardless of its prefix

    • service with this=that πŸ‘Ž
    • service with cnwan.io/this=whatever πŸ‘
    • service with dunno.lol/this=yes πŸ‘

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions