apiVersion: apps/v1
kind: Deployment
metadata:
  name: producer-deployment
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5
  selector:
    matchLabels:
      app: producer-deployment
  template:
    metadata:
      labels:
        app: producer-deployment
    spec:
      containers:
        - name: producer-deployment
          image: <IMAGE>
          ports:
            - containerPort: 3000
          resources:
            requests:
              cpu: 100m
            limits:
              cpu: 100m
          env:
            - name: NODE_PORT
              value: "3000"
            - name: AMQP_CONNECTION_STRING
              value: "amqp://admin:admin@rabbitmq:5672/"
            - name: MESSAGE_INTERVAL
              value: "60000"
      imagePullSecrets:
        - name: regcred