Skip to content

Commit

Permalink
Fix indent of nodeSelector and tolerations
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Eckert committed Oct 3, 2022
1 parent 928772d commit 4f9b49c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions charts/consul/templates/server-acl-init-cleanup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ spec:
limits:
memory: "50Mi"
cpu: "50m"
{{- if .Values.global.acls.job.tolerations }}
tolerations:
{{ tpl .Values.global.acls.job.tolerations . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.nodeSelector }}
nodeSelector:
{{ tpl .Values.global.acls.job.nodeSelector . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.tolerations }}
tolerations:
{{ tpl .Values.global.acls.job.tolerations . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.nodeSelector }}
nodeSelector:
{{ tpl .Values.global.acls.job.nodeSelector . | indent 12 | trim }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
16 changes: 8 additions & 8 deletions charts/consul/templates/server-acl-init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ spec:
limits:
memory: "50Mi"
cpu: "50m"
{{- if .Values.global.acls.job.tolerations }}
tolerations:
{{ tpl .Values.global.acls.job.tolerations . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.nodeSelector }}
nodeSelector:
{{ tpl .Values.global.acls.job.nodeSelector . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.tolerations }}
tolerations:
{{ tpl .Values.global.acls.job.tolerations . | indent 12 | trim }}
{{- end }}
{{- if .Values.global.acls.job.nodeSelector }}
nodeSelector:
{{ tpl .Values.global.acls.job.nodeSelector . | indent 12 | trim }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/consul/test/unit/server-acl-init-cleanup-job.bats
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ load _helpers
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].tolerations' | tee /dev/stderr)
yq -r '.spec.template.spec.tolerations' | tee /dev/stderr)
[ "${actual}" = "null" ]
}

Expand All @@ -91,7 +91,7 @@ load _helpers
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.job.tolerations=- key: value' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].tolerations[0].key' | tee /dev/stderr)
yq -r '.spec.template.spec.tolerations[0].key' | tee /dev/stderr)
[ "${actual}" = "value" ]
}

Expand All @@ -101,7 +101,7 @@ load _helpers
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].nodeSelector' | tee /dev/stderr)
yq -r '.spec.template.spec.nodeSelector' | tee /dev/stderr)
[ "${actual}" = "null" ]
}

Expand All @@ -112,6 +112,6 @@ load _helpers
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.job.nodeSelector=- key: value' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].nodeSelector[0].key' | tee /dev/stderr)
yq -r '.spec.template.spec.nodeSelector[0].key' | tee /dev/stderr)
[ "${actual}" = "value" ]
}
8 changes: 4 additions & 4 deletions charts/consul/test/unit/server-acl-init-job.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ load _helpers
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].tolerations' | tee /dev/stderr)
yq -r '.spec.template.spec.tolerations' | tee /dev/stderr)
[ "${actual}" = "null" ]
}

Expand All @@ -1580,7 +1580,7 @@ load _helpers
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.job.tolerations=- key: value' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].tolerations[0].key' | tee /dev/stderr)
yq -r '.spec.template.spec.tolerations[0].key' | tee /dev/stderr)
[ "${actual}" = "value" ]
}

Expand All @@ -1590,7 +1590,7 @@ load _helpers
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].nodeSelector' | tee /dev/stderr)
yq -r '.spec.template.spec.nodeSelector' | tee /dev/stderr)
[ "${actual}" = "null" ]
}

Expand All @@ -1601,7 +1601,7 @@ load _helpers
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.job.nodeSelector=- key: value' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].nodeSelector[0].key' | tee /dev/stderr)
yq -r '.spec.template.spec.nodeSelector[0].key' | tee /dev/stderr)
[ "${actual}" = "value" ]
}

Expand Down

0 comments on commit 4f9b49c

Please sign in to comment.