Skip to content

Commit

Permalink
Template pod affinity settings from the correct value (#181)
Browse files Browse the repository at this point in the history
Pod affinity settings were errornously reading from the tolerations value rather than the affinity value for both the collector and cluster receiver deployments. As a result, setting the affinity value would result in an affinity key being templated but with the contents of the tolerations value.

This fix ensures the correct value is read, and also adds a leading dash to the template function to prevent an errornous newline from being added.
  • Loading branch information
KingJ authored Jul 30, 2021
1 parent 9fce4df commit af2d076
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
{{- end }}
{{- if .Values.otelCollector.affinity }}
affinity:
{{ toYaml .Values.otelCollector.tolerations | nindent 8 }}
{{- toYaml .Values.otelCollector.affinity | nindent 8 }}
{{- end }}
{{- if .Values.otelCollector.securityContext }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
{{- end }}
{{- if .Values.otelK8sClusterReceiver.affinity }}
affinity:
{{ toYaml .Values.otelK8sClusterReceiver.tolerations | nindent 8 }}
{{- toYaml .Values.otelK8sClusterReceiver.affinity | nindent 8 }}
{{- end }}
{{- if .Values.otelK8sClusterReceiver.securityContext }}
securityContext:
Expand Down

0 comments on commit af2d076

Please sign in to comment.