Skip to content

Commit

Permalink
Merge pull request #47 from radiofrance/split-webhook-and-telemetry-helm
Browse files Browse the repository at this point in the history
feat(helm): bump app to 2.0.0
  • Loading branch information
graillus authored Jan 27, 2023
2 parents 4c1176f + c863f61 commit a1a520f
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
4 changes: 2 additions & 2 deletions charts/gitlab-ci-runner-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
apiVersion: v2
name: gitlab-ci-pipelines-exporter
version: 1.1.1
version: 2.0.0
# renovate: image=ghcr.io/radiofrance/gitlab-ci-pipelines-exporter
appVersion: v1.0.2
appVersion: v2.0.0
description: Prometheus exporter for Gitlab CI pipelines insights
home: https://github.com/radiofrance/gitlab-ci-pipelines-exporter
sources:
Expand Down
5 changes: 3 additions & 2 deletions charts/gitlab-ci-runner-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ COMMANDS:
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--web.listen-address value address:port to listen on for telemetry (default: ":9252") [$WEB_LISTEN_ADDRESS]
--web.telemetry-path value Path under which to expose metrics (default: "/metrics") [$WEB_TELEMETRY_PATH]
--web.listen-address value address:port to listen on for incoming webhooks (default: ":8080") [$WEB_LISTEN_ADDRESS]
--telemetry.listen-address value address:port to listen on for telemetry (default: ":9252") [$TELEMETRY_LISTEN_ADDRESS]
--telemetry.path value Path under which to expose telemetry endpoint (default: "/metrics") [$TELEMETRY_PATH]
--gitlab.webhook-secret-token token token used to authenticate legitimate requests (overrides config file parameter) [$GITLAB_WEBHOOK_SECRET_TOKEN]
--log.level value Log verbosity (default: "info") [$LOG_LEVEL]
--help, -h show help (default: false)
Expand Down
5 changes: 5 additions & 0 deletions charts/gitlab-ci-runner-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,17 @@ spec:
{{- end }}
- name: WEB_LISTEN_ADDRESS
value: :{{ .Values.containerPorts.http }}
- name: TELEMETRY_LISTEN_ADDRESS
value: :{{ .Values.containerPorts.metrics }}
- name: LOG_LEVEL
value: {{ .Values.gcpe.logLevel }}
ports:
- name: http
containerPort: {{ .Values.containerPorts.http }}
protocol: TCP
- name: metrics
containerPort: {{ .Values.containerPorts.metrics }}
protocol: TCP
livenessProbe:
httpGet: &httpProbe
path: /healthz
Expand Down
9 changes: 3 additions & 6 deletions charts/gitlab-ci-runner-exporter/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ spec:
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: {{ printf "%s/pipeline" .Values.ingress.path | clean }}
pathType: Exact
backend: &backend
- path: {{ .Values.ingress.path | clean }}
pathType: {{ .Values.ingress.pathType }}
backend:
service:
name: {{ include "gitlab-ci-pipelines-exporter.fullname" . }}
port:
name: http
- path: {{ printf "%s/job" .Values.ingress.path | clean }}
pathType: Exact
backend: *backend
{{- end }}
{{- if .Values.ingress.tls }}
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: http
- port: metrics
path: /metrics
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
Expand Down
8 changes: 7 additions & 1 deletion charts/gitlab-ci-runner-exporter/templates/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ spec:
{{- end }}
ports:
- name: http
port: {{ coalesce .Values.service.ports.http .Values.service.port}}
port: {{ .Values.service.ports.http }}
targetPort: http
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
nodePort: {{ .Values.service.nodePorts.http }}
{{- end }}
- name: metrics
port: {{ .Values.service.ports.metrics }}
targetPort: metrics
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
nodePort: {{ .Values.service.nodePorts.metrics }}
{{- end }}
selector: {{- include "gitlab-ci-pipelines-exporter.selectorLabels" . | nindent 4 }}
13 changes: 9 additions & 4 deletions charts/gitlab-ci-runner-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ containerSecurityContext:
## containerPorts -- Gitlab CI pipelines exporter container port
containerPorts:
## containerPorts.http -- Main exporter port, that receive webhook requests and export metrics
http: 9252
http: 8080
metrics: 9252

## resources -- Gitlab CI pipelines exporter pods' resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
Expand Down Expand Up @@ -190,11 +191,15 @@ service:
## service.type -- Gitlab CI pipelines exporter Service type
type: ClusterIP
ports:
## service.ports.http -- Gitlab CI pipelines exporter service HTTP port
http: 80
## service.ports.http -- HTTP port for incoming webhooks
http: 8080
## service.ports.metrics -- Metrics port to be scraped by prometheus
metrics: 9252
nodePorts:
## service.nodePorts.http -- node port for HTTP
http: ""
## service.nodePorts.http -- node port for metrics
metrics: ""
## service.clusterIP -- Gitlab CI pipelines exporter service Cluster IP
## e.g.:
## clusterIP: None
Expand Down Expand Up @@ -229,7 +234,7 @@ ingress:
enabled: false

## ingress.pathType -- ingress path type
pathType: ImplementationSpecific
pathType: Prefix
## ingress.ingressClassName -- IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
## IngressClassName is used to reference the IngressClass that should be used to implement this Ingress.
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
Expand Down

0 comments on commit a1a520f

Please sign in to comment.