From c863f61922c141f111b429f0df61970d97257b8c Mon Sep 17 00:00:00 2001 From: rgraillon Date: Tue, 17 Jan 2023 15:39:13 +0100 Subject: [PATCH] feat(helm): bump to v2.0.0 --- charts/gitlab-ci-runner-exporter/Chart.yaml | 4 ++-- charts/gitlab-ci-runner-exporter/README.md | 5 +++-- .../templates/deployment.yaml | 5 +++++ .../templates/ingress.yaml | 9 +++------ .../templates/servicemonitor.yaml | 2 +- charts/gitlab-ci-runner-exporter/templates/svc.yaml | 8 +++++++- charts/gitlab-ci-runner-exporter/values.yaml | 13 +++++++++---- 7 files changed, 30 insertions(+), 16 deletions(-) diff --git a/charts/gitlab-ci-runner-exporter/Chart.yaml b/charts/gitlab-ci-runner-exporter/Chart.yaml index 0b3d041ca..bf10ae43c 100644 --- a/charts/gitlab-ci-runner-exporter/Chart.yaml +++ b/charts/gitlab-ci-runner-exporter/Chart.yaml @@ -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: diff --git a/charts/gitlab-ci-runner-exporter/README.md b/charts/gitlab-ci-runner-exporter/README.md index 4ebff0881..95d0d7935 100644 --- a/charts/gitlab-ci-runner-exporter/README.md +++ b/charts/gitlab-ci-runner-exporter/README.md @@ -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) diff --git a/charts/gitlab-ci-runner-exporter/templates/deployment.yaml b/charts/gitlab-ci-runner-exporter/templates/deployment.yaml index ec45b893f..1a6061493 100644 --- a/charts/gitlab-ci-runner-exporter/templates/deployment.yaml +++ b/charts/gitlab-ci-runner-exporter/templates/deployment.yaml @@ -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 diff --git a/charts/gitlab-ci-runner-exporter/templates/ingress.yaml b/charts/gitlab-ci-runner-exporter/templates/ingress.yaml index 9899c952d..177806c1d 100644 --- a/charts/gitlab-ci-runner-exporter/templates/ingress.yaml +++ b/charts/gitlab-ci-runner-exporter/templates/ingress.yaml @@ -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: diff --git a/charts/gitlab-ci-runner-exporter/templates/servicemonitor.yaml b/charts/gitlab-ci-runner-exporter/templates/servicemonitor.yaml index 2a0a5b8ab..c7fae2d19 100644 --- a/charts/gitlab-ci-runner-exporter/templates/servicemonitor.yaml +++ b/charts/gitlab-ci-runner-exporter/templates/servicemonitor.yaml @@ -13,7 +13,7 @@ metadata: {{- end }} spec: endpoints: - - port: http + - port: metrics path: /metrics {{- if .Values.metrics.serviceMonitor.interval }} interval: {{ .Values.metrics.serviceMonitor.interval }} diff --git a/charts/gitlab-ci-runner-exporter/templates/svc.yaml b/charts/gitlab-ci-runner-exporter/templates/svc.yaml index df5601610..5a8252808 100644 --- a/charts/gitlab-ci-runner-exporter/templates/svc.yaml +++ b/charts/gitlab-ci-runner-exporter/templates/svc.yaml @@ -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 }} diff --git a/charts/gitlab-ci-runner-exporter/values.yaml b/charts/gitlab-ci-runner-exporter/values.yaml index 20f3748d7..c77cd9d1e 100644 --- a/charts/gitlab-ci-runner-exporter/values.yaml +++ b/charts/gitlab-ci-runner-exporter/values.yaml @@ -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/ @@ -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 @@ -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 .