From 8b44fb026bcdaa788898038431e393c72edd5056 Mon Sep 17 00:00:00 2001 From: liaozan Date: Wed, 18 May 2022 11:50:18 +0800 Subject: [PATCH] Update k8s-deploy-template.yaml --- k8s-deploy-template.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index 745d80c..ef7aead 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -6,6 +6,15 @@ metadata: labels: app: ${APP_NAME} spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: alibabacloud.com/nodepool-id + operator: In + values: + - ${NODE_ID} replicas: ${REPLICAS} selector: matchLabels: @@ -22,7 +31,7 @@ spec: imagePullPolicy: Always resources: limits: - memory: ${memoryLimit} + memory: ${MEMORY_LIMIT} ports: - containerPort: ${PORT} protocol: TCP -- GitLab