
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kafka-demo
    component: producer
  name: kafka-demo-producer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kafka-demo
      component: producer
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: kafka-demo
        component: producer
    spec:
      containers:
      - name: producer
        image: flokkr/kafka
        imagePullPolicy: IfNotPresent
        command:
        - bash
        - -c
        - /scripts/producer.sh
        volumeMounts:
        - mountPath: /scripts
          name: scripts
      volumes:
      - name: scripts
        configMap:
          defaultMode: 493
          name: scripts
