apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: micro-broker
  labels:
    micro: runtime
    name: micro-broker
  annotations:
    name: "go.micro.broker"
    version: "latest"
    source: "github.com/micro/micro"
    owner: "micro"
    group: "micro"
spec:
  replicas: 1
  selector:
    matchLabels:
      name: micro-broker
      micro: runtime
  template:
    metadata:
      labels:
        name: micro-broker
        micro: runtime
    spec:
      containers:
      - name: broker
        env:
        - name: MICRO_AUTH
          value: "jwt"
        - name: MICRO_AUTH_PUBLIC_KEY
          valueFrom:
            secretKeyRef:
              name: micro-secrets
              key: auth_public_key
        - name: MICRO_AUTH_PRIVATE_KEY
          valueFrom:
            secretKeyRef:
              name: micro-secrets
              key: auth_private_key
        - name: MICRO_LOG_LEVEL
          value: "debug"
        - name: MICRO_BROKER
          value: "nats"
        - name: MICRO_BROKER_ADDRESS
          value: "nats-cluster"
        - name: MICRO_REGISTRY
          value: "etcd"
        - name: MICRO_REGISTRY_ADDRESS
          value: "etcd-cluster"
        args:
        - broker
        image: micro/micro
        imagePullPolicy: Always
        ports:
        - containerPort: 8001
          name: broker-port
