apiVersion: apps/v1
kind: Deployment
metadata:
  name: "create-influxdb-sink"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "create-influxdb-sink"
  template:
    metadata:
      labels:
        app: "create-influxdb-sink"
    spec:
      containers:
      - name: create-influxdb-sink
        image: lsstsqre/kafka-efd-demo:tickets-DM-17754
        imagePullPolicy: Always
        command: ["/bin/sh"]
        args: ["-c", "kafkaefd admin connectors create influxdb-sink --influxdb https://influxdb-efd-kafka.lsst.codes --database efd --daemon $(kafkaefd admin topics list --inline --filter lsst.sal.*)"]
        env:
          - name: BROKER
            value: "confluent-cp-kafka-headless.kafka:9092"
          - name: SCHEMAREGISTRY
            value: "http://confluent-cp-schema-registry.kafka:8081"
          - name: KAFKA_CONNECT
            value: "http://confluent-cp-kafka-connect:8083"
