apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: online-shop
  name: online-shop
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: online-shop
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: online-shop
    spec:
      containers:
      - image: my-registry-my-project-name.apps.ir-thr-at1.arvan.run/online-shop:latest
        imagePullPolicy: Always
        name: online-shop
        ports:
        - containerPort: 80
          protocol: TCP
        resources:
          limits:
            cpu: "1"
            ephemeral-storage: 1G
            memory: 1G
          requests:
            cpu: "1"
            ephemeral-storage: 1G
            memory: 1G
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: registrysecret
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
