Skip to content

Commit

Permalink
Clean documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Oluwole Fadeyi <[email protected]>
  • Loading branch information
tfadeyi committed Apr 6, 2023
1 parent 8007c3e commit 942348f
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 37 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,6 @@ jobs:
uses: helm/[email protected]
with:
skip_packaging: true
mark_as_latest: false
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

# Auth0 Exporter

[![release pipeline](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/release.yml/badge.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/release.yml?event=push)
[![Continuous Integration](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/ci.yml/badge.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/ci.yml)
[![Continuous Integration](https://img.shields.io/github/actions/workflow/status/tfadeyi/auth0-simple-exporter/ci.yml?branch=main&style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE)
[![Language](https://img.shields.io/badge/language-Go-blue.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter)
[![GitHub release](https://img.shields.io/badge/release-0.0.3-green.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/releases)

[![Language](https://img.shields.io/github/go-mod/go-version/tfadeyi/auth0-simple-exporter?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter)
[![GitHub release](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=green&style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/releases)
[![Code size](https://img.shields.io/github/languages/code-size/tfadeyi/auth0-simple-exporter?color=orange&style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter)
</div>

---
Expand All @@ -33,9 +32,14 @@ This Prometheus exporter aims to simplify this, making it easier to expose tenan
Run exporter's container with TLS disabled.

```shell
$ export TOKEN="< auth0 management API static static token >"
$ export DOMAIN="< auth0 tenant domain >"
$ docker run --network host -u $(id -u):$(id -g) -e TOKEN="$TOKEN" -e DOMAIN="$DOMAIN" ghcr.io/tfadeyi/auth0-simple-exporter:latest export --tls.disabled
export TOKEN="< auth0 management API static static token >"
export DOMAIN="< auth0 tenant domain >"

curl -LJO https://github.com/tfadeyi/auth0-simple-exporter/releases/download/v0.0.1/auth0-simple-exporter-linux-amd64.tar.gz && \
tar -xzvf auth0-simple-exporter-linux-amd64.tar.gz && \
cd auth0-simple-exporter-linux-amd64

./auth0-simple-exporter export --tls.disabled
```

## Installation
Expand All @@ -57,13 +61,14 @@ $ docker run --network host -u $(id -u):$(id -g) -e TOKEN="$TOKEN" -e DOMAIN="$D
* ### Helm
This shows a simple installation of the exporter helm chart, running with TLS disabled.
```shell
$ export TOKEN="< auth0 management API static static token >"
$ export DOMAIN="< auth0 tenant domain >"
export TOKEN="< auth0 management API static static token >"
export DOMAIN="< auth0 tenant domain >"
```
```shell
# Installing by passing in secret directly
helm repo add auth0-exporter https://tfadeyi.github.io/auth0-simple-exporter
helm upgrade --install --create-namespace -n auth0-exporter auth0-exporter \
https://tfadeyi.github.io/charts \
auth0-simple-exporter \
--set auth0.domain="$DOMAIN" --set auth0.token="$TOKEN" \
--set exporter.tls.disabled=true
```
Expand Down
6 changes: 3 additions & 3 deletions deploy/charts/auth0-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: auth0-exporter
description: Auth0 Prometheus exporter
description: The helm chart for the auth0 prometheus exporter.

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -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.0.4
version: 0.0.2

# 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.0.4"
appVersion: "0.0.2"

home: https://github.com/tfadeyi/auth0-simple-exporter
maintainers:
Expand Down
20 changes: 11 additions & 9 deletions deploy/charts/auth0-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# auth0-exporter

Auth0 Prometheus exporter
The helm chart for the auth0 prometheus exporter.

![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square)
[![Version](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=Version&sort=semver&style=flat-square)](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=Version&sort=semver&style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
[![AppVersion](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=AppVersion&sort=semver&style=flat-square)](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=AppVersion&sort=semver&style=flat-square)

## Additional Information

Expand All @@ -16,16 +18,16 @@ on the `/metrics` endpoint.
#### Pass secret to chart as a value, it creates the secret
This shows a simple installation of the exporter helm chart, running with TLS disabled.
```shell
$ export TOKEN="< auth0 management API static static token >"
$ export DOMAIN="< auth0 tenant domain >"
export TOKEN="< auth0 management API static static token >"
export DOMAIN="< auth0 tenant domain >"
```

```shell
# Installing by passing in secret directly
helm repo add auth0-exporter https://tfadeyi.github.io/auth0-simple-exporter
helm upgrade --install --create-namespace -n auth0-exporter auth0-exporter \
https://tfadeyi.github.io/charts \
auth0-simple-exporter \
--set auth0.domain="$DOMAIN" --set auth0.token="$TOKEN" \
--set exporter.tls.disabled=true
--set exporter.tls.disabled=true
```

## Values
Expand Down Expand Up @@ -58,8 +60,8 @@ on the `/metrics` endpoint.
| replicaCount | int | `1` | |
| resources.limits.cpu | string | `"100m"` | |
| resources.limits.memory | string | `"128Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"64Mi"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"128Mi"` | |
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
| securityContext.readOnlyRootFilesystem | bool | `true` | |
| securityContext.runAsNonRoot | bool | `true` | |
Expand Down
14 changes: 8 additions & 6 deletions deploy/charts/auth0-exporter/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
[![Version](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=Version&sort=semver&style=flat-square)](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=Version&sort=semver&style=flat-square)
{{ template "chart.typeBadge" . }}
[![AppVersion](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=AppVersion&sort=semver&style=flat-square)](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=blue&label=AppVersion&sort=semver&style=flat-square)

## Additional Information

Expand All @@ -15,16 +17,16 @@ on the `/metrics` endpoint.
#### Pass secret to chart as a value, it creates the secret
This shows a simple installation of the exporter helm chart, running with TLS disabled.
```shell
$ export TOKEN="< auth0 management API static static token >"
$ export DOMAIN="< auth0 tenant domain >"
export TOKEN="< auth0 management API static static token >"
export DOMAIN="< auth0 tenant domain >"
```

```shell
# Installing by passing in secret directly
helm repo add auth0-exporter https://tfadeyi.github.io/auth0-simple-exporter
helm upgrade --install --create-namespace -n auth0-exporter auth0-exporter \
https://tfadeyi.github.io/charts \
auth0-simple-exporter \
--set auth0.domain="$DOMAIN" --set auth0.token="$TOKEN" \
--set exporter.tls.disabled=true
--set exporter.tls.disabled=true
```

{{ template "chart.requirementsSection" . }}
Expand Down
4 changes: 2 additions & 2 deletions pkg/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const docTemplate = `{

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.0.3",
Host: "localhost:9301",
Version: "0.0.2",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{},
Title: "Auth0 simple exporter",
Expand Down
4 changes: 2 additions & 2 deletions pkg/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"name": "Apache 2.0",
"url": "https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE"
},
"version": "0.0.3"
"version": "0.0.2"
},
"host": "localhost:9301",
"host": "localhost:8080",
"basePath": "/",
"paths": {
"/metrics": {
Expand Down
4 changes: 2 additions & 2 deletions pkg/docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
basePath: /
host: localhost:9301
host: localhost:8080
info:
contact:
name: Oluwole Fadeyi (@tfadeyi)
Expand All @@ -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.0.3
version: 0.0.2
paths:
/metrics:
get:
Expand Down
4 changes: 2 additions & 2 deletions pkg/exporter/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

// @title Auth0 simple exporter
// @version 0.0.3
// @version 0.0.2
// @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.

Expand All @@ -25,7 +25,7 @@ import (
// @license.name Apache 2.0
// @license.url https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE

// @host localhost:9301
// @host localhost:8080
// @BasePath /

// Export configures the exporter Router and starts the server with the given configuration
Expand Down

0 comments on commit 942348f

Please sign in to comment.