apiVersion: apps/v1
kind: Deployment
metadata:
  name: flyway-deployment
  labels:
    app: test-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-app
  template:
    metadata:
      labels:
        app: test-app
    spec:
      containers:
      - name: nginx
        image: flyway/flyway:latest
        args: ["migrate"]
        env:
          - name: PGUSER
            value: postgres
          - name: PGHOST
            value: postgres-deployment
          - name: PGPASSWORD
            value: test
        resources:
          limits: 
            memory: "64Mi"
            cpu: "250m"
