apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: adamdevigili/balancer.team-api:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          env:
            - name: PG_HOST
              value: skillbased-pg-postgresql
            - name: PG_PORT
              value: '5432'
            - name: PG_USER
              value: postgres
            - name: PG_DATABASE
              value: skillbased
            - name: PG_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: skillbased-pg-postgresql
                  key: postgresql-password