Skip to content

Commit

Permalink
Fix scheduling rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyo committed Dec 28, 2022
1 parent 6c1e095 commit 08bb113
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions charts/opentelemetry-demo/templates/_objects.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@ spec:
{{- with .serviceAccountName }}
serviceAccountName: {{ .serviceAccountName}}
{{- end }}
{{- if .schedulingRules }}
{{- if or .defaultValues.schedulingRules.nodeSelector .schedulingRules.nodeSelector}}
{{- $schedulingRules := .schedulingRules | default dict }}
{{- if or .defaultValues.schedulingRules.nodeSelector $schedulingRules.nodeSelector}}
nodeSelector:
{{- .schedulingRules.nodeSelector | default .defaultValues.schedulingRules.nodeSelector | toYaml | nindent 8 }}
{{- $schedulingRules.nodeSelector | default .defaultValues.schedulingRules.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if or .defaultValues.schedulingRules.affinity .schedulingRules.affinity}}
{{- if or .defaultValues.schedulingRules.affinity $schedulingRules.affinity}}
affinity:
{{- .schedulingRules.affinity | default .defaultValues.schedulingRules.affinity | toYaml | nindent 8 }}
{{- $schedulingRules.affinity | default .defaultValues.schedulingRules.affinity | toYaml | nindent 8 }}
{{- end }}
{{- if or .defaultValues.schedulingRules.tolerations .schedulingRules.tolerations}}
{{- if or .defaultValues.schedulingRules.tolerations $schedulingRules.tolerations}}
tolerations:
{{- .schedulingRules.tolerations | default .defaultValues.schedulingRules.tolerations | toYaml | nindent 8 }}
{{- end }}
{{- $schedulingRules.tolerations | default .defaultValues.schedulingRules.tolerations | toYaml | nindent 8 }}
{{- end }}
containers:
- name: {{ .name }}
Expand Down

0 comments on commit 08bb113

Please sign in to comment.