apiVersion: apps/v1
kind: Deployment
metadata:
  name: distributed-likes-worker-deployment
  labels:
        workertype: worker
        application: likes-distributed
spec:
  replicas: 2
  selector:
    matchLabels:
      application: likes-distributed
  template:
    metadata:
      labels:
        workertype: worker
        application: likes-distributed
    spec:
      containers:
        - name: master
          imagePullPolicy: IfNotPresent
          image: distributed-likes:latest
          ports:
          - containerPort: 8080
          env:
          - name: members
            valueFrom: 
              configMapKeyRef:
                name: distributed-masterconfig
                key: master_url
          - name: membership_port
            valueFrom: 
              configMapKeyRef:
                name: distributed-masterconfig
                key: membership_port

# args: ["--member", "worker service dns"]
