apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  selector:
    matchLabels:
      app: api
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:

        - image: celebikutay/gotodo-api:latest
          name: api
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          env:
            - name: PORT
              value: '8080'
            - name: DB_HOST
              value: "db-service"
            - name: DB_USER
              value: "todo"
            - name: DB_PASS
              value: "todo"
            - name: GIN_MODE
              value: 'debug'

