Prevent helm from adding meaningless blank lines to kubernetes objects YAML (#1065)

This commit is contained in:
Chia-Chun Tai
2019-01-21 19:54:40 +08:00
committed by Ta-Ching Chen
parent 3c4fdb0659
commit 2efa255eb4
11 changed files with 34 additions and 35 deletions
@@ -1,4 +1,4 @@
{{ if .Values.analyticsNonHelmInstall }}
{{- if .Values.analyticsNonHelmInstall }}
apiVersion: batch/v1
kind: Job
metadata:
@@ -28,4 +28,4 @@ spec:
- name: post-install-job
image: "fission/alpinecurl"
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
{{ end }}
{{- end }}
@@ -1,4 +1,4 @@
{{ if .Values.analytics }}
{{- if .Values.analytics }}
apiVersion: batch/v1
kind: Job
metadata:
@@ -32,4 +32,4 @@ spec:
- name: post-install-job
image: "fission/alpinecurl"
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
{{ end }}
{{- end }}
@@ -1,4 +1,4 @@
{{ if .Values.analytics }}
{{- if .Values.analytics }}
apiVersion: batch/v1
kind: Job
metadata:
@@ -32,4 +32,4 @@ spec:
- name: post-upgrade-job
image: "fission/alpinecurl"
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"helm-post-upgrade\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
{{ end }}
{{- end }}
+4 -4
View File
@@ -11,9 +11,9 @@ spec:
ports:
- port: 80
targetPort: 8888
{{ if eq .Values.routerServiceType "NodePort" }}
{{- if eq .Values.routerServiceType "NodePort" }}
nodePort: {{ .Values.routerPort }}
{{ end }}
{{- end }}
selector:
svc: router
@@ -31,9 +31,9 @@ spec:
ports:
- port: 80
targetPort: 8888
{{ if eq .Values.serviceType "NodePort" }}
{{- if eq .Values.serviceType "NodePort" }}
nodePort: {{ .Values.controllerPort }}
{{ end }}
{{- end }}
selector:
svc: controller