Skip to content
Snippets Groups Projects
Commit 64c959e0 authored by Giancarlo Rubio's avatar Giancarlo Rubio
Browse files

Add ability to authenticate an endpoint

Write an example for basic auth
parent c6c67bb4
No related branches found
No related tags found
No related merge requests found
apiVersion: v1
kind: Secret
metadata:
name: basic-auth
data:
password: dG9vcg== # toor
user: YWRtaW4= # admin
type: Opaque
\ No newline at end of file
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
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment