gyfora commented on code in PR #737:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/737#discussion_r1435146947


##########
helm/flink-kubernetes-operator/templates/flink-operator.yaml:
##########
@@ -55,6 +55,24 @@ spec:
       {{- if .Values.operatorPod.nodeSelector }}
       nodeSelector: {{ toYaml .Values.operatorPod.nodeSelector | nindent 8 }}
       {{- end }}
+      {{- if .Values.operatorPod.affinity }}
+      affinity:
+        podAntiAffinity: {{ if eq .Values.operatorPod.affinity.type 
"requiredDuringSchedulingIgnoredDuringExecution"}}
+          {{ .Values.operatorPod.affinity.type }}:
+          - labelSelector:
+              matchLabels:
+                {{- include "flink-operator.labels" . | nindent 16 }}
+            topologyKey: "kubernetes.io/hostname"
+          {{ else }}
+          {{ .Values.operatorPod.affinity.type }}:
+            - weight: 100
+              podAffinityTerm:
+                labelSelector:
+                  matchLabels:
+                    {{- include "flink-operator.labels" . | nindent 20 }}
+                topologyKey: "kubernetes.io/hostname"

Review Comment:
   Do we need to hardcode this affinity setup?
   I think it would be more robust if the user would simply specify the 
`affinity` object in the yaml and we use it as-is like for other more advanced 
features



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to