Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ spec:
{{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.monitoring.exporter.imageRegistry }}
image: {{ printf "%s/%s:%s" $imageRegistry .Values.monitoring.exporter.imageName .Values.monitoring.exporter.imageTag | quote }}
ports:
- containerPort: {{ .Values.monitoring.exporter.port }}
- name: metrics
containerPort: {{ .Values.monitoring.exporter.port }}
{{- with .Values.monitoring.exporter.tolerations }}
tolerations: {{ toYaml . | nindent 6 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
- name: http-port
protocol: TCP
port: {{ .Values.monitoring.exporter.port }}
targetPort: {{ .Values.monitoring.exporter.port }}
targetPort: metrics
{{- if and (eq .Values.monitoring.exporter.service.type "NodePort") .Values.monitoring.exporter.service.nodePort }}
nodePort: {{ .Values.monitoring.exporter.service.nodePort }}
{{- end }}
Expand Down
33 changes: 33 additions & 0 deletions charts/selenium-grid/templates/monitoring-pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if and (eq (include "seleniumGrid.monitoring.enabled" $) "true") .Values.monitoring.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
namespace: {{ .Values.monitoring.podMonitor.namespace | default .Release.Namespace }}
{{- with .Values.monitoring.podMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
{{- with .Values.monitoring.podMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
podMetricsEndpoints:
- port: metrics
path: {{ .Values.monitoring.podMonitor.path }}
interval: {{ .Values.monitoring.podMonitor.interval }}
scrapeTimeout: {{ .Values.monitoring.podMonitor.scrapeTimeout }}
{{- with .Values.monitoring.podMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.monitoring.podMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
33 changes: 33 additions & 0 deletions charts/selenium-grid/templates/monitoring-service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if and (eq (include "seleniumGrid.monitoring.enabled" $) "true") .Values.monitoring.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
namespace: {{ .Values.monitoring.serviceMonitor.namespace | default .Release.Namespace }}
{{- with .Values.monitoring.serviceMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
{{- with .Values.monitoring.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
endpoints:
Comment thread
VietND96 marked this conversation as resolved.
- port: http-port
path: {{ .Values.monitoring.serviceMonitor.path }}
interval: {{ .Values.monitoring.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.monitoring.serviceMonitor.scrapeTimeout }}
{{- with .Values.monitoring.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.monitoring.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
40 changes: 40 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,46 @@ monitoring:
key: ""
value: ""
annotations: {}
# -- ServiceMonitor configuration for Prometheus Operator
serviceMonitor:
# -- Enable ServiceMonitor resource
enabled: false
# -- Namespace to deploy the ServiceMonitor into (defaults to release namespace)
namespace: ""
# -- Additional labels for the ServiceMonitor
labels: {}
# -- Additional annotations for the ServiceMonitor
annotations: {}
# -- Metrics scrape path
path: /metrics
# -- Scrape interval
interval: 30s
# -- Scrape timeout
scrapeTimeout: 10s
# -- RelabelConfigs to apply to samples before scraping
relabelings: []
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []
# -- PodMonitor configuration for Prometheus Operator (alternative to ServiceMonitor)
podMonitor:
# -- Enable PodMonitor resource
enabled: false
# -- Namespace to deploy the PodMonitor into (defaults to release namespace)
namespace: ""
# -- Additional labels for the PodMonitor
labels: {}
# -- Additional annotations for the PodMonitor
annotations: {}
# -- Metrics scrape path
path: /metrics
# -- Scrape interval
interval: 30s
# -- Scrape timeout
scrapeTimeout: 10s
# -- RelabelConfigs to apply to samples before scraping
relabelings: []
# -- MetricRelabelConfigs to apply to samples before ingestion
metricRelabelings: []

# Keda scaled object configuration
autoscaling:
Expand Down
Loading