apiVersion: apps/v1
kind: Deployment
metadata:
  name: message-receiver
  labels:
    app: message-receiver
spec:
  replicas: 1
  selector:
    matchLabels:
      app: message-receiver
  template:
    metadata:
      labels:
        app: message-receiver
    spec:
      containers:
      - name: message-receiver
        image: innfocco/message-receiver:0.1
        ports:
        - containerPort: 8080
        volumeMounts:
          - name: application-config 
            mountPath: "/spring-conf" 
            readOnly: true
      volumes:
      - name: application-config
        configMap:
          name: spring-config 
          items:
          - key: application.properties 
            path: application.properties

