apiVersion: apps/v1
kind: Deployment
metadata:
  name: pwa-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: pwa-service
  template:
    metadata:
      labels:
        component: pwa-service
    spec:
      restartPolicy: Always
      imagePullSecrets:
        - name: unimed-registry
      containers:
        - name: pwa-service
          image: 'unimed-registry-unimed.apps.ir-thr-at1.arvan.run/unimed-pwa:latest'
          imagePullPolicy: Always
          resources:
            limits:
              memory: 128M
              cpu: 200m
              ephemeral-storage: 200M
            requests:
              memory: 128M
              cpu: 200m
              ephemeral-storage: 200M
          env:
            - name: ENV
              valueFrom:
                configMapKeyRef:
                  name: environment-configs
                  key: ENV
            - name: PUBLIC_URL_DEV
              valueFrom:
                configMapKeyRef:
                  name: environment-configs
                  key: PUBLIC_URL_DEV
            - name: PUBLIC_URL_PRD
              valueFrom:
                configMapKeyRef:
                  name: environment-configs
                  key: PUBLIC_URL_PRD
            - name: TZ
              value: Asia/Tehran
