apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: portworx-proxy
  namespace: kube-system
spec:
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 100%
  selector:
    matchLabels:
      name: portworx-proxy
  template:
    metadata:
      labels:
        name: portworx-proxy
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: px/enabled
                operator: NotIn
                values:
                - "false"
              - key: node-role.kubernetes.io/master
                operator: DoesNotExist
      hostNetwork: true
      hostPID: false
      containers:
        - name: portworx-proxy
          image: k8s.gcr.io/pause:3.1
          imagePullPolicy: Always
          readinessProbe:
            periodSeconds: 10
            httpGet:
              host: 127.0.0.1
              path: /health
              port: 10015
      restartPolicy: Always
      serviceAccountName: portworx-proxy
