kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: elasticsearch
  namespace: default
spec:
  selector:
    matchLabels:
      jobmanager-node: pod
  template:
    metadata:
      name: elasticsearch
      labels:
        jobmanager-node: pod
        app: elasticsearch
    spec:
      nodeSelector:
        jobmanager: active
        archType: amd64
      containers:
        - name: elasticsearch
          image: harbor.sigsus.cn:8443/sz_gongdianju/cvat_elasticsearch
          imagePullPolicy: Always
          ports:
            - containerPort: 9200
              hostPort: 9211
              name: es-port
              protocol: TCP
          volumeMounts:
            - mountPath: /usr/share/elasticsearch/data
              name: elasticsearch
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 3
            periodSeconds: 30
            successThreshold: 1
            tcpSocket:
              port: 9200
            timeoutSeconds: 10
      volumes:
        - name: elasticsearch
          hostPath:
            path: /dlwsdata/storage/cvat/elasticsearch
      tolerations:
        - key: CriticalAddonsOnly
          operator: Exists
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
