apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: proxy
  namespace: tm
spec:
  selector:
    matchLabels:
      role: proxy
  template:
    metadata:
      labels:
        role: proxy
        type: minecraft
    spec:
      dnsPolicy: ClusterFirstWithHostNet
      hostNetwork: true
      nodeSelector:
        tm: 'true'
      containers:
        - name: proxy
          image: gcr.io/stratus-181519/proxy:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 25575
              hostPort: 25575
              name: minecraft
          env:
            - name: PROXY_HOST
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: PROXY_EXTERNAL_PORT
              value: '25575'
            - name: PROXY_INTERNAL_PORT
              value: '25576'
            - name: PROXY_INTERNAL_PORT_SECONDARY
              value: '25576'
          resources:
            requests:
              cpu: 10m
              memory: 10Mi
