apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: litmus-eventrouter
  name: litmus-eventrouter
  namespace: litmus
spec:
  replicas: 1
  selector:
    matchLabels:
      app: litmus-eventrouter
  template:
    metadata:
      labels:
        app: litmus-eventrouter
    spec:
      containers:
      - image: containership/eventrouter
        imagePullPolicy: IfNotPresent
        name: litmus-eventrouter
        volumeMounts:
        - mountPath: /etc/eventrouter
          name: config-volume
      serviceAccount: litmus
      serviceAccountName: litmus
      volumes:
      - configMap:
          defaultMode: 420
          name: litmus-eventrouter-http-cm
        name: config-volume
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: litmus-eventrouter
  name: litmus-eventrouter
  namespace: litmus
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: "/metrics"
    prometheus.io/port: "8080"
    prometheus.io/scheme: "http"
spec:
  ports:
  - nodePort: 31399
    name: web
    port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    app: litmus-eventrouter
  sessionAffinity: None
  type: NodePort

