apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels: {component: nsx-ncp-bootstrap, tier: nsx-networking, version: v1}
  name: nsx-ncp-bootstrap
  namespace: nsx-system
spec:
  selector:
    matchLabels: {component: nsx-ncp-bootstrap, tier: nsx-networking, version: v1}
  template:
    metadata:
      labels: {component: nsx-ncp-bootstrap, tier: nsx-networking, version: v1}
    spec:
      containers:
      - command: [/bin/bash, -c, while true; do sleep 5; done]
        image: "{{.NcpImage}}"
        imagePullPolicy: IfNotPresent
        name: nsx-dummy
      hostNetwork: true
      hostPID: true
      initContainers:
      - command: [init_k8s_node]
        image: "{{.NcpImage}}"
        imagePullPolicy: IfNotPresent
        name: nsx-ncp-bootstrap
        securityContext:
          capabilities:
            add: [NET_ADMIN]
        volumeMounts:
        - {mountPath: /etc/nsx-ujo, name: projected-volume}
        - {mountPath: /host/etc, name: host-etc}
        - {mountPath: /host/opt, name: host-opt}
        - {mountPath: /host/var, name: host-var}
        - {mountPath: /host/etc/os-release, name: host-os-release}
        - {mountPath: /var/run/openvswitch, name: openvswitch}
        - {mountPath: /var/lib/rpm, name: rpm-lib}
        - {mountPath: /usr/lib/rpm, name: usr-lib-rpm}
        - {mountPath: /usr/sbin/modinfo, name: host-modinfo, readOnly: true}
        - {mountPath: /var/log/nsx-ujo, name: host-var-log-ujo}
      serviceAccountName: nsx-node-agent-svc-account
      tolerations:
      - {effect: NoSchedule, key: node-role.kubernetes.io/master}
      - {effect: NoSchedule, key: node.kubernetes.io/not-ready}
      - {effect: NoSchedule, key: node.kubernetes.io/unreachable}
      volumes:
      - name: projected-volume
        projected:
          sources:
          - configMap:
              items:
              - {key: ncp.ini, path: ncp.ini}
              name: nsx-node-agent-config
      - hostPath: {path: /etc}
        name: host-etc
      - hostPath: {path: /opt}
        name: host-opt
      - hostPath: {path: /var}
        name: host-var
      - hostPath: {path: /etc/os-release}
        name: host-os-release
      - hostPath: {path: /var/run/openvswitch}
        name: openvswitch
      - hostPath: {path: /var/lib/rpm}
        name: rpm-lib
      - hostPath: {path: /usr/lib/rpm}
        name: usr-lib-rpm
      - hostPath: {path: /usr/sbin/modinfo}
        name: host-modinfo
      - hostPath: {path: /var/log/nsx-ujo, type: DirectoryOrCreate}
        name: host-var-log-ujo
  updateStrategy: {type: RollingUpdate}
