Skip to content

Commit

Permalink
remove string templating of toplogySpreadConstraints and podAffinity …
Browse files Browse the repository at this point in the history
…rules. Remove soft constraint on zone

Signed-off-by: Edward Welch <[email protected]>
  • Loading branch information
slim-bean committed Mar 1, 2024
1 parent 40bb084 commit 6140657
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 144 deletions.
1 change: 1 addition & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Entries should include a reference to the pull request that introduced the chang
## 6.0.0

- [CHANGE] the lokiCanary section was moved from under monitoring to be under the root of the file.
- [CHANGE] the definitions for topologySpreadConstraints and podAffinity were converted from string templates to objects. Also removed the soft constraint on zone.

## 5.41.8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ spec:
{{- toYaml .Values.backend.resources | nindent 12 }}
{{- with .Values.backend.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.dnsConfig }}
dnsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
{{- end }}
{{- with .Values.compactor.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.compactor.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
{{- end }}
{{- with .Values.distributor.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.distributor.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
{{- end }}
{{- with .Values.gateway.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.gateway.dnsConfig }}
dnsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
{{- end }}
{{- with .Values.indexGateway.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexGateway.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- with .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
Expand Down Expand Up @@ -136,7 +136,7 @@ spec:
{{- end }}
{{- with .Values.ingester.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ingester.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{- with .Values.querier.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "loki.serviceAccountName" . }}
Expand Down Expand Up @@ -118,7 +118,7 @@ spec:
{{- end }}
{{- with .Values.querier.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.querier.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
{{- end }}
{{- with .Values.queryFrontend.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.queryFrontend.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
{{- end }}
{{- with .Values.queryScheduler.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.queryScheduler.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/read/deployment-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ spec:
{{- toYaml .Values.read.resources | nindent 12 }}
{{- with .Values.read.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.read.dnsConfig }}
dnsConfig:
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/templates/read/statefulset-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
{{- toYaml .Values.read.resources | nindent 12 }}
{{- with .Values.read.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.read.dnsConfig }}
dnsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
{{- end }}
{{- with .Values.ruler.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ruler.nodeSelector }}
nodeSelector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
{{- end }}
{{- with .Values.singleBinary.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.singleBinary.dnsConfig }}
dnsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ spec:
{{- end }}
{{- with .Values.tableManager.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tableManager.dnsConfig }}
dnsConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ spec:
{{- end }}
{{- with .Values.write.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.write.dnsConfig }}
dnsConfig:
Expand Down
Loading

0 comments on commit 6140657

Please sign in to comment.