feat(argocd-applicationset): Add resources metrics-service and servicemonitor. (#1041)
* [argocd-applicationset]: Add metrics-service and servicemonitor to applicationset. Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * [argocd-applicationset]: Add ci values for servicemonitor. Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * format indent Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * update helm docs Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * update ci values Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * update ci values Signed-off-by: fuyuan.chu <fuyuan.chu@airwallex.com> * chore: Use consistent indents and file ending Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Also disable mounts of ArgoCD during metrics test Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
60693bb289
commit
817652a449
7 changed files with 115 additions and 3 deletions
38
charts/argocd-applicationset/templates/servicemonitor.yaml
Normal file
38
charts/argocd-applicationset/templates/servicemonitor.yaml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "argo-applicationset.fullname" . }}
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-applicationset.labels" . | nindent 4 }}
|
||||
{{- with .Values.metrics.serviceMonitor.selector }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: metrics
|
||||
{{- with .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
path: /metrics
|
||||
{{- with .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-applicationset.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue