apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: producer
    app.kubernetes.io/name: datalake-query-ingester
  name: datalake-query-ingester
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: producer
      app.kubernetes.io/name: datalake-query-ingester
  template:
    metadata:
      labels:
        app.kubernetes.io/component: producer
        app.kubernetes.io/name: datalake-query-ingester
    spec:
      containers:
        - name: datalake-query-ingester
          image: "711570343235.dkr.ecr.us-west-2.amazonaws.com/datalake-query-ingester:latest"
          imagePullPolicy: Always
          env:
            - name: DATALAKEQUERYINGESTER_KAFKA_TOPIC
              valueFrom:
                configMapKeyRef:
                  name: datalake-query-ingester-configmap
                  key: DATALAKEQUERYINGESTER_KAFKA_TOPIC
            - name: KAFKA_BROKERS
              valueFrom:
                configMapKeyRef:
                  name: datalake-query-ingester-configmap
                  key: KAFKA_BROKERS
          ports:
            - name: http
              containerPort: 8080
          command: [ "/bin/sh" ]
          args: [ "-c", "python3.9 -m bloomberg.datalake.datalakequeryingester" ]
      restartPolicy: Always
