apiVersion: apps/v1
kind: Deployment
metadata:
  name: fixmycar-frontend
  labels:
    app: fixmycar-frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fixmycar-frontend
  template:
    metadata:
      labels:
        app: fixmycar-frontend
    spec:
      containers:
        - name: fixmycar-frontend
          image: us-central1-docker.pkg.dev/PROJECT_ID/fixmycar/frontend:latest
          imagePullPolicy: Always
          env:
            - name: BACKEND_URL
              value: "http://fixmycar-backend.default.svc.cluster.local:8080"
          ports:
            - containerPort: 8501
          livenessProbe:
            httpGet:
              path: /_stcore/health
              port: 8501
              scheme: HTTP
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /_stcore/health
              port: 8501
              scheme: HTTP
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 1
              memory: 2Gi
            requests:
              cpu: 100m
              memory: 745Mi
