Skip to content

Commit

Permalink
Add description for the function _add_podAffinity_for_vineyard_deploy…
Browse files Browse the repository at this point in the history
…ment.

Signed-off-by: Ye Cao <caoye.cao@alibaba-inc.com>
  • Loading branch information
dashanji committed Mar 20, 2023
1 parent 2fc09f2 commit d0673b6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions coordinator/gscoordinator/kubernetes_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,21 @@ def _waiting_for_services_ready(self):
)
logger.info("Mars service endpoint: %s", self._mars_service_endpoint)

# the function will add the podAffinity to the engine workload so that the workload
# will be scheduled to the same node with vineyard deployment.
# e.g. the vineyard deployment is named "vineyard-deployment" and the namespace is "graphscope-system",
# the podAffinity will be added to the engine workload as below:
# spec:
# affinity:
# podAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/instance
# operator: In
# values:
# - graphscope-system-vineyard-deployment # [vineyard deployment namespace]-[vineyard deployment name]
# topologyKey: kubernetes.io/hostname
def _add_podAffinity_for_vineyard_deployment(self, workload):
try:
import vineyard
Expand Down

0 comments on commit d0673b6

Please sign in to comment.