forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chart(feat): add graphql metrics exporter for monitoring
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
16 changed files
with
193 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ubuntu:noble-20240827.1 | ||
FROM ubuntu:noble-20240904.1 | ||
ARG AUTHORS=SeleniumHQ | ||
LABEL authors="${AUTHORS} <[email protected]>" | ||
LABEL org.opencontainers.image.source="https://github.com/${AUTHORS}/docker-selenium" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- job_name: "selenium-grid-analytics" | ||
metrics_path: "/query" | ||
bearer_token: "" | ||
params: | ||
endpoint: | ||
- '{{ template "seleniumGrid.monitoring.graphqlURL" $ }}' | ||
query: | ||
- | | ||
{ grid { sessionCount, maxSession, totalSlots, nodeCount, sessionQueueSize }, nodesInfo { nodes { id, status, sessionCount, maxSession, slotCount, stereotypes, sessions { id, capabilities, sessionDurationMillis, slot { id, stereotype } } } }, sessionsInfo { sessionQueueRequests } } | ||
zoneTag: [] | ||
tls_config: | ||
insecure_skip_verify: true | ||
static_configs: | ||
- targets: | ||
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}.{{ .Release.Namespace }}:{{ $.Values.monitoring.exporter.port }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
charts/selenium-grid/templates/monitoring-exporter-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{- if $.Values.monitoring.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: &exporter_labels | ||
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
{{- include "seleniumGrid.commonLabels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.monitoring.exporter.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
template: | ||
metadata: | ||
labels: *exporter_labels | ||
annotations: | ||
{{- with .Values.monitoring.exporter.annotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- if or .Values.global.seleniumGrid.imagePullSecret .Values.monitoring.exporter.imagePullSecret }} | ||
imagePullSecrets: | ||
- name: {{ default .Values.global.seleniumGrid.imagePullSecret .Values.monitoring.exporter.imagePullSecret }} | ||
{{- end }} | ||
containers: | ||
- name: graphql-exporter | ||
{{- $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 }} | ||
{{- end }} |
27 changes: 27 additions & 0 deletions
27
charts/selenium-grid/templates/monitoring-exporter-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{- if $.Values.monitoring.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
{{- include "seleniumGrid.commonLabels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
type: {{ .Values.monitoring.exporter.service.type }} | ||
{{- if and (eq .Values.monitoring.exporter.service.type "LoadBalancer") ( .Values.monitoring.exporter.service.loadBalancerIP ) }} | ||
loadBalancerIP: {{ .Values.monitoring.exporter.service.loadBalancerIP }} | ||
{{- end }} | ||
ports: | ||
- name: http-port | ||
protocol: TCP | ||
port: {{ .Values.monitoring.exporter.port }} | ||
targetPort: {{ .Values.monitoring.exporter.port }} | ||
{{- if and (eq .Values.monitoring.exporter.service.type "NodePort") .Values.monitoring.exporter.service.nodePort }} | ||
nodePort: {{ .Values.monitoring.exporter.service.nodePort }} | ||
{{- end }} | ||
{{- end }} |
29 changes: 29 additions & 0 deletions
29
charts/selenium-grid/templates/monitoring-scape-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{- if $.Values.monitoring.enabled }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
{{- with .Values.monitoring.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }} | ||
{{- with .Values.customLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
type: Opaque | ||
data: | ||
{{- range $path, $_ := .Files.Glob "configs/scrape/*.yaml" }} | ||
{{- $fileName := base $path -}} | ||
{{- $value := $.Values.monitoring.additionalScrapeConfigs.value -}} | ||
{{- if empty $value }} | ||
{{- $fileName | nindent 2 -}}: | | ||
{{ toYaml (tpl ($.Files.Get $path) $ | b64enc) }} | ||
{{- else }} | ||
{{- $fileName | nindent 2 -}}: | | ||
{{ toYaml ($value | b64enc) }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters