File: pcm-kubernetes.yaml.experimental

package info (click to toggle)
pcm 202502-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,164 kB
  • sloc: cpp: 44,347; ansic: 1,161; sh: 778; python: 388; awk: 28; makefile: 13
file content (164 lines) | stat: -rw-r--r-- 4,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
apiVersion: v1
kind: Namespace
metadata:
  name: intel-pcm
  labels: # uses host features by design privileges required
    pod-security.kubernetes.io/enforce: privileged
    pod-security.kubernetes.io/enforce-version: latest
    pod-security.kubernetes.io/audit: privileged
    pod-security.kubernetes.io/audit-version: latest
    pod-security.kubernetes.io/warn: privileged
    pod-security.kubernetes.io/warn-version: latest
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/instance: pcm
    app.kubernetes.io/name: intel-pcm
    app.kubernetes.io/part-of: intel-pcm
  name: intel-pcm
  namespace: intel-pcm
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: pcm-sensor-server
      app.kubernetes.io/instance: pcm
      app.kubernetes.io/name: intel-pcm
  template:
    metadata:
      labels:
        app.kubernetes.io/component: pcm-sensor-server
        app.kubernetes.io/instance: pcm
        app.kubernetes.io/name: intel-pcm
        app.kubernetes.io/part-of: intel-pcm
        jobLabel: pcm
    spec:
      automountServiceAccountToken: false
      containers:
      - image: ghcr.io/intel/pcm:latest
        env:
        - name: PCM_NO_MSR
          value: "1"
        - name: PCM_IGNORE_ARCH_PERFMON
          value: "0"
        - name: PCM_NO_PERF
          value: "0"
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 9738
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: intel-pcm
        ports:
        - containerPort: 9738
          hostPort: 9738
          name: pcm-metrics
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 9738
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        securityContext:
          privileged: false
          runAsNonRoot: false
          runAsUser: 0
          readOnlyRootFilesystem: true
          capabilities:
            add:
            - SYS_ADMIN
            - SYS_RAWIO
          seccompProfile:
            type: RuntimeDefault
        volumeMounts:
        - mountPath: /dev/cpu
          name: dev-cpu
          readOnly: true
        - mountPath: /dev/mem
          name: dev-mem
          readOnly: true
        - mountPath: /pcm/proc/bus/pci
          name: proc-pci
          readOnly: true
        - mountPath: /pcm/sys/firmware/acpi/tables/MCFG
          name: sys-acpi
          readOnly: true
        - mountPath: /pcm/proc/sys/kernel/nmi_watchdog
          name: nmi-watchdog
          readOnly: true
        - mountPath: /sys
          name: sysfs
          readOnly: false
      nodeSelector:
        kubernetes.io/os: linux
        feature.node.kubernetes.io/cpu-model.vendor_id: Intel # node feature discovery populates this
      volumes:
      - hostPath:
          path: /dev/cpu
        name: dev-cpu
      - hostPath:
          path: /dev/mem
        name: dev-mem
      - hostPath:
          path: /sys
        name: sysfs
      - hostPath:
          path: /sys/firmware/acpi/tables/MCFG
        name: sys-acpi
      - hostPath:
          path: /proc/bus/pci
        name: proc-pci
      - hostPath:
          path: /proc/sys/kernel/nmi_watchdog
        name: nmi-watchdog
---
# prometheus operator defines this CRD
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  labels:
    app.kubernetes.io/instance: pcm
    app.kubernetes.io/name: intel-pcm
    app.kubernetes.io/part-of: intel-pcm
    app.kubernetes.io/component: metrics
    jobLabel: pcm
    prometheus.io/podmonitor: system-metrics
    release: prometheus
  name: pcm
  namespace: intel-pcm
spec:
  attachMetadata:
    node: true
  jobLabel: jobLabel
  namespaceSelector:
    matchNames:
    - intel-pcm
  podMetricsEndpoints:
  - enableHttp2: false
    filterRunning: true
    followRedirects: false
    honorLabels: true
    honorTimestamps: true
    path: /metrics
    port: pcm-metrics
    interval: 1s
    relabelings:
    - sourceLabels:
      - __meta_kubernetes_pod_node_name
      targetLabel: nodename
    scheme: http
  selector:
    matchLabels:
      app.kubernetes.io/component: pcm-sensor-server
      app.kubernetes.io/instance: pcm
      app.kubernetes.io/name: intel-pcm