apiVersion: apps/v1
kind: Deployment
metadata:
  name: user-rules
  labels:
    app: user-rules
spec:
  # replicas: 2
  selector:
    matchLabels:
      app: user-rules
  template:
    metadata:
      labels:
        app: user-rules
    spec:
      securityContext:
        runAsUser: 0
        runAsGroup: 0
      containers:
        - name: user-rules
          image: hysds-core:unity-v0.0.1
          command: ["supervisord", "--nodaemon"]
          volumeMounts:
            - name: celeryconfig
              mountPath: /home/ops/hysds/celeryconfig.py
              subPath: celeryconfig.py
            - name: supervisord-user-rules
              mountPath: /etc/supervisord.conf
              subPath: supervisord.conf
            - name: data-work
              mountPath: /private/tmp/data
      volumes:
        - name: celeryconfig
          configMap:
            name: celeryconfig
        - name: supervisord-user-rules
          configMap:
            name: supervisord-user-rules
        - name: data-work
          hostPath:
            path: /private/tmp/data
