apiVersion: apps/v1
kind: Deployment
metadata:
  name: commerce-mock
  labels:
    app: commerce-mock
spec:
  selector:
    matchLabels:
      app: commerce-mock
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  replicas: 1
  template:
    metadata:
      labels:
        app: commerce-mock
    spec:
      containers:
      - image: ghcr.io/sap-samples/xf-application-mocks/commerce-mock:latest
        imagePullPolicy: Always
        name: mock
        ports:
        - name: http
          containerPort: 10000
        env:
        - name: DEBUG
          value: "true"
        - name: RENEWCERT_JOB_CRON
          value: "00 00 */12 * * *"
        volumeMounts:
        - mountPath: "/app/keys"
          name: mock-volume
        resources:
          requests:
            memory: "150Mi"
            cpu: "50m"
          limits:
            memory: "250Mi"
            cpu: "100m"
      volumes:
      - name: mock-volume
        persistentVolumeClaim:
          claimName: commerce-mock 