apiVersion: apps/v1
kind: Deployment
metadata:
  name: metric-collector
  namespace: imxc
  labels:
    app: metric-collector
spec:
  selector:
    matchLabels:
      app: metric-collector
  replicas: 3
  template:
    metadata:
      labels:
        app: metric-collector
    spec:
      containers:
      - name: metric-collector
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/metric-collector:{{ .Values.global.METRIC_COLLECTOR_VERSION }}
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 14270
        env:
          - name: KAFKA_CONSUMER_BROKERS
            value: kafka-broker:9094
          - name: HTTP_PUSH
            value: http://base-cortex-nginx/api/v1/push
      securityContext:
        runAsUser: 1000
---
apiVersion: v1
kind: Service
metadata:
  name: metric-collector
  namespace: imxc
  labels:
    app: metric-collector
spec:
  ports:
    - name: metric
      port: 14270
      targetPort: 14270
  selector:
    app: metric-collector
