Add servicemonitor additional labels and podmonitor (#2541)
Co-authored-by: shaunak_deshmukh <shaunak@infracloud.io>
This commit is contained in:
co-authored by
shaunak_deshmukh
parent
05130949ad
commit
79b41ec070
@@ -0,0 +1,23 @@
|
|||||||
|
{{- if .Values.podMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: buildermgr-monitor
|
||||||
|
{{- if .Values.podMonitor.namespace }}
|
||||||
|
namespace: {{ .Values.podMonitor.namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podMonitor.additionalPodMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: buildermgr
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: "metrics"
|
||||||
|
path: "/metrics"
|
||||||
|
{{- end -}}
|
||||||
@@ -6,6 +6,10 @@ metadata:
|
|||||||
{{- if .Values.serviceMonitor.namespace }}
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ metadata:
|
|||||||
{{- if .Values.serviceMonitor.namespace }}
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||||
command: ["/fission-bundle"]
|
command: ["/fission-bundle"]
|
||||||
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
|
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: metrics
|
||||||
env:
|
env:
|
||||||
- name: MESSAGE_QUEUE_TYPE
|
- name: MESSAGE_QUEUE_TYPE
|
||||||
value: kafka
|
value: kafka
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{{- if .Values.podMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: mqt-fission-kafka-monitor
|
||||||
|
{{- if .Values.podMonitor.namespace }}
|
||||||
|
namespace: {{ .Values.podMonitor.namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podMonitor.additionalPodMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
svc: mqtrigger
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: "metrics"
|
||||||
|
path: "/metrics"
|
||||||
|
{{- end -}}
|
||||||
@@ -6,6 +6,10 @@ metadata:
|
|||||||
{{- if .Values.serviceMonitor.namespace }}
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ metadata:
|
|||||||
{{- if .Values.serviceMonitor.namespace }}
|
{{- if .Values.serviceMonitor.namespace }}
|
||||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.serviceMonitor.additionalServiceMonitorLabels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
|
|||||||
@@ -452,11 +452,33 @@ kafka:
|
|||||||
##
|
##
|
||||||
# version: "0.11.2.0"
|
# version: "0.11.2.0"
|
||||||
|
|
||||||
|
# The following components expose Prometheus metrics and have servicemonitors in this chart (disabled by default)
|
||||||
|
# Controller, router, executor, storage svc
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
enabled: false
|
enabled: false
|
||||||
##namespace in which you want to deploy servicemonitor
|
##namespace in which you want to deploy servicemonitor
|
||||||
##
|
##
|
||||||
namespace: ""
|
namespace: ""
|
||||||
|
## Map of additional lables to add to the ServiceMonitor resources
|
||||||
|
# to allow selecting sepcific ServiceMonitors
|
||||||
|
# in case of multiple prometheus deployments
|
||||||
|
additionalServiceMonitorLabels: {}
|
||||||
|
# release: "monitoring"
|
||||||
|
# key: "value"
|
||||||
|
|
||||||
|
# The following components expose Prometheus metrics and have podmonitors in this chart (disabled by default)
|
||||||
|
#
|
||||||
|
podMonitor:
|
||||||
|
enabled: false
|
||||||
|
##namespace in which you want to deploy podmonitor
|
||||||
|
##
|
||||||
|
namespace: ""
|
||||||
|
## Map of additional lables to add to the PodMonitor resources
|
||||||
|
# to allow selecting sepcific PodMonitor
|
||||||
|
# in case of multiple prometheus deployments
|
||||||
|
additionalPodMonitorLabels: {}
|
||||||
|
# release: "monitoring"
|
||||||
|
# key: "value"
|
||||||
|
|
||||||
## Persist data to a persistent volume.
|
## Persist data to a persistent volume.
|
||||||
##
|
##
|
||||||
|
|||||||
Reference in New Issue
Block a user