apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  labels:
    app: pub-0
  name: pub-0
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: pub-0
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: pub-0
    spec:
      containers:
      - image: xxxxxxxxxxxxxxxxxxxxxxx/workshop/publisher
        imagePullPolicy: Always
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /status
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 3
          periodSeconds: 3
          successThreshold: 1
          timeoutSeconds: 1
        name: pub-0
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        ports:
          - name: pub-0-http
            containerPort: 8080
        env:
        - name: "AUTH"
          value: "workshop-auth"
        - name: "BROKER_URL"
          value: "tcp://broker:3000"
        - name: "PORT"
          value: "8080"
        - name: "PUBLISH_TOPIC"
          value: "mqtt-k8s-workshop"
        - name: "PUBLISHER_ID"
          value: "pub-0"
        - name: "PUBLISH_INTERVAL"
          value: "3"
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30

