Add ability to authenticate an endpoint

Write an example for basic auth
This commit is contained in:
Giancarlo Rubio committed 2017-05-08 15:12:08 +02:00
1 parent c6c67bb450
commit 64c959e018
2 files changed
+30

No files matched your search

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: basic-auth
data:
password: dG9vcg== # toor
user: YWRtaW4= # admin
type: Opaque
@@ -0,0 +1,22 @@
apiVersion: monitoring.coreos.com/v1alpha1
kind: ServiceMonitor
metadata:
labels:
k8s-apps: basic-auth-example
name: basic-auth-example
spec:
endpoints:
- basicAuth:
password:
key: basic-auth
name: password
username:
key: basic-auth
name: user
port: metrics
namespaceSelector:
matchNames:
- logging
selector:
matchLabels:
app: myapp