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 - secretName: argocd-tls-certificate
hosts: hosts:
- *host - *host
metrics: metrics: &metrics
enabled: true enabled: true
serviceMonitor: serviceMonitor:
enabled: true enabled: true
controller: controller:
metrics: metrics: *metrics
enabled: true
serviceMonitor:
enabled: true
repoServer: repoServer:
metrics: metrics: *metrics
enabled: true
serviceMonitor:
enabled: true
redis: redis:
metrics: metrics: *metrics
enabled: true
serviceMonitor:
enabled: true
dex: dex:
metrics: metrics: *metrics
enabled: true
serviceMonitor:
enabled: true

View File

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

View File

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

View File

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