apiVersion: apps/v1
kind: Deployment
metadata:
  name: mureng-batch-deployment
spec:
  replicas: 1
  minReadySeconds: 30
  selector:
    matchLabels:
      app: mureng-batch
  template:
    metadata:
      labels:
        app: mureng-batch
    spec:
      containers:
        - name: mureng-batch
          image: gcr.io/PROJECT_ID/IMAGE:TAG
          resources:
            requests:
              memory: "350Mi"
              cpu: "350m"
            limits:
              memory: "350Mi"
              cpu: "350m"
          volumeMounts:
            - name: content-server-volume
              mountPath: /home/gradle/mount
          ports:
            - containerPort: 8080
          env:
            - name: SPRING_PROFILES_ACTIVE
              value: "prod"
            - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME
              value: "$PROD_DB_DRIVER"
            - name: SPRING_DATASOURCE_URL
              value: "$PROD_DB_URL"
            - name: SPRING_DATASOURCE_USERNAME
              value: "$PROD_DB_USERNAME"
            - name: SPRING_DATASOURCE_PASSWORD
              value: "$PROD_DB_PASSWORD"
            - name: FIREBASE_SERVICE_KEY
              value: "$FIREBASE_SERVICE_KEY"
            - name: SPRING_JWT_SECRET
              value: "$SPRING_JWT_SECRET"
      volumes:
        - name: content-server-volume
          persistentVolumeClaim:
            claimName: nfs

