apiVersion: apps/v1
kind: Deployment
metadata:
  name: kafka-stream
  namespace: test-development
  labels:
    app: kafka-stream
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kafka-stream
  template:
    metadata:
      labels:
        app: kafka-stream
    spec:
      containers:
      - name: kafka-stream
        image: registry.digitalocean.com/appneuron-digitalocean/kafka-stream
        env:
        - name: LOGSTASH_HOST
          valueFrom:
            configMapKeyRef:
              name: app-conn
              key: LOGSTASH_HOST
        - name: CONSUMER_KEY
          valueFrom:
            secretKeyRef:
              name: app-secret
              key: CONSUMER_KEY 
        - name: CONSUMER_SECRET
          valueFrom:
            secretKeyRef:
              name: app-secret
              key: CONSUMER_SECRET
        - name: ACCESS_TOKEN_KEY
          valueFrom:
            secretKeyRef:
              name: app-secret
              key: ACCESS_TOKEN_KEY
        - name: ACCESS_TOKEN_KEY_SECRET
          valueFrom:
            secretKeyRef:
              name: app-secret
              key: ACCESS_TOKEN_KEY_SECRET
        - name: KAFKA_HOST
          valueFrom:
            configMapKeyRef:
              name: app-conn
              key: KAFKA_HOST
        - name: MONGODB_HOST
          valueFrom:
            configMapKeyRef:
              name: app-conn
              key: MONGODB_HOST
        - name: MONGODB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mongo-mongodb
              key: mongodb-root-password
        ports:
        - containerPort: 80