github.com/openebs/node-disk-manager@v1.9.1-0.20230225014141-4531f06ffa1e/deploy/yamls/ndm-node-exporter.yaml (about)

     1  # Create NDM node exporter daemonset.
     2  # This is an optional component used for getting disk level
     3  # metrics from each of the storage nodes
     4  apiVersion: apps/v1
     5  kind: DaemonSet
     6  metadata:
     7    name: ndm-node-exporter
     8    namespace: openebs
     9  spec:
    10    updateStrategy:
    11      type: RollingUpdate
    12    selector:
    13      matchLabels:
    14        name: ndm-node-exporter
    15    template:
    16      metadata:
    17        labels:
    18          name: ndm-node-exporter
    19      spec:
    20        serviceAccountName: openebs-maya-operator
    21        containers:
    22        - name: node-disk-exporter
    23          image: openebs/node-disk-exporter:ci
    24          command:
    25          - /usr/local/bin/exporter
    26          args:
    27          - "start"
    28          - "--mode=node"
    29          - "--port=$(METRICS_LISTEN_PORT)"
    30          - "--metrics=/metrics"
    31          ports:
    32          - containerPort: 9101
    33            protocol: TCP
    34            name: metrics
    35          imagePullPolicy: IfNotPresent
    36          securityContext:
    37            privileged: true
    38          env:
    39          - name: NAMESPACE
    40            valueFrom:
    41              fieldRef:
    42                fieldPath: metadata.namespace
    43          - name: METRICS_LISTEN_PORT
    44            value: :9101
    45  ---
    46  # Create NDM node exporter service
    47  # This is optional and required only when
    48  # ndm-node-exporter daemonset is used
    49  apiVersion: v1
    50  kind: Service
    51  metadata:
    52    name: ndm-node-exporter-service
    53    namespace: openebs
    54    labels:
    55      app: openebs-ndm-exporter
    56  spec:
    57    clusterIP: None
    58    ports:
    59      - name: metrics
    60        port: 9101
    61        targetPort: 9101
    62    selector:
    63      name: ndm-node-exporter
    64  ---