apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: scheduler
  labels:
    app: dragonfly
    component: scheduler
spec:
  serviceName: scheduler
  selector:
    matchLabels:
      app: dragonfly
      component: scheduler
  replicas: 3
  template:
    metadata:
      labels:
        app: dragonfly
        component: scheduler
    spec:
      containers:
      - name: scheduler
        image: dragonflyoss/scheduler
        imagePullPolicy: "Always"
        ports:
        - containerPort: 8002
        volumeMounts:
        - name: config
          mountPath: /etc/dragonfly
        - name: cdn-config
          mountPath: /opt/dragonfly/scheduler-cdn
      volumes:
      - name: config
        configMap:
          name: scheduler
      - name: cdn-config
        configMap:
          name: scheduler-static-cdn