apiVersion: apps/v1
kind: Deployment
metadata:
  name: stock-service
spec:
  replicas: 3
  selector:
    matchLabels:
      app: stock-service
  template:
    metadata:
      labels:
        app: stock-service
    spec:
        containers:
        - name: stock-service
          image: gcr.io/go-micro-test/stock-service:latest
          imagePullPolicy: Always
          env:
          - name: GOOGLE_CLOUD_PROJECT
            value: "go-micro-test"
          - name: EVENT_PUBLISH_TOPIC
            value: "com.example.stock"
          - name: EVENT_SUBSCRIBE_TOPICS
            value: "com.example.purchase"
          - name: MICRO_REGISTRY
            value: "kubernetes"
          - name: MICRO_SERVER_ADDRESS
            value: "0.0.0.0:8080"
          ports:
          - containerPort: 8080
            name: service-port
