apiVersion: apps/v1
kind: Deployment

metadata:
  namespace: singouins-dev
  name: sep-backend-phpmyadmin
  labels:
    tier: sep-backend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: phpmyadmin
      tier: sep-backend
  template:
    metadata:
      labels:
        app: phpmyadmin
        tier: sep-backend
    spec:

      containers:
        - name: sep-backend-phpmyadmin
          image: phpmyadmin/phpmyadmin:5.1
          resources:
            limits:
              memory: 128Mi
              cpu: 100m
            requests:
              memory: 64Mi
              cpu: 10m
          env:
            - name: PMA_HOST
              valueFrom:
                secretKeyRef:
                  name: sep-backend-mariadb-secret
                  key: mariadb-host
            - name: PMA_PORT
              valueFrom:
                secretKeyRef:
                  name: sep-backend-mariadb-secret
                  key: mariadb-port
            # App variables
            - name: MEMORY_LIMIT
              value: '128M'
            - name: UPLOAD_LIMIT
              value: '50M'
