apiVersion: apps/v1
kind: Deployment
metadata:
  name: nexclipper-collector
  labels: 
    app: nexclipper-collector
    version: v1
  namespace: nexclipper
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nexclipper-collector
  template:
    metadata:
      name: nexclipper-collector
      labels:
        app: nexclipper-collector
    spec:
      containers:
        - name: nexclipper-collector
          image: nexclipper/nexcollector:0.1.0
          resources:
            limits:
              memory: 1Gi
            requests:
              memory: 512Mi
          imagePullPolicy: Always
          ports:
            - containerPort: 9000
              name: collector
          env:
            - name: KAFKA_ZOOKEEPER
              value: "zk-svc.default:2181"
            - name: KAFKA_PORT
              value: '9093'
            - name: KAFKA_HOST
              value: "kafka-svc.default"
            - name: MYSQL_DBNAME
              value: "defaultdb"
            - name: MYSQL_URL
              value: "mysql.nexclipper:3306"
            - name: MYSQL_PASSWORD
              value: "password"
            - name: MYSQL_USERNAME
              value: "admin"
            - name: REDIS_HOST
              value: redis.nexclipper
            - name: REDIS_PORT
              value: '6379'
            - name: INFLUXDB_ENDPOINT
              value: http://influx.nexclipper:8087
            - name: INFLUXDB_DATASOURCE
              value: nexclipper
            - name: TDB
              value: INFLUX
            - name: PUSHGATEWAY_ENDPOINT
              value: prometheus-h-pushgateway.prometheus:9091
            - name: BROKER
              value: rabbitmq
            - name: RABBITMQ_HOST
              value: rabbitmq.nexclipper
            - name: RABBITMQ_PORT 
              value: '5672'
            - name: RABBITMQ_USER
              value: guest
            - name: RABBITMQ_PASSWORD
              value: guest
