apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: socketcluster
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: socketcluster
    spec:
      containers:
      - name: socketcluster
        image: socketcluster/socketcluster:v8.0.2
        ports:
        - containerPort: 8000
        env:
        - name: SCC_STATE_SERVER_HOST
          value: scc-state
        - name: SOCKETCLUSTER_WORKERS
          value: "1"
        - name: SOCKETCLUSTER_BROKERS
          value: "1"
        - name: SCC_INSTANCE_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: ENV
          value: prod
        livenessProbe:
          httpGet:
            path: /health-check
            port: 8000
          initialDelaySeconds: 30
          timeoutSeconds: 5

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: socketcluster
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: socketcluster
    spec:
      containers:
      - name: socketcluster
        image: socketcluster/socketcluster:v8.0.2
        ports:
        - containerPort: 8000
        env:
        - name: SCC_STATE_SERVER_HOST
          value: scc-state
        - name: SOCKETCLUSTER_WORKERS
          value: "1"
        - name: SOCKETCLUSTER_BROKERS
          value: "1"
        - name: SCC_INSTANCE_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: ENV
          value: prod
        livenessProbe:
          httpGet:
            path: /health-check
            port: 8000
          initialDelaySeconds: 30
          timeoutSeconds: 5
  affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - socketcluster
            topologyKey: "kubernetes.io/hostname"

Add podAntiAffinity to socketcluster deployment to ensure not more than one Pod is scheduled for the same k8s node/minion
Add podAntiAffinity to socketcluster deployment to ensure not more than one Pod is scheduled for the same k8s node/minion
