Skip to content

Commit

Permalink
Deployment template change to remove duplicate affinity key
Browse files Browse the repository at this point in the history
  • Loading branch information
alloydsa authored Aug 7, 2024
1 parent 4f24ac7 commit 608ee80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
28 changes: 5 additions & 23 deletions helm/trident-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,13 @@ spec:
azure.workload.identity/use: 'true'
{{- end }}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
- amd64
- key: kubernetes.io/os
operator: In
values:
- linux
{{- if .Values.nodeSelector }}
{{- range $key, $value := .Values.nodeSelector}}
- key: {{ $key }}
operator: In
values:
- {{ $value }}
{{- end }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
Expand Down
17 changes: 16 additions & 1 deletion helm/trident-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,23 @@ deploymentAnnotations: {}
tolerations: []

## Affinity for pod assignment
## The following affinity configuration ensures that the Trident operator will only be scheduled on nodes with the specified architecture and OS, Hence, do not modify this section. To add custom affinity rules, please append your content to this configuration as needed
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
- amd64
- key: kubernetes.io/os
operator: In
values:
- linux


# tridentControllerPluginNodeSelector additional nodeSelectors for the Pod running the Trident Controller CSI Plugin.
# tridentControllerPluginNodeSelector : {}
Expand Down

0 comments on commit 608ee80

Please sign in to comment.