kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: data-platform-backend-amd64
  namespace: default
spec:
  selector:
    matchLabels:
      app: dotnet-server-amd64
  template:
    metadata:
      name: dotnet-server-amd64
      labels:
        app: dotnet-server-amd64
        dotnet-server: active
    spec:
      hostNetwork: true
      nodeSelector:
        restfulapi: active
        archType: amd64
      containers:
      - name: data-platform-backend-amd64
        image: harbor.apulis.cn:8443/aiarts_v1.5.0_rc8/apulistech/dlworkspace_data-platform-backend:latest

        imagePullPolicy: Always
        command: ["dotnet", "WebUI.dll",'--urls=http://*:3088']
        env:
        - name: ASPNETCORE_ENVIRONMENT
          value: Development
        ports:
        - containerPort: 3088
          name: main
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 3
          periodSeconds: 30
          successThreshold: 1
          tcpSocket:
            port: 3088
          timeoutSeconds: 10

        volumeMounts:
        - mountPath: /var/log/webui
          name: dotnet-log
        - mountPath: /app/appsettings.json
          name: dotnet-config
          subPath: appsettings.json

        - mountPath: /mntdlws/nfs/label
          name: aiplatform-label-data-pvc

        - mountPath: /data
          name: aiplatform-model-data-pvc

        - mountPath: /home
          name: aiplatform-app-data-pvc
          subPath: work/

      volumes:
      - name: dotnet-log
        hostPath:
          path: /var/log/webui
      - name: dotnet-config
        configMap:
          name: restful-cm
      - name: aiplatform-label-data-pvc
        persistentVolumeClaim:
          claimName: aiplatform-label-data-pvc
      - name: aiplatform-model-data-pvc
        persistentVolumeClaim:
          claimName: aiplatform-model-data-pvc
      - name: aiplatform-app-data-pvc
        persistentVolumeClaim:
          claimName: aiplatform-app-data-pvc
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
