apiVersion: apps/v1
kind: Deployment
metadata:
  name: eventrouter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventrouter
  template:
    metadata:
      labels:
        app: eventrouter
    spec:
      serviceAccount: eventrouter
      
      containers:
        - name: eventrouter
          image: gcr.io/heptio-images/eventrouter:v0.3
          imagePullPolicy: IfNotPresent
          ports:
            - name: eventrouter
              containerPort: 8080
          resources:
            requests:
              cpu: 250m
              memory: 64Mi
            limits:
              cpu: 500m
              memory: 128Mi
          livenessProbe:
            httpGet:
              path: /metrics
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 10
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /metrics
              port: 8080
            initialDelaySeconds: 5
            periodSeconds: 10
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          volumeMounts:
            - name: config
              mountPath: /etc/eventrouter

      volumes:
        - name: config
          configMap:
            name: eventrouter
