apiVersion: apps/v1
kind: Deployment
metadata:
  name: gohorse-backend-hml
  namespace: gohorsejobshml
spec:
  replicas: 2
  selector:
    matchLabels:
      app: gohorse-backend
  template:
    metadata:
      labels:
        app: gohorse-backend
        env: homologation
    spec:
      imagePullSecrets:
        - name: harbor-registry
      containers:
        - name: backend
          image: in.gohorsejobs.com/gohorsejobshml/gohorsejobs-backend:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8521
          envFrom:
            - secretRef:
                name: backend-secrets
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "512Mi"
              cpu: "500m"
          livenessProbe:
            httpGet:
              path: /health
              port: 8521
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /health
              port: 8521
            initialDelaySeconds: 5
            periodSeconds: 10
