Skip to content

Commit 2cd744c

Browse files
authored
fixed broken tolerations field when using empty array (#153)
1 parent 26a4cbf commit 2cd744c

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

charts/ocean-kubernetes-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: ocean-kubernetes-controller
33
description: A Helm chart for Ocean Kubernetes Controller
44
type: application
5-
version: 0.1.53
5+
version: 0.1.54
66
appVersion: 2.0.65
77
kubeVersion: ">=1.20.0-0"
88
maintainers:

charts/ocean-kubernetes-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ocean-kubernetes-controller
22

3-
![Version: 0.1.53](https://img.shields.io/badge/Version-0.1.53-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.65](https://img.shields.io/badge/AppVersion-2.0.65-informational?style=flat-square)
3+
![Version: 0.1.54](https://img.shields.io/badge/Version-0.1.54-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.65](https://img.shields.io/badge/AppVersion-2.0.65-informational?style=flat-square)
44

55
A Helm chart for Ocean Kubernetes Controller.
66

charts/ocean-kubernetes-controller/templates/_helpers.tpl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ Controller affinity
199199
{{- end }}
200200
{{- end }}
201201

202-
{{/*
203-
Controller tolerations
204-
*/}}
205-
{{- define "ocean-kubernetes-controller.tolerations" -}}
206-
{{- if kindIs "invalid" .Values.tolerations -}}
207-
{{- include "ocean-kubernetes-controller.defaultTolerations" . }}
208-
{{- else }}
209-
{{- .Values.tolerations | toYaml -}}
210-
{{- end }}
211-
{{- end }}
212-
213202
{{/*
214203
Controller topology spread constraints
215204
*/}}
@@ -352,4 +341,4 @@ or if another log shipping destination host is specified.
352341
true
353342
{{- end }}
354343
{{- end }}
355-
{{- end }}
344+
{{- end }}

charts/ocean-kubernetes-controller/templates/deployment.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,14 @@ spec:
241241
{{- end }}
242242
affinity:
243243
{{- include "ocean-kubernetes-controller.affinity" . | nindent 8 }}
244+
{{- if kindIs "invalid" .Values.tolerations }}
244245
tolerations:
245-
{{- include "ocean-kubernetes-controller.tolerations" . | nindent 6 }}
246+
{{- include "ocean-kubernetes-controller.defaultTolerations" . | nindent 6 }}
247+
{{- else }}
248+
{{- with .Values.tolerations }}
249+
tolerations:
250+
{{- . | toYaml | nindent 6 }}
251+
{{- end }}
252+
{{- end }}
246253
topologySpreadConstraints:
247254
{{- include "ocean-kubernetes-controller.topologySpreadConstraints" . | nindent 6 }}

0 commit comments

Comments
 (0)