apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubernetes-kafka-connect-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: kubernetes-kafka-connect-operator
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "8383"
        prometheus.io/path: "/metrics"
      labels:
        name: kubernetes-kafka-connect-operator
    spec:
      serviceAccountName: kubernetes-kafka-connect-operator
      containers:
        - name: kubernetes-kafka-connect-operator
          # Replace this with the built image name
          image: docker.io/kafkaconnect/k8s-operator:latest
          command:
          - Kubernetes-Kafka-Connect-Operator
          imagePullPolicy: Always
          ports:
          - containerPort: 8383
            name: http
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: EXPORT_LAG_CUSTOM_METRICS
              value: "false"
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "kubernetes-kafka-connect-operator"
