ce7cb702218693d08ea6d83464d2457c9250027c

This commit is contained in:
ms2k 2026-11-12 20:46:28 +09:00
commit 34c5f8963c
4 changed files with 145336 additions and 0 deletions

View file

@ -0,0 +1,40 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: node-exporter
namespace: node-exporter
spec:
interval: 15m
releaseName: node-exporter
targetNamespace: node-exporter
chart:
spec:
chart: prometheus-node-exporter
version: 4.60.1
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: flux-system
install:
createNamespace: true
remediation:
retries: 3
upgrade:
remediation:
retries: 3
values:
hostNetwork: false
containerSecurityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
extraArgs:
- --collector.interrupts
resources:
requests:
cpu: 20m
memory: 64Mi
limits:
memory: 128Mi

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- helm-release.yaml
- network-policies.yaml

View file

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: node-exporter

View file

@ -0,0 +1,44 @@
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: node-exporter
namespace: node-exporter
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: prometheus-node-exporter
app.kubernetes.io/instance: node-exporter
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "9100"
protocol: TCP
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: victoriametrics
app.kubernetes.io/name: vmagent
app.kubernetes.io/instance: main
toPorts:
- ports:
- port: "9100"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: host-egress-node-exporter
spec:
nodeSelector: {}
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: node-exporter
app.kubernetes.io/name: prometheus-node-exporter
app.kubernetes.io/instance: node-exporter
toPorts:
- ports:
- port: "9100"
protocol: TCP