---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: eirini-metrics
  namespace: eirini-core
spec:
  selector:
    matchLabels:
      name: eirini-metrics
  template:
    metadata:
      labels:
        name: eirini-metrics
    spec:
      dnsPolicy: ClusterFirst
      serviceAccountName: eirini-metrics
      volumes:
        - name: config-map-volume
          configMap:
            name: eirini-metrics
        - name: loggregator-certs
          secret:
            secretName: loggregator-certs
            optional: true
      securityContext:
        runAsNonRoot: true
      containers:
      - name: metrics-collector
        image: eirini/metrics-collector@sha256:d6a93e8af1c74daff19417feb38883f4d77585eecc8204b673b11a6d7603f377
        imagePullPolicy: Always
        volumeMounts:
        - name: config-map-volume
          mountPath: /etc/eirini-metrics/config
        - name: loggregator-certs
          mountPath: /etc/loggregator/certs
        resources:
          requests:
            cpu: 15m
            memory: 15Mi
          limits:
            cpu: 100m
            memory: 100Mi
