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 indent for extra volumes #32

Merged

Conversation

phoenix-bjoern
Copy link
Contributor

The changes introduced in #30 had a bug in the indent which caused a Helm error.

Steps to reproduce:

  1. Add this for values.yaml
extraVolumes:
  - name: disk-cache
    emptyDir: {}

extraVolumeMounts:
  - name: disk-cache
    mountPath: /mnt
  1. Run helm template . . The following error will occur:
Error: YAML parse error on varnish/templates/deployment.yaml: error converting YAML to JSON: yaml: line 57: did not find expected key
  1. Decrease the nindent in templates/deployment.yaml:
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 9d173d9..53144e4 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -79,7 +79,7 @@ spec:
             mountPath: /etc/varnish
           {{- end }}
           {{- if .Values.extraVolumeMounts }}
-          {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
+          {{- toYaml .Values.extraVolumeMounts | nindent 10 }}
           {{- end }}
           {{- with .Values.livenessProbe }}
           livenessProbe:
@@ -157,7 +157,7 @@ spec:
       {{- end }}
       {{- end }}
       {{- if .Values.extraVolumes }}
-        {{- toYaml .Values.extraVolumes | nindent 8 }}
+        {{- toYaml .Values.extraVolumes | nindent 6 }}
       {{- end }}
     {{- end }}
  1. Run helm template . again, which should succeed.

@santinoncs santinoncs merged commit 5784a71 into softonic:master Feb 15, 2023
@santinoncs
Copy link
Member

Pushed to helm repo

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

Successfully merging this pull request may close these issues.

None yet

2 participants