Add ability to authenticate an endpoint
Write an example for basic auth
This commit is contained in:
8
manifests/examples/basic-auth/secrets.yaml
Normal file
8
manifests/examples/basic-auth/secrets.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: basic-auth
|
||||
data:
|
||||
password: dG9vcg== # toor
|
||||
user: YWRtaW4= # admin
|
||||
type: Opaque
|
22
manifests/examples/basic-auth/service-monitor.yaml
Normal file
22
manifests/examples/basic-auth/service-monitor.yaml
Normal file
@@ -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
|
Reference in New Issue
Block a user