apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: parking-money-deploy
spec:
  serviceName: parking-money
  replicas: 1
  selector:
    matchLabels:
      app: parking-money
  template:
    metadata:
      name: parking-money-pod
      labels:
        app: parking-money
    spec:
      volumes:
        - name: configmap-app
          configMap:
            name: parking-money-configmap-app
            items:
              - key: json
                path: 设置.json
      containers:
        - name: parking-money-app-container
          image: yindaheng98/parking-money-app
          ports:
            - containerPort: 3000
          volumeMounts:
            - name: configmap-app
              mountPath: /home/node/app/controllers/设置.json
              subPath: 设置.json
            - name: pictures
              mountPath: /home/node/app/public/images
        - name: parking-money-alipay-container
          image: yindaheng98/parking-money-alipay
          ports:
            - containerPort: 3001
          envFrom:
            - configMapRef:
                name: parking-money-configmap-alipay
        - name: parking-money-python-container
          image: yindaheng98/parking-money-python
          ports:
            - containerPort: 8080
          volumeMounts:
            - name: pictures
              mountPath: /usr/src/app/images
  volumeClaimTemplates:
    - metadata:
        name: pictures
      spec:
        accessModes:
          - ReadWriteMany
        storageClassName: ssd
        resources:
          requests:
            storage: 20Gi
        selector:
          matchLabels:
            alicloud-pvname: pv-parking-money-pic
