style: clean up monitor config

- Use YAML anchor
- Use template for name and namespace
This commit is contained in:
Khue Doan 2022-01-08 12:50:08 +07:00
parent 07e8f1881e
commit 25e34cf77f
4 changed files with 8 additions and 29 deletions

View File

@ -50,31 +50,15 @@ argo-cd:
- secretName: argocd-tls-certificate
hosts:
- *host
metrics:
metrics: &metrics
enabled: true
serviceMonitor:
enabled: true
controller:
metrics:
enabled: true
serviceMonitor:
enabled: true
metrics: *metrics
repoServer:
metrics:
enabled: true
serviceMonitor:
enabled: true
metrics: *metrics
redis:
metrics:
enabled: true
serviceMonitor:
enabled: true
metrics: *metrics
dex:
metrics:
enabled: true
serviceMonitor:
enabled: true
metrics: *metrics

View File

@ -2,12 +2,9 @@ ingress-nginx:
controller:
admissionWebhooks:
timeoutSeconds: 30
metrics:
enabled: true
serviceMonitor:
enabled: true
tcp:
22: gitea/gitea-ssh:22

View File

@ -1,5 +1,3 @@
loki:
serviceMonitor:
enabled: true
annotations: {}
# scrapeTimeout: 10s

View File

@ -2,14 +2,14 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: longhorn
namespace: longhorn-system
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: longhorn-manager
namespaceSelector:
matchNames:
- longhorn-system
- {{ .Release.Namespace }}
endpoints:
- port: manager