Skip to content

Commit

Permalink
fix(deployments): Fixed k8s manifests templates generating invalid ya…
Browse files Browse the repository at this point in the history
…ml (#1456)

manifest templates were adding unnecessary commas when podAnnotations, podLabels, or serviceLabels were supplied causing deployments to fail.
  • Loading branch information
gregnorth authored and mergify[bot] committed Dec 4, 2019
1 parent e9611c0 commit e518ed4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -31,10 +31,10 @@ spec:
{% endif %}
template:
metadata:
annotations: {
{% for key, value in podAnnotations.items() %}
"{{ key }}" : "{{ value }}"{% if not loop.last %}, {% endif %}
{% endfor %}}
annotations:
{% for key, value in podAnnotations.items() %}
"{{ key }}": "{{ value }}"
{% endfor %}
labels:
app: spin
cluster: spin-{{ name }}
Expand All @@ -43,6 +43,6 @@ spec:
app.kubernetes.io/part-of: spinnaker
app.kubernetes.io/version: {{ version }}
{% for key, value in podLabels.items() %}
"{{ key }}" : "{{ value }}"{% if not loop.last %}, {% endif %}
"{{ key }}": "{{ value }}"
{% endfor %}
spec: {{ podSpec }}
Expand Up @@ -7,7 +7,7 @@ metadata:
app: spin
cluster: spin-{{ name }}
{% for key, value in serviceLabels.items() %}
"{{ key }}" : "{{ value }}"{% if not loop.last %}, {% endif %}
"{{ key }}": "{{ value }}"
{% endfor %}
spec:
selector:
Expand Down

0 comments on commit e518ed4

Please sign in to comment.