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

fix(charts): quote annotation values #328

Merged
merged 1 commit into from
Mar 6, 2017

Conversation

mboersma
Copy link
Member

@mboersma mboersma commented Mar 6, 2017

I get errors trying to set service_annotations or deployment_annotations in testing #323. Templating the router service seems to be the initial problem, because the range loop doesn't quote the values as required.

Closes #325.

@mboersma mboersma added this to the v2.12 milestone Mar 6, 2017
@mboersma mboersma self-assigned this Mar 6, 2017
@codecov-io
Copy link

codecov-io commented Mar 6, 2017

Codecov Report

Merging #328 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #328   +/-   ##
=======================================
  Coverage   55.69%   55.69%           
=======================================
  Files           6        6           
  Lines         386      386           
=======================================
  Hits          215      215           
  Misses        151      151           
  Partials       20       20

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f81d872...65b7487. Read the comment docs.

@@ -7,7 +7,7 @@ metadata:
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
{{- range $key, $value := .Values.deployment_annotations }}
{{ $key }}: {{ $value }}
{{ $key }}: "{{ $value }}"
Copy link
Contributor

@krancour krancour Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a quote function in sprig for this that might be safer to use here. It will escape any double quote that exists within the string to make it YAML safe.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point--I'll try | quote.

@bacongobbler
Copy link
Member

I'll see if I can get service annotations working with this fix.

@bacongobbler
Copy link
Member

This worked for me. LGTM!

><> cat workflow/values.yaml | grep proxyBuffers
    router.deis.io/nginx.proxyBuffers.enabled: "true"
><> kd get deploy deis-router -o yaml | grep proxy
    router.deis.io/nginx.proxyBuffers.enabled: "true"

@mboersma mboersma merged commit 756f31e into deis:master Mar 6, 2017
@mboersma mboersma deleted the quote-annotation-values branch March 6, 2017 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants