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

offer simple way to express (un)supported keys #27

Open
ndeloof opened this issue Feb 11, 2020 · 2 comments
Open

offer simple way to express (un)supported keys #27

ndeloof opened this issue Feb 11, 2020 · 2 comments

Comments

@ndeloof
Copy link
Collaborator

ndeloof commented Feb 11, 2020

We need to replace #11 with a pluggable API for implementations to express keys they don't support.

v3 broke the v2 approach to define services options as a list of fields, that can be easily white|blacklisted as []string. We need a way to filter an actual yaml tree.

Proposal:
introduce option for implementation to declare a whitelist (or blacklist) of yaml paths. Check configDict map[string]interface{} to only/not include elements matching such paths

It doesn't seem there's a standard syntax to express paths in yaml tree, nothing comparable to xpath. Assuming we can use a comparable syntax, we could define a blacklist like this:

  • services/*/deploy/placement
  • services/*/volumesFrom
@ndeloof ndeloof self-assigned this Feb 13, 2020
@hangyan
Copy link
Contributor

hangyan commented Apr 8, 2020

python seems have a library to parse yaml tree: https://pypi.org/project/yamlpath/. But still there is no standard way to define the syntax, we can choose one and implement it in golang

@ndeloof ndeloof removed their assignment Sep 30, 2021
@ndeloof
Copy link
Collaborator Author

ndeloof commented Nov 8, 2023

This is now feasible relying on tree.Path syntax

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

No branches or pull requests

2 participants