apiVersion: apps/v1
kind: Deployment
metadata:
  name: sample-matcher
  labels:
    app: sample-matcher
spec:
  replicas: 1
  selector:
      matchLabels:
        app: sample-matcher
  template:
    metadata:
      labels:
        app: sample-matcher
    spec:
      containers:
      - name: sample-matcher
        image: gcr.io/{{your_google_project_name}}/sample-matcher
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          name: 'metrics'
          protocol: TCP
        env:
        - name: SPATIAL_REFRESH_TOKEN
          valueFrom:
            secretKeyRef:
              name: spatialos-refresh-token
              key: service-account.txt
        - name: SPATIAL_PROJECT
          valueFrom:
            configMapKeyRef:
              name: online-services-config
              key: spatialos.project
        - name: GATEWAY_SERVICE_TARGET
          value: "gateway-internal.default.svc.cluster.local:80"
