Skip to content

Instantly share code, notes, and snippets.

@infinitydon
Created October 25, 2018 10:16
Show Gist options
  • Save infinitydon/2a9a13f5d89eb078f067c95741140224 to your computer and use it in GitHub Desktop.
Save infinitydon/2a9a13f5d89eb078f067c95741140224 to your computer and use it in GitHub Desktop.
prom-operator-federation
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: prometheus-federation
namespace: kube-system
labels:
prometheus: kube-prometheus
spec:
selector:
matchLabels:
name: nothing
namespaceSelector:
matchNames:
- nothing
endpoints:
- interval: 1m
path: /federate
scheme: https
params:
'match[]':
- '{__name__="up"}'
- '{__name__=~"machine_controller.*"}'
staticConfigs:
targets:
- 'https://ingress.sitea.de/prom-monitoring/'
labels:
cluster_name: phantomA
- 'https://ingress.siteb.de/prom-monitoring/'
labels:
cluster_name: phantomB
tls_config:
insecure_skip_verify: true
basic_auth:
username: userslslsl
password: password12344
Is the above configuration syntax ok? I could not find much documentation on setting federation using prometheus-operator with basic authentication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment