---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-distributor
  namespace: keptn
  labels:
    app.kubernetes.io/name: distributor
    app.kubernetes.io/instance: keptn
    app.kubernetes.io/part-of: keptn-keptn
    app.kubernetes.io/component: control-plane
    app.kubernetes.io/version: develop
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: distributor
      app.kubernetes.io/instance: keptn
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/name: distributor
        app.kubernetes.io/instance: keptn
        app.kubernetes.io/part-of: keptn-keptn
        app.kubernetes.io/component: control-plane
        app.kubernetes.io/version: develop
    spec:
      serviceAccountName: keptn-default
      containers:
      - name: distributor
        image: keptn/distributor:latest
        livenessProbe:
          httpGet:
            path: /health
            port: 10999
          initialDelaySeconds: 5
          periodSeconds: 5
        ports:
        - containerPort: 8080
        resources:
          requests:
            memory: "256Mi"
            cpu: "500m"
          limits:
            memory: "256Mi"
            cpu: "500m"
        env:
        - name: PUBSUB_URL
          value: 'nats://keptn-nats-cluster'
        - name: PUBSUB_TOPIC
          value: 'sh.keptn.event.configuration.change,sh.keptn.events.deployment-finished'
        - name: PUBSUB_RECIPIENT
          value: 'helm-service'
