apiVersion: apps/v1
kind: Deployment
metadata:
  name: log-output-dep
  namespace: logping-namespace
spec:
  replicas: 1
  selector:
    matchLabels:
      app: log-output
  template:
    metadata:
      labels:
        app: log-output
    spec:      
      volumes:
        - name: shared-dir2
          emptyDir: {}
      containers:
        - name: log-reader
          image: rikusarlin/log-reader:version6
          readinessProbe:
            initialDelaySeconds: 10
            periodSeconds: 5
            httpGet:
               path: /readyz
               port: 3000
          livenessProbe:
            initialDelaySeconds: 20
            periodSeconds: 5
            httpGet:
               path: /readyz
               port: 3000
          volumeMounts:
          - name: shared-dir2
            mountPath: /tmp/timestamp
          env:
          - name: PINGPONG_URL
            value: "http://ping-pong-svc:2346/hits"
          - name: MESSAGE
            valueFrom:
              configMapKeyRef:
                name: log-output-configmap
                key: message
        - name: timestamp-writer
          image: rikusarlin/timestamp-writer:version3
          volumeMounts:
          - name: shared-dir2
            mountPath: /tmp/timestamp
