-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(RHTAPWATCH-568): Add authentication to Service and ServiceMonitor
Signed-off-by: Kousalya Lakshmanan <[email protected]>
- Loading branch information
1 parent
5c8e7b4
commit c003e1e
Showing
3 changed files
with
68 additions
and
24 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
config/exporters/monitoring/grafana/base/prometheus-exporter-service-monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: availability-exporter-sa | ||
namespace: appstudio-grafana-datasource-exporter | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: availability-exporter-sa | ||
namespace: appstudio-grafana-datasource-exporter | ||
annotations: | ||
kubernetes.io/service-account.name: availability-exporter-sa | ||
type: kubernetes.io/service-account-token | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: availability-exporter-cluster-role | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: availability-exporter-cluster-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: availability-exporter-cluster-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: availability-exporter-sa | ||
namespace: appstudio-grafana-datasource-exporter | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: availability-metrics-reader | ||
namespace: appstudio-grafana-datasource-exporter | ||
spec: | ||
endpoints: | ||
- path: /metrics | ||
port: https | ||
scheme: https | ||
bearerTokenSecret: | ||
name: "availability-exporter-sa" | ||
key: token | ||
tlsConfig: | ||
insecureSkipVerify: true | ||
selector: | ||
matchLabels: | ||
app: grafana-datasource-exporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters