From 8e6825985d0848d9f410ab0ce57cfbb9b181fa42 Mon Sep 17 00:00:00 2001 From: Oluwole Fadeyi <16049411+tfadeyi@users.noreply.github.com> Date: Fri, 2 Feb 2024 23:33:37 +0000 Subject: [PATCH] Prepare for new release (#154) Signed-off-by: oluwole fadeyi <16049411+tfadeyi@users.noreply.github.com> --- default.nix | 2 +- deploy/charts/auth0-exporter/Chart.yaml | 4 +-- deploy/charts/auth0-exporter/README.md | 10 +++---- .../auth0-exporter/templates/deployment.yaml | 9 +++--- gomod2nix.toml | 28 +++++++++---------- pkg/docs/docs.go | 2 +- pkg/docs/swagger.json | 2 +- pkg/docs/swagger.yaml | 2 +- pkg/exporter/server.go | 2 +- 9 files changed, 30 insertions(+), 31 deletions(-) diff --git a/default.nix b/default.nix index 8386f25..2bc2ad2 100644 --- a/default.nix +++ b/default.nix @@ -13,7 +13,7 @@ pkgs.buildGoApplication { pname = "auth0-simple-exporter"; - version = "v0.3.0"; + version = "v0.4.0"; pwd = ./.; src = ./.; modules = ./gomod2nix.toml; diff --git a/deploy/charts/auth0-exporter/Chart.yaml b/deploy/charts/auth0-exporter/Chart.yaml index 9886b3a..429583c 100644 --- a/deploy/charts/auth0-exporter/Chart.yaml +++ b/deploy/charts/auth0-exporter/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.4.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.3.0" +appVersion: "0.4.0" home: https://github.com/tfadeyi/auth0-simple-exporter maintainers: diff --git a/deploy/charts/auth0-exporter/README.md b/deploy/charts/auth0-exporter/README.md index b564d01..f53503b 100644 --- a/deploy/charts/auth0-exporter/README.md +++ b/deploy/charts/auth0-exporter/README.md @@ -39,14 +39,14 @@ on the `/metrics` endpoint. | auth0.clientSecret | string | `""` | Auth0 management api client-secret. (do not set if static token is already set) | | auth0.domain | string | `".eu.auth0.com"` | Auth0 tenant's domain. (i.e: .eu.auth0.com) | | auth0.token | string | `""` | Auth0 management api static token. (the token can be used instead of client credentials) | -| exporter | object | `{"logLevel":"info","metrics":{"users":{"enabled":false}},"metricsEndpoint":"metrics","namespace":"","port":9301,"pprof":false,"timeout":"2m0s","tls":{"auto":false,"certFile":"","createSecret":false,"disabled":false,"hosts":[],"keyFile":"","secretKey":"","secretName":""}}` | Exporter's configuration | -| exporter.metrics | object | `{"users":{"enabled":false}}` | Exporter's metrics configuration | -| exporter.metrics.users | object | `{"enabled":false}` | Tenant Users metrics exported by the exporter | -| exporter.metrics.users.enabled | bool | `false` | Stops the exporter from fetching user info from the Auth0 tenant | +| exporter | object | `{"logLevel":"info","metrics":{"users":{"enabled":true}},"metricsEndpoint":"metrics","namespace":"","port":9301,"pprof":false,"timeout":"2m0s","tls":{"auto":false,"certFile":"","createSecret":false,"disabled":false,"hosts":[],"keyFile":"","secretKey":"","secretName":""}}` | Exporter's configuration | +| exporter.metrics | object | `{"users":{"enabled":true}}` | Exporter's metrics configuration | +| exporter.metrics.users | object | `{"enabled":true}` | Tenant Users metrics exported by the exporter | +| exporter.metrics.users.enabled | bool | `true` | Stops the exporter from fetching user info from the Auth0 tenant | | exporter.metricsEndpoint | string | `"metrics"` | URL Path under which to expose the collected auth0 metrics. | | exporter.port | int | `9301` | Port where the server will listen. | | exporter.pprof | bool | `false` | Enabled pprof profiling on the exporter on port :6060. (help: https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/) | -| exporter.timeout | string | `"2m0s"` | Exporter Request timeout. (0h0m0s) | +| exporter.timeout | string | `"2m0s"` | Exporter Request timeout. (0h0m0s) Note: setting 0, tells the exporter to have no timeout | | exporter.tls | object | `{"auto":false,"certFile":"","createSecret":false,"disabled":false,"hosts":[],"keyFile":"","secretKey":"","secretName":""}` | Exporter's TLS configuration | | exporter.tls.auto | bool | `false` | Allow the exporter to use autocert to renew its certificates with letsencrypt. (can only be used if the exporter is publicly accessible by the internet) | | exporter.tls.certFile | string | `""` | The certificate file for the exporter TLS connection. | diff --git a/deploy/charts/auth0-exporter/templates/deployment.yaml b/deploy/charts/auth0-exporter/templates/deployment.yaml index 9d5e328..0e680dc 100644 --- a/deploy/charts/auth0-exporter/templates/deployment.yaml +++ b/deploy/charts/auth0-exporter/templates/deployment.yaml @@ -76,11 +76,10 @@ spec: - "--web.listen-address" - "{{- .Values.exporter.port }}" {{- end }} -{{/* TODO add back in new release*/}} -{{/* {{- if .Values.exporter.timeout }}*/}} -{{/* - "--web.timeout"*/}} -{{/* - {{ .Values.exporter.timeout }}*/}} -{{/* {{- end }}*/}} + {{- if .Values.exporter.timeout }} + - "--web.timeout" + - {{ .Values.exporter.timeout }} + {{- end }} {{- if (not .Values.exporter.metrics.users.enabled) }} - "--metrics.users.disabled" {{- end }} diff --git a/gomod2nix.toml b/gomod2nix.toml index 2990c77..39d8dd9 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -14,8 +14,8 @@ schema = 3 version = "v0.0.0-20170810143723-de5bf2ad4578" hash = "sha256-nL0/0QM0Pec83vBlwXvQ8g5SvvZnCQgzD1apxfHNGlg=" [mod."github.com/auth0/go-auth0"] - version = "v1.3.1" - hash = "sha256-XQpkj/k1oyxdCfzCc5r+8/wRf8Gk6J9N4gah2taedZA=" + version = "v1.4.0" + hash = "sha256-c1RN1ofVGpjyKH9pYmt4JhV8jWxdQfdxVNMIKOVdwpQ=" [mod."github.com/beorn7/perks"] version = "v1.0.1" hash = "sha256-h75GUqfwJKngCJQVE5Ao5wnO3cfKD9lSIteoLp/3xJ4=" @@ -35,8 +35,8 @@ schema = 3 version = "v0.5.1" hash = "sha256-t50m9ffvW8PiGvO+2svnLI+N/XaWaBS+ZlhwrEQn2gU=" [mod."github.com/go-logr/logr"] - version = "v1.3.0" - hash = "sha256-N8JYtQlwpLWTaCczfhfA/YmHExko0ObPMYVGw8JwbSw=" + version = "v1.4.1" + hash = "sha256-WM4badoqxXlBmqCRrnmtNce63dLlr/FJav3BJSYHvaY=" [mod."github.com/go-openapi/jsonpointer"] version = "v0.19.5" hash = "sha256-rLyvUdTMeQGeWiVsz2ZeyyFjHomeqd0x+ZR77mxi8Ss=" @@ -86,8 +86,8 @@ schema = 3 version = "v1.0.0" hash = "sha256-/FtmHnaGjdvEIKAJtrUfEhV7EVo5A/eYrtdnUkuxLDA=" [mod."github.com/prometheus/client_golang"] - version = "v1.17.0" - hash = "sha256-FIIzCuNqHdVzpbyH7yAp7Tcu+1tPxEMS5g6KfsGQBGE=" + version = "v1.18.0" + hash = "sha256-kuC6WUg2j7A+9qnSp5VZSYo+oltgLvj/70TpqlCJIdE=" [mod."github.com/prometheus/client_model"] version = "v0.5.0" hash = "sha256-/sXlngf8AoEIeLIiaLg6Y7uYPVq7tI0qnLt0mUyKid4=" @@ -95,8 +95,8 @@ schema = 3 version = "v0.45.0" hash = "sha256-N7CDcekAW8InquaVHHkuZ6gNCoW8J0yDlH5A+dj3cfE=" [mod."github.com/prometheus/procfs"] - version = "v0.11.1" - hash = "sha256-yphZ7NZtYC/tb0HVag2T58SuN64Ial9sBo/TdCEQx6Q=" + version = "v0.12.0" + hash = "sha256-Y4ZZmxIpVCO67zN3pGwSk2TcI88zvmGJkgwq9DRTwFw=" [mod."github.com/spf13/cobra"] version = "v1.8.0" hash = "sha256-oAE+fEaRfZPE541IPWE0GMeBBYgH2DMhtZNxzp7DFlY=" @@ -116,8 +116,8 @@ schema = 3 version = "v1.16.2" hash = "sha256-KBC/L2/pIjhrhUbf0jGLVO7J+TKu/MNMXEEibf9iYkk=" [mod."github.com/tonglil/gokitlogr"] - version = "v1.0.0" - hash = "sha256-MnIddosmhYQ8dCmLH9Q0cbRktCjj6uRkLBv3IbpfnOg=" + version = "v1.1.1" + hash = "sha256-OQ6GzkHk1cr6vqB/g6eeZg+fX+30NZdWPCcAoTGEy5s=" [mod."github.com/valyala/bytebufferpool"] version = "v1.0.0" hash = "sha256-I9FPZ3kCNRB+o0dpMwBnwZ35Fj9+ThvITn8a3Jr8mAY=" @@ -128,8 +128,8 @@ schema = 3 version = "v1.11.0" hash = "sha256-Lb6rHHfR62Ozg2j2JZy3MKOMKdsfzd1IYTR57r3Mhp0=" [mod."golang.org/x/crypto"] - version = "v0.16.0" - hash = "sha256-DgSVOnXRK8GF01p5rLtq4qPBcglwEoOk8qhW2EGfJfA=" + version = "v0.17.0" + hash = "sha256-/vzBaeD/Ymyc7cpjBvSfJfuZ57zWa9LOaZM7b33eIx0=" [mod."golang.org/x/net"] version = "v0.19.0" hash = "sha256-3M5rKEvJx4cO/q+06cGjR5sxF5JpnUWY0+fQttrWdT4=" @@ -137,8 +137,8 @@ schema = 3 version = "v0.15.0" hash = "sha256-exA/abu6WOR7Cwqa41LpnTD2xQNRZMYU5CnBKvXHx8Y=" [mod."golang.org/x/sync"] - version = "v0.5.0" - hash = "sha256-EAKeODSsct5HhXPmpWJfulKSCkuUu6kkDttnjyZMNcI=" + version = "v0.6.0" + hash = "sha256-LLims/wjDZtIqlYCVHREewcUOX4hwRwplEuZKPOJ/HI=" [mod."golang.org/x/sys"] version = "v0.15.0" hash = "sha256-n7TlABF6179RzGq3gctPDKDPRtDfnwPdjNCMm8ps2KY=" diff --git a/pkg/docs/docs.go b/pkg/docs/docs.go index 71ab7fe..7ad22cc 100644 --- a/pkg/docs/docs.go +++ b/pkg/docs/docs.go @@ -49,7 +49,7 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ - Version: "0.3.0", + Version: "0.4.0", Host: "localhost:8080", BasePath: "/", Schemes: []string{}, diff --git a/pkg/docs/swagger.json b/pkg/docs/swagger.json index 891916c..c285bcc 100644 --- a/pkg/docs/swagger.json +++ b/pkg/docs/swagger.json @@ -10,7 +10,7 @@ "name": "Apache 2.0", "url": "https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE" }, - "version": "0.3.0" + "version": "0.4.0" }, "host": "localhost:8080", "basePath": "/", diff --git a/pkg/docs/swagger.yaml b/pkg/docs/swagger.yaml index b2db359..4bb0f4e 100644 --- a/pkg/docs/swagger.yaml +++ b/pkg/docs/swagger.yaml @@ -10,7 +10,7 @@ info: name: Apache 2.0 url: https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE title: Auth0 simple exporter - version: 0.3.0 + version: 0.4.0 paths: /metrics: get: diff --git a/pkg/exporter/server.go b/pkg/exporter/server.go index aa112b7..3de1f80 100644 --- a/pkg/exporter/server.go +++ b/pkg/exporter/server.go @@ -18,7 +18,7 @@ import ( ) // @title Auth0 simple exporter -// @version 0.3.0 +// @version 0.4.0 // @description A simple Prometheus exporter for Auth0 log [events](https://auth0.com/docs/api/management/v2#!/Logs/get_logs), // @description which allows you to collect metrics from Auth0 and expose them in a format that can be consumed by Prometheus.