apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: camel-kafka-influxdb
  name: camel-kafka-influxdb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: camel-kafka-influxdb
  template:
    metadata:
      labels:
        app: camel-kafka-influxdb
    spec:
      containers:
      - name: camel-kafka-influxdb
        image: quay.io/amqstreamsrhte2019/rhte-camel-kafka-influxdb:latest
        imagePullPolicy: IfNotPresent
        env:
        - name: BOOTSTRAP_SERVERS
          value: my-cluster-kafka-bootstrap:9092
        - name: TOPIC_DEVICE_DATA
          value: device-telemetry-enriched
        - name: DATABASE_URL
          value: http://influxdb:8086
        - name: DATABASE
          value: sensor
        - name: MEASUREMENT
          value: device-data
        - name: CONSUMER_GROUP
          value: camel-kafka-influxdb
        - name: USERNAME
          value: camel-kafka-influxdb
        - name: PASSWORD
          valueFrom:
            secretKeyRef:
              name: camel-kafka-influxdb
              key: password
        resources:
          requests:
            memory: "512Mi"
            cpu: "100m"
          limits:
            memory: "512Mi"
            cpu: "100m"