k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/prometheus/manifests/exporters/windows_node_exporter/windows-exporter-daemonset.yaml (about)

     1  apiVersion: apps/v1
     2  kind: DaemonSet
     3  metadata:
     4    labels:
     5      k8s-app: windows-exporter
     6    name: windows-exporter
     7    namespace: monitoring
     8  spec:
     9    selector:
    10      matchLabels:
    11        k8s-app: windows-exporter
    12    template:
    13      metadata:
    14        labels:
    15          k8s-app: windows-exporter
    16      spec:
    17        securityContext:
    18          windowsOptions:
    19            hostProcess: true
    20            runAsUserName: "NT AUTHORITY\\system"
    21        hostNetwork: true
    22        initContainers:
    23          - name: configure-firewall
    24            image: mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
    25            command: ["powershell"]
    26            args: ["New-NetFirewallRule", "-DisplayName", "'windows-exporter'", "-Direction", "inbound", "-Profile", "Any", "-Action", "Allow", "-LocalPort", "9182", "-Protocol", "TCP"]
    27        containers:
    28        - args: 
    29          - --config.file=%CONTAINER_SANDBOX_MOUNT_POINT%/config.yml
    30          name: windows-exporter
    31          image: ghcr.io/prometheus-community/windows-exporter:latest
    32          imagePullPolicy: Always
    33          ports:
    34          - containerPort: 9182
    35            hostPort: 9182
    36            name: http
    37          volumeMounts:
    38          - name:  windows-exporter-config
    39            mountPath: /config.yml
    40            subPath: config.yml
    41        nodeSelector:
    42          kubernetes.io/os: windows
    43        volumes:
    44        - name: windows-exporter-config
    45          configMap:
    46            name: windows-exporter-config