diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index 0f048972c260ac23a3ea84cc242c76e7abceed8a..f32391fd7c8341bbdc48d207a37827ccf0a3b611 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -6,15 +6,6 @@ metadata: labels: app: ${APP_NAME} spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: alibabacloud.com/nodepool-id - operator: In - values: - - ${NODE_POOL_ID} replicas: ${REPLICAS} selector: matchLabels: @@ -24,6 +15,15 @@ spec: labels: app: ${APP_NAME} spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: alibabacloud.com/nodepool-id + operator: In + values: + - ${NODE_POOL_ID} terminationGracePeriodSeconds: 30 containers: - name: ${APP_NAME}