apiVersion: apps/v1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
metadata:
  name: insert-movies2persons
spec:
  replicas: 1
  selector:
    matchLabels:
      app: insert-movies2persons
  template:
    metadata:
      labels:
        app: insert-movies2persons
    spec:
      containers:
      - name: insert-movies2persons
        image: kinoreel/gather:latest
        imagePullPolicy: Always
        env:
          - name: PROCESS
            value: "insert_movies2persons"
          - name: KAFKA_BROKER
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: kafka_broker
          - name: DB_SERVER
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: gather_db_server
          - name: DB_PORT
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: gather_db_port
          - name: DB_DATABASE
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: gather_db_database
          - name: DB_USER
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: gather_db_user
          - name: DB_PASSWORD
            valueFrom:
              secretKeyRef:
                name: kino-secrets
                key: gather_db_password