From 8b976c7f20f34b81c9c097c000523f29e37c7343 Mon Sep 17 00:00:00 2001 From: Jagger Wang Date: Mon, 5 Feb 2024 14:03:36 +0800 Subject: [PATCH] Update ci --- .ops/test/deployment.yml | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .ops/test/deployment.yml diff --git a/.ops/test/deployment.yml b/.ops/test/deployment.yml new file mode 100644 index 0000000..af42ffa --- /dev/null +++ b/.ops/test/deployment.yml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: $APP_NAME +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: xtreme1 + app.kubernetes.io/instance: xtreme1 + app.kubernetes.io/component: $APP_NAME + template: + metadata: + labels: + app.kubernetes.io/name: xtreme1 + app.kubernetes.io/instance: xtreme1 + app.kubernetes.io/component: $APP_NAME + spec: + nodeSelector: + dedicated: model + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: "app.kubernetes.io/name" + operator: In + values: + - xtreme1 + - key: "app.kubernetes.io/instance" + operator: In + values: + - xtreme1 + - key: "app.kubernetes.io/component" + operator: In + values: + - $APP_NAME + topologyKey: "kubernetes.io/hostname" + imagePullSecrets: + - name: basicai-registry + containers: + - name: $APP_NAME + image: $IMAGE + resources: + requests: + memory: 1Gi + cpu: 100m + limits: + aliyun.com/gpu-mem: 8 + aliyun.com/gpu-core.percentage: 50 + ports: + - name: http + containerPort: 5000 +--- +apiVersion: v1 +kind: Service +metadata: + name: $APP_NAME +spec: + selector: + app.kubernetes.io/name: xtreme1 + app.kubernetes.io/instance: xtreme1 + app.kubernetes.io/component: $APP_NAME + ports: + - name: http + port: 80 + targetPort: 5000