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

Question: Testing rendered ConfigMaps #116

Open
JasonCrease opened this issue May 20, 2021 · 1 comment
Open

Question: Testing rendered ConfigMaps #116

JasonCrease opened this issue May 20, 2021 · 1 comment

Comments

@JasonCrease
Copy link

We have some ConfigMaps with complicated data items for configuration files and such. Since these are strings, we end up doing a lot of contains and matchRegex to ensure things are within the file. But since the Strings are usually structured, we'd love to be able to do something like:

templates:
  - configmap.yaml
[...]
    asserts:
      - equal:
          path: data.big_config_file\.yaml
          location: storage.db.username[2]
          pattern: "john_smith"

i.e. Using JSONPath to locate items in Strings.

Is this a feature on the backlog? Or is there a workaround? Thanks!

@quintush
Copy link
Owner

quintush commented Nov 1, 2021

Hello @JasonCrease ,

I see some similarity in the issue #85.
I do want to implement a kind of improved validator for mappings, but i'm currently investigating on how the implement this the best way (with the limited time i have).

Currently you are already using the workaround by using contains and regex.

Greetings,
@quintush

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