apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: backend-app
  name: backend-app
spec:
  selector:
    matchLabels:
      app: backend-app
  template:
    metadata:
      labels:
        app: backend-app
    spec:
      containers:
        - name: backend-app
          image: gcr.io/devops-lab-295723/app-backend
          ports:
            - name: http
              containerPort: 5000
          readinessProbe:
            httpGet:
              port: 5000
              path: /healthcheck
            initialDelaySeconds: 50
            failureThreshold: 10
            periodSeconds: 10
            successThreshold: 1 
            timeoutSeconds: 50
          livenessProbe:
            httpGet:
              port: 5000
              path: /healthcheck
            initialDelaySeconds: 50
            failureThreshold: 10
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 50