metal-stack / firewall-controller

A kubernetes controller running on bare-metal firewalls, creating nftables rules, configures suricata, collects network metrics
MIT License
47 stars 4 forks source link

add app label to the exporter services #49

Closed mwennrich closed 4 years ago

mwennrich commented 4 years ago

adds an app label to the exporter services in the firewall namespace, e.g.:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: node-exporter
  name: node-exporter
  namespace: firewall

This is needed, so for example a prometheus-operator servicemonitor can select on these services:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: firewall-node-exporter
  namespace: firewall
  labels:
    release: prometheus
spec:
  selector:
    matchLabels:
      app: node-exporter
  namespaceSelector:
    matchNames:
    - firewall
  endpoints:
  - port: nodeexporter