feat(prometheus): set service monitor label selector
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -140,3 +140,4 @@ dist
|
|||||||
/custom
|
/custom
|
||||||
/private/
|
/private/
|
||||||
.mcp.json
|
.mcp.json
|
||||||
|
/.playwright-mcp/
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ install: check-env
|
|||||||
--wait \
|
--wait \
|
||||||
-f values.yaml
|
-f values.yaml
|
||||||
|
|
||||||
|
# Label monitoring namespace to enable self-monitoring
|
||||||
|
kubectl label namespace ${PROMETHEUS_NAMESPACE} buun.channel/enable-monitoring=true --overwrite
|
||||||
|
|
||||||
admin_password=$(just admin-password)
|
admin_password=$(just admin-password)
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ prometheus:
|
|||||||
requests:
|
requests:
|
||||||
storage: 50Gi
|
storage: 50Gi
|
||||||
|
|
||||||
|
# ServiceMonitor selection
|
||||||
|
# Select ServiceMonitors with release label only in namespaces with enable-monitoring label
|
||||||
|
serviceMonitorSelectorNilUsesHelmValues: true
|
||||||
|
serviceMonitorNamespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
buun.channel/enable-monitoring: "true"
|
||||||
|
|
||||||
{{- if .Env.PROMETHEUS_HOST }}
|
{{- if .Env.PROMETHEUS_HOST }}
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -454,3 +454,7 @@ write-policy name file:
|
|||||||
# Login to Vault using OIDC
|
# Login to Vault using OIDC
|
||||||
login:
|
login:
|
||||||
@vault login -method=oidc
|
@vault login -method=oidc
|
||||||
|
|
||||||
|
# NOTE: Vault monitoring is not supported
|
||||||
|
# Reason: Prometheus ServiceMonitor does not support custom HTTP headers (X-Vault-Token)
|
||||||
|
# Alternative: Use Vault Exporter or manual Prometheus scrape_configs
|
||||||
|
|||||||
Reference in New Issue
Block a user