apiVersion: apps/v1
kind: Deployment
metadata:
  name: eventrouter
  namespace: kube-system
  labels:
    app: eventrouter
  annotations:
    origin: github.com/Yolean/kubernetes-kafka
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      # prefer duplicate events over missed
      maxUnavailable: 0
      maxSurge: 1
  selector:
    matchLabels:
      app: eventrouter
  template:
    metadata:
      labels:
        app: eventrouter
        tier: control-plane-addons
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "8080"
    spec:
      serviceAccount: eventrouter
      containers:
      - name: kube-eventrouter
        image: gcr.io/heptio-images/eventrouter@sha256:e613b48c6235426fa334867d661118322b4e1973c23e2e8cf5c066b982cc8596
        resources:
          requests:
            memory: "5Mi"
            cpu: "2m"
          limits:
            memory: "20Mi"
            cpu: "100m"
        volumeMounts:
        - name: config-volume
          mountPath: /etc/eventrouter
      volumes:
      - name: config-volume
        configMap:
          name: eventrouter-cm
