Skip to content

Commit

Permalink
Fix #631: helm - remove new lines from resulting yaml when using cond…
Browse files Browse the repository at this point in the history
…itionals (#632)

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
  • Loading branch information
jkremser authored Sep 30, 2021
1 parent 857edde commit b366250
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions chart/k8gb/templates/external-dns/external-dns.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if or .Values.ns1.enabled .Values.route53.enabled }}
{{- if or .Values.ns1.enabled .Values.route53.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -54,4 +54,4 @@ spec:
cpu: "500m"
securityContext:
readOnlyRootFilesystem: true
{{ end }}
{{- end }}
4 changes: 2 additions & 2 deletions chart/k8gb/templates/external-dns/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kind: ServiceAccount
metadata:
name: k8gb-external-dns
namespace: {{ .Release.Namespace }}
{{ if and .Values.route53.enabled .Values.route53.irsaRole }}
{{- if and .Values.route53.enabled .Values.route53.irsaRole }}
annotations:
eks.amazonaws.com/role-arn: {{ .Values.route53.irsaRole }}
{{ end }}
{{- end }}
4 changes: 2 additions & 2 deletions chart/k8gb/templates/infoblox-cm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.infoblox.enabled }}
{{- if .Values.infoblox.enabled }}
apiVersion: v1
data:
INFOBLOX_GRID_HOST: {{ quote .Values.infoblox.gridHost }}
Expand All @@ -9,4 +9,4 @@ data:
kind: ConfigMap
metadata:
name: infoblox
{{ end }}
{{- end }}
20 changes: 10 additions & 10 deletions chart/k8gb/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ spec:
labels:
name: k8gb
spec:
{{ if .Values.k8gb.hostAlias.enabled }}
{{- if .Values.k8gb.hostAlias.enabled }}
hostAliases:
- ip: "{{ .Values.k8gb.hostAlias.ip }}"
hostnames:
{{- range.Values.k8gb.hostAlias.hostnames }}
- {{ . }}
{{- end }}
{{ end }}
{{- end }}
serviceAccountName: k8gb
containers:
- name: k8gb
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
value: {{ .Values.k8gb.dnsZone }}
- name: RECONCILE_REQUEUE_SECONDS
value: {{ quote .Values.k8gb.reconcileRequeueSeconds}}
{{ if .Values.infoblox.enabled }}
{{- if .Values.infoblox.enabled }}
- name: INFOBLOX_GRID_HOST
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -103,19 +103,19 @@ spec:
secretKeyRef:
name: infoblox
key: EXTERNAL_DNS_INFOBLOX_WAPI_PASSWORD
{{ end }}
{{ if .Values.route53.enabled }}
{{- end }}
{{- if .Values.route53.enabled }}
- name: ROUTE53_ENABLED
value: "true"
{{ end }}
{{ if .Values.ns1.enabled }}
{{- end }}
{{- if .Values.ns1.enabled }}
- name: NS1_ENABLED
value: "true"
{{ end }}
{{ if eq "LoadBalancer" ( quote .Values.coredns.serviceType ) }}
{{- end }}
{{- if eq "LoadBalancer" ( quote .Values.coredns.serviceType ) }}
- name: COREDNS_EXPOSED
value: "true"
{{ end }}
{{- end }}
- name: LOG_FORMAT
value: {{ quote .Values.k8gb.log.format }}
- name: LOG_LEVEL
Expand Down
4 changes: 2 additions & 2 deletions chart/k8gb/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ rules:
- namespaces
verbs:
- 'list'
{{ if .Values.openshift.enabled }}
{{- if .Values.openshift.enabled }}
- apiGroups:
- route.openshift.io
resources:
- routes/custom-host
verbs:
- create
- update
{{ end }}
{{- end }}

0 comments on commit b366250

Please sign in to comment.