apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: apps
  labels:
    prometheus: prometheus-standalone
    k8s-app: apps
spec:
  jobLabel: apps
  selector:
    matchLabels:
      app: example-app
  namespaceSelector:
    matchNames:
    - apps
  endpoints:
  - port: http
    interval: 30s