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

Looking for a way to escape period for yaml params that have dots in them #2247

Open
hferguson opened this issue Dec 21, 2024 · 0 comments
Open

Comments

@hferguson
Copy link

Please describe your feature request.
A clear and concise description of what the request is and what it would solve.
I would like to use yq to inject a parameter with dots and slashes in it. For example, I would like to represent the following which is an ingress annotation for helm:

globals: ingressAnnotations: cert-manager.io/cluster-issuer: letsencrypt

I tried appending this to my yaml file by using
yq -i '.globals.ingressAnnotations.certmanager.io/cluster-issuer="letsencrypt"' values.yaml
and this resulted in
globals: ingressAnnotations: cert-manager: io/cert-manager: letsencrypt
Maybe this exists already, but is there a way to escape dots so they aren't treated as delimiters? I already tried escaping the dot with a slash i.e. "cert-manager.io" but that only gave me the slash

The use case why I would do this has to do with OpenText Corporation's helm chart for Content Server deployments where you get the chart with a default values.yaml and you add/update by passing parameters to your helm install call

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

No branches or pull requests

1 participant