apiVersion: apps/v1
kind: Deployment
metadata:
  name: cmoa-kube-info-connector
  namespace: {{ .Values.global.IMXC_NAMESPACE }}
  labels:
    app: cmoa-kube-info-connector
spec:
  replicas: 5
  selector:
    matchLabels:
      app: cmoa-kube-info-connector
  template:
    metadata:
      labels:
        app: cmoa-kube-info-connector
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: cmoa
                operator: In
                values:
                - worker1
      containers:
        - name: cmoa-kube-info-connector
          image: {{ .Values.global.IMXC_IN_REGISTRY }}/kube-info-connector:{{ .Values.global.KUBE_INFO_CONNECTOR_VERSION }}
          imagePullPolicy: Always
          env:
            - name: KAFKA_GROUP_ID
              value: cmoa-kube-info-connector
            - name: KAFKA_SERVER
              value: kafka:9092
            - name: JDBC_KIND
              value: {{ .Values.global.JDBC_KIND }}
            - name: JDBC_SERVER
              value: {{ .Values.global.JDBC_SERVER }}
            - name: JDBC_DB
              value: {{ .Values.global.JDBC_DB }}
            - name: JDBC_USER
              value: {{ .Values.global.JDBC_USER }}
            - name: JDBC_PWD
              value: {{ .Values.global.JDBC_PWD }}
            - name: TABLE_PREFIX
              value: {{ .Values.global.TABLE_PREFIX }}
            - name: BLACK_LIST
              value: {{ .Values.global.BLACK_LIST }}
            - name: MAX_POLL_RECORDS_CONFIG
              value: "300"
            - name: MAX_POLL_INTERVAL_MS_CONFIG
              value: "600000"
            - name: SESSION_TIMEOUT_MS_CONFIG
              value: "60000"
            - name: MAX_PARTITION_FETCH_BYTES_CONFIG
              value: "5242880"
