diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index c0a98add19a48f90f3944b2359a8000ead568c7d..a758cfabc68fbef8ef9f099d292aee1ec13dc1d7 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -15,11 +15,25 @@ 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} image: ${IMAGE} imagePullPolicy: Always + resources: + requests: + memory: ${MEMORY_LIMIT} + limits: + memory: ${MEMORY_LIMIT} ports: - containerPort: ${PORT} protocol: TCP @@ -34,12 +48,12 @@ spec: scheme: HTTP path: /actuator/health/liveness port: 1024 - initialDelaySeconds: 30 + initialDelaySeconds: 50 periodSeconds: 10 readinessProbe: httpGet: scheme: HTTP path: /actuator/health/readiness port: 1024 - initialDelaySeconds: 30 + initialDelaySeconds: 50 periodSeconds: 10 \ No newline at end of file