Commit 8d71f647 authored by Radu Carpa's avatar Radu Carpa Committed by rcarpa
Browse files

servers: move "local" service antiafinnity setting to existing affinity section

otherwise it will not work correctly to set .values.affinity and "local"
external policy at the same time
parent 686c8e56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
name: rucio-server
version: 1.30.8
version: 1.30.9
apiVersion: v1
description: A Helm chart to deploy servers for Rucio
keywords:
+18 −19
Original line number Diff line number Diff line
@@ -32,24 +32,6 @@ spec:
      annotations:
        checksum/config: {{ $common_config | sha1sum }}
    spec:
    {{- if eq (coalesce .Values.service.externalTrafficPolicy "Cluster" | lower) "local" }}
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                topologyKey: "kubernetes.io/hostname"
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - {{ template "rucio.name" . }}
                    - key: release
                      operator: In
                      values:
                        - {{ .Release.Name }}
    {{- end }}
    {{- if .Values.serviceAccountName }}
      serviceAccountName: {{ .Values.serviceAccountName }}
    {{- end }}
@@ -238,8 +220,25 @@ spec:
      nodeSelector:
{{ toYaml . | indent 8 }}
    {{- end }}
    {{- with .Values.affinity }}
      affinity:
    {{- if eq (coalesce .Values.service.externalTrafficPolicy "Cluster" | lower) "local" }}
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                topologyKey: "kubernetes.io/hostname"
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - {{ template "rucio.name" . }}
                    - key: release
                      operator: In
                      values:
                        - {{ .Release.Name }}
    {{- end }}
    {{- with .Values.affinity }}
{{ toYaml . | indent 8 }}
    {{- end }}
    {{- with .Values.tolerations }}