# This manifest installs Nuage Infra pod on
# each worker node in an Openshift cluster.
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
  name: nuage-infra-ds
  namespace: kube-system
  labels:
    k8s-app: nuage-infra-ds
spec:
  selector:
    matchLabels:
      k8s-app: nuage-infra-ds
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        k8s-app: nuage-infra-ds
    spec:
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
          operator: Exists
      containers:
        # This container spawns a Nuage Infra pod
        # on each worker node
        - name: install-nuage-infra
          image: nuage/infra:{{ nuage_infra_container_image_version }}
          command: ["/install-nuage-infra-pod.sh"]
          securityContext:
            privileged: true
          volumeMounts:
            - mountPath: /var/log
              name: log-dir
      volumes:
        - name: log-dir
          hostPath:
            path: /var/log
