apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: micro
  name: greeter
spec:
  replicas: 1
  selector:
    matchLabels:
      name: greeter-srv
  template:
    metadata:
      labels:
        name: greeter-srv
    spec:
      containers:
      - name: greeter
        command: [
          "/greeter-srv",
          "--server_name=greeter",
          "--server_address=0.0.0.0:8080",
          "--broker_address=0.0.0.0:10001"
        ]
        image: microhq/greeter-srv:kubernetes
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          name: greeter-port
      - name: health
        command: [
          "/health",
          "--health_address=0.0.0.0:8081",
          "--server_name=greeter",
          "--server_address=0.0.0.0:8080"
        ]
        image: microhq/health:kubernetes
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /health
            port: 8081
          initialDelaySeconds: 3
          periodSeconds: 3
