---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  annotations:
    deprecated.daemonset.template.generation: "1"
    kubernetes.io/description: |
      This daemon set launches the Multus networking component on each node.
    release.openshift.io/version: 4.6.52
  creationTimestamp: "2022-03-08T10:38:07Z"
  generation: 1
  managedFields:
  - apiVersion: apps/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:deprecated.daemonset.template.generation: {}
          f:kubernetes.io/description: {}
          f:release.openshift.io/version: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"b48e3238-e625-4cc0-acf5-5166b34864a9"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        f:revisionHistoryLimit: {}
        f:selector:
          f:matchLabels:
            .: {}
            f:app: {}
        f:template:
          f:metadata:
            f:labels:
              .: {}
              f:app: {}
              f:component: {}
              f:openshift.io/component: {}
              f:type: {}
          f:spec:
            f:containers:
              k:{"name":"kube-multus"}:
                .: {}
                f:args: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"KUBERNETES_SERVICE_HOST"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"KUBERNETES_SERVICE_PORT"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources:
                  .: {}
                  f:requests:
                    .: {}
                    f:cpu: {}
                    f:memory: {}
                f:securityContext:
                  .: {}
                  f:privileged: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/host/etc/cni/net.d"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/var/run/multus/cni/net.d"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
            f:dnsPolicy: {}
            f:hostNetwork: {}
            f:initContainers:
              .: {}
              k:{"name":"cni-plugins"}:
                .: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"DEFAULT_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL7_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL8_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/entrypoint"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/etc/os-release"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:readOnly: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
              k:{"name":"multus-binary-copy"}:
                .: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"DEFAULT_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL7_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL8_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/entrypoint"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/etc/os-release"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:readOnly: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
              k:{"name":"routeoverride-cni"}:
                .: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"DEFAULT_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL7_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL8_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/entrypoint"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/etc/os-release"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:readOnly: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
              k:{"name":"whereabouts-cni"}:
                .: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"CNI_BIN_DIR"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"CNI_CONF_DIR"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"KUBERNETES_SERVICE_HOST"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"KUBERNETES_SERVICE_PORT"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"SLEEP"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"WHEREABOUTS_NAMESPACE"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/host/etc/cni/net.d"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
              k:{"name":"whereabouts-cni-bincopy"}:
                .: {}
                f:command: {}
                f:env:
                  .: {}
                  k:{"name":"DEFAULT_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL7_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                  k:{"name":"RHEL8_SOURCE_DIRECTORY"}:
                    .: {}
                    f:name: {}
                    f:value: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:resources: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{"mountPath":"/entrypoint"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                  k:{"mountPath":"/host/etc/os-release"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:readOnly: {}
                  k:{"mountPath":"/host/opt/cni/bin"}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
            f:nodeSelector:
              .: {}
              f:kubernetes.io/os: {}
            f:priorityClassName: {}
            f:restartPolicy: {}
            f:schedulerName: {}
            f:securityContext: {}
            f:serviceAccount: {}
            f:serviceAccountName: {}
            f:terminationGracePeriodSeconds: {}
            f:tolerations: {}
            f:volumes:
              .: {}
              k:{"name":"cni-binary-copy"}:
                .: {}
                f:configMap:
                  .: {}
                  f:defaultMode: {}
                  f:name: {}
                f:name: {}
              k:{"name":"cnibin"}:
                .: {}
                f:hostPath:
                  .: {}
                  f:path: {}
                  f:type: {}
                f:name: {}
              k:{"name":"multus-cni-dir"}:
                .: {}
                f:hostPath:
                  .: {}
                  f:path: {}
                  f:type: {}
                f:name: {}
              k:{"name":"os-release"}:
                .: {}
                f:hostPath:
                  .: {}
                  f:path: {}
                  f:type: {}
                f:name: {}
              k:{"name":"system-cni-dir"}:
                .: {}
                f:hostPath:
                  .: {}
                  f:path: {}
                  f:type: {}
                f:name: {}
        f:updateStrategy:
          f:rollingUpdate:
            .: {}
            f:maxUnavailable: {}
          f:type: {}
      f:status:
        f:currentNumberScheduled: {}
        f:desiredNumberScheduled: {}
        f:numberReady: {}
    manager: cluster-network-operator
    operation: Update
    time: "2022-03-08T10:50:14Z"
  name: multus
  namespace: openshift-multus
  ownerReferences:
  - apiVersion: operator.openshift.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: Network
    name: cluster
    uid: b48e3238-e625-4cc0-acf5-5166b34864a9
  resourceVersion: "22519"
  selfLink: /apis/apps/v1/namespaces/openshift-multus/daemonsets/multus
  uid: bac1b37f-86b7-4ed7-ac9a-98c13c79c40d
spec:
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: multus
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: multus
        component: network
        openshift.io/component: network
        type: infra
    spec:
      containers:
      - args:
        - --multus-conf-file=auto
        - --multus-autoconfig-dir=/host/var/run/multus/cni/net.d
        - --multus-kubeconfig-file-host=/etc/kubernetes/cni/net.d/multus.d/multus.kubeconfig
        - --readiness-indicator-file=/var/run/multus/cni/net.d/80-openshift-network.conf
        - --cleanup-config-on-exit=true
        - --namespace-isolation=true
        - --multus-log-level=verbose
        - --cni-version=0.3.1
        - --additional-bin-dir=/opt/multus/bin
        - --skip-multus-binary-copy=true
        command:
        - /entrypoint.sh
        env:
        - name: KUBERNETES_SERVICE_PORT
          value: "6443"
        - name: KUBERNETES_SERVICE_HOST
          value: api-int.case03116926.lab.upshift.rdu2.redhat.com
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f54f352668f99e4776c12a0b9477bf1910af43bc27f7d17cdf6d9dd494b408fe
        imagePullPolicy: IfNotPresent
        name: kube-multus
        resources:
          requests:
            cpu: 10m
            memory: 150Mi
        securityContext:
          privileged: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /host/etc/cni/net.d
          name: system-cni-dir
        - mountPath: /host/var/run/multus/cni/net.d
          name: multus-cni-dir
        - mountPath: /host/opt/cni/bin
          name: cnibin
      dnsPolicy: ClusterFirst
      hostNetwork: true
      initContainers:
      - command:
        - /entrypoint/cnibincopy.sh
        env:
        - name: RHEL7_SOURCE_DIRECTORY
          value: /usr/src/multus-cni/rhel7/bin/
        - name: RHEL8_SOURCE_DIRECTORY
          value: /usr/src/multus-cni/rhel8/bin/
        - name: DEFAULT_SOURCE_DIRECTORY
          value: /usr/src/multus-cni/bin/
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f54f352668f99e4776c12a0b9477bf1910af43bc27f7d17cdf6d9dd494b408fe
        imagePullPolicy: IfNotPresent
        name: multus-binary-copy
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /entrypoint
          name: cni-binary-copy
        - mountPath: /host/opt/cni/bin
          name: cnibin
        - mountPath: /host/etc/os-release
          name: os-release
          readOnly: true
      - command:
        - /entrypoint/cnibincopy.sh
        env:
        - name: RHEL7_SOURCE_DIRECTORY
          value: /usr/src/plugins/rhel7/bin/
        - name: RHEL8_SOURCE_DIRECTORY
          value: /usr/src/plugins/rhel8/bin/
        - name: DEFAULT_SOURCE_DIRECTORY
          value: /usr/src/plugins/bin/
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9290248773de78bc750709a850ef66bd0d32a64ab1ed5228d344557e8bade398
        imagePullPolicy: IfNotPresent
        name: cni-plugins
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /entrypoint
          name: cni-binary-copy
        - mountPath: /host/opt/cni/bin
          name: cnibin
        - mountPath: /host/etc/os-release
          name: os-release
          readOnly: true
      - command:
        - /entrypoint/cnibincopy.sh
        env:
        - name: RHEL7_SOURCE_DIRECTORY
          value: /usr/src/route-override/rhel7/bin/
        - name: RHEL8_SOURCE_DIRECTORY
          value: /usr/src/whereabouts/rhel8/bin/
        - name: DEFAULT_SOURCE_DIRECTORY
          value: /usr/src/route-override/bin/
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3816ed95856807e1d3d7d6194adcb7a1df78972d512253d5b9b621fd395c0fe9
        imagePullPolicy: IfNotPresent
        name: routeoverride-cni
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /entrypoint
          name: cni-binary-copy
        - mountPath: /host/opt/cni/bin
          name: cnibin
        - mountPath: /host/etc/os-release
          name: os-release
          readOnly: true
      - command:
        - /entrypoint/cnibincopy.sh
        env:
        - name: RHEL7_SOURCE_DIRECTORY
          value: /usr/src/whereabouts/rhel7/bin/
        - name: RHEL8_SOURCE_DIRECTORY
          value: /usr/src/whereabouts/rhel8/bin/
        - name: DEFAULT_SOURCE_DIRECTORY
          value: /usr/src/whereabouts/bin/
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:42aff16d4f81f800424c77d3200b5952f0ff3c58ca1ea01dbceb37ef25df0754
        imagePullPolicy: IfNotPresent
        name: whereabouts-cni-bincopy
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /entrypoint
          name: cni-binary-copy
        - mountPath: /host/opt/cni/bin
          name: cnibin
        - mountPath: /host/etc/os-release
          name: os-release
          readOnly: true
      - command:
        - /bin/sh
        - -c
        - |
          #!/bin/sh

          set -u -e

          CNI_BIN_DIR=${CNI_BIN_DIR:-"/host/opt/cni/bin/"}
          WHEREABOUTS_KUBECONFIG_FILE_HOST=${WHEREABOUTS_KUBECONFIG_FILE_HOST:-"/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"}
          CNI_CONF_DIR=${CNI_CONF_DIR:-"/host/etc/cni/net.d"}

          # Make a whereabouts.d directory (for our kubeconfig)

          mkdir -p $CNI_CONF_DIR/whereabouts.d
          WHEREABOUTS_KUBECONFIG=$CNI_CONF_DIR/whereabouts.d/whereabouts.kubeconfig
          WHEREABOUTS_GLOBALCONFIG=$CNI_CONF_DIR/whereabouts.d/whereabouts.conf

          # ------------------------------- Generate a "kube-config"
          SERVICE_ACCOUNT_PATH=/var/run/secrets/kubernetes.io/serviceaccount
          KUBE_CA_FILE=${KUBE_CA_FILE:-$SERVICE_ACCOUNT_PATH/ca.crt}
          SERVICEACCOUNT_TOKEN=$(cat $SERVICE_ACCOUNT_PATH/token)
          SKIP_TLS_VERIFY=${SKIP_TLS_VERIFY:-false}


          # Check if we're running as a k8s pod.
          if [ -f "$SERVICE_ACCOUNT_PATH/token" ]; then
            # We're running as a k8d pod - expect some variables.
            if [ -z ${KUBERNETES_SERVICE_HOST} ]; then
              error "KUBERNETES_SERVICE_HOST not set"; exit 1;
            fi
            if [ -z ${KUBERNETES_SERVICE_PORT} ]; then
              error "KUBERNETES_SERVICE_PORT not set"; exit 1;
            fi

            if [ "$SKIP_TLS_VERIFY" == "true" ]; then
              TLS_CFG="insecure-skip-tls-verify: true"
            elif [ -f "$KUBE_CA_FILE" ]; then
              TLS_CFG="certificate-authority-data: $(cat $KUBE_CA_FILE | base64 | tr -d '\n')"
            fi

            # Write a kubeconfig file for the CNI plugin.  Do this
            # to skip TLS verification for now.  We should eventually support
            # writing more complete kubeconfig files. This is only used
            # if the provided CNI network config references it.
            touch $WHEREABOUTS_KUBECONFIG
            chmod ${KUBECONFIG_MODE:-600} $WHEREABOUTS_KUBECONFIG
            cat > $WHEREABOUTS_KUBECONFIG <<EOF
          # Kubeconfig file for Multus CNI plugin.
          apiVersion: v1
          kind: Config
          clusters:
          - name: local
            cluster:
              server: ${KUBERNETES_SERVICE_PROTOCOL:-https}://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}
              $TLS_CFG
          users:
          - name: whereabouts
            user:
              token: "${SERVICEACCOUNT_TOKEN}"
          contexts:
          - name: whereabouts-context
            context:
              cluster: local
              user: whereabouts
              namespace: ${WHEREABOUTS_NAMESPACE}
          current-context: whereabouts-context
          EOF

          # Kubeconfig file for Multus CNI plugin.
          cat > $WHEREABOUTS_GLOBALCONFIG <<EOF
          {
            "datastore": "kubernetes",
            "kubernetes": {
              "kubeconfig": "/etc/kubernetes/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
            },
            "log_level": "debug"
          }
          EOF

          else
            warn "Doesn't look like we're running in a kubernetes environment (no serviceaccount token)"
          fi

          # copy whereabouts to the cni bin dir
          # SKIPPED DUE TO FIPS COPY.
          # cp -f /whereabouts $CNI_BIN_DIR

          # ---------------------- end Generate a "kube-config".

          # Unless told otherwise, sleep forever.
          # This prevents Kubernetes from restarting the pod repeatedly.
          should_sleep=${SLEEP:-"true"}
          echo "Done configuring CNI.  Sleep=$should_sleep"
          while [ "$should_sleep" == "true"  ]; do
              sleep 1000000000000
          done
        env:
        - name: KUBERNETES_SERVICE_PORT
          value: "6443"
        - name: KUBERNETES_SERVICE_HOST
          value: api-int.case03116926.lab.upshift.rdu2.redhat.com
        - name: CNI_BIN_DIR
          value: /host/opt/cni/bin/
        - name: CNI_CONF_DIR
          value: /host/etc/cni/net.d
        - name: SLEEP
          value: "false"
        - name: WHEREABOUTS_NAMESPACE
          value: openshift-multus
        image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:42aff16d4f81f800424c77d3200b5952f0ff3c58ca1ea01dbceb37ef25df0754
        imagePullPolicy: IfNotPresent
        name: whereabouts-cni
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /host/opt/cni/bin
          name: cnibin
        - mountPath: /host/etc/cni/net.d
          name: system-cni-dir
      nodeSelector:
        kubernetes.io/os: linux
      priorityClassName: system-node-critical
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: multus
      serviceAccountName: multus
      terminationGracePeriodSeconds: 30
      tolerations:
      - operator: Exists
      volumes:
      - hostPath:
          path: /etc/kubernetes/cni/net.d
          type: ""
        name: system-cni-dir
      - hostPath:
          path: /var/run/multus/cni/net.d
          type: ""
        name: multus-cni-dir
      - hostPath:
          path: /var/lib/cni/bin
          type: ""
        name: cnibin
      - hostPath:
          path: /etc/os-release
          type: File
        name: os-release
      - configMap:
          defaultMode: 484
          name: cni-binary-copy-script
        name: cni-binary-copy
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 10%
    type: RollingUpdate
status:
  currentNumberScheduled: 6
  desiredNumberScheduled: 6
  numberAvailable: 6
  numberMisscheduled: 0
  numberReady: 6
  observedGeneration: 1
  updatedNumberScheduled: 6
