apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: hsl-realtime-demo-message-broker
spec:
  selector:
    matchLabels:
      app: hsl-realtime-demo-message-broker
  replicas: 1 # tells deployment to run 1 pods matching the template
  template: # create pods using pod definition in this template
    metadata:
      labels:
        app: hsl-realtime-demo-message-broker
    spec:
      containers:
      - name: message-broker
        image: eu.gcr.io/taneli-sandbox/hsl-realtime-demo-message-broker:v2
        imagePullPolicy: Always
        env:
          - name: GOOGLE_CLOUD_PROJECT
            valueFrom:
              configMapKeyRef:
                name: hsl-realtime-frontend-config
                key: projectId
          - name: GEOHASH_LEVEL
            value: "4"
