apiVersion: apps/v1
kind: Deployment
metadata:
  name: camel-kafka-influxdb
  labels:
    app: iot-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: camel-kafka-influxdb
  template:
    metadata:
      labels:
        app: camel-kafka-influxdb
    spec:
      containers:
      - name: camel-kafka-influxdb
        image: docker.io/ppatierno/camel-kafka-influxdb:latest
        env:
        - name: BOOTSTRAP_SERVERS
          value: my-cluster-kafka-bootstrap:9092
        - name: TOPIC_DEVICE_DATA
          value: iot-device-data
        - name: DATABASE_URL
          value: http://influxdb:8086
        - name: DATABASE
          value: sensor
        - name: MEASUREMENT
          value: device-data
        - name: CONSUMER_GROUP
          value: camel-group
        - name: USERNAME
          value: camel-kafka-influxdb
        - name: PASSWORD
          valueFrom:
            secretKeyRef:
              name: camel-kafka-influxdb
              key: password