apiVersion: apps/v1
kind: Deployment
metadata:
  name: hybrid-cloud-backend-api
spec:
  replicas: 1
  template:
    metadata:
      name: hybrid-cloud-backend-api
      labels:
        app: hybrid-cloud-backend-api
        version: v1.0
    spec:
      containers:
        - name: hybrid-cloud-backend-api
          image: ko://github.com/kameshsampath/hybrid-cloud-backend-api
          imagePullPolicy: Always
          env:
            - name: GIN_MODE
              value: "release"
            - name: FRUITS_DB_DIR
              value: "/fruits-app"
          livenessProbe:
            httpGet:
              port: 8080
              path: /v1/api/health/live
          readinessProbe:
            httpGet:
              port: 8080
              path: /v1/api/health/ready
          resources:
            limits:
              cpu: "100m"
              memory: "200Mi"
            requests:
              cpu: "50m"
              memory: "100Mi"
      restartPolicy: Always
      serviceAccountName: hybrid-cloud-backend-sa
  selector:
    matchLabels:
      app: hybrid-cloud-backend-api
      version: v1.0
