Skip to content

Commit

Permalink
Remove username parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak committed Dec 2, 2022
1 parent a0d97f6 commit 7f34d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ http://status-cake-exporter.default.svc:8000

| Setting | Required | Default |
|--------------------------------------|----------|---------|
| USERNAME | Yes | Null |
| API_KEY | Yes | Null |
| TAGS | No | Null |
| LOG_LEVEL | No | info |
Expand All @@ -34,14 +33,13 @@ http://status-cake-exporter.default.svc:8000
The following will expose the exporter at `localhost:8000`:

```sh
export USERNAME=statuscakeuser
export API_KEY=xxxxxxxx
docker run -d -p 8000:8000 --env USERNAME --env API_KEY ghcr.io/chelnak/status-cake-exporter:latest
docker run -d -p 8000:8000 --env API_KEY ghcr.io/chelnak/status-cake-exporter:latest
```

### Kubernetes

To get up and running quickly, use [examples/manifest.yml](examples/manifest.yml) as an example. You will need to create a secret named `status-cake-api-token` containing your `USERNAME` and `API_KEY` first.
To get up and running quickly, use [examples/manifest.yml](examples/manifest.yml) as an example. You will need to create a secret named `status-cake-api-token` containing your `API_KEY` first.

Otherwise, you can use the Helm Chart provided in [chart/status-cake-exporter](chart/status-cake-exporter/README.md).

Expand All @@ -55,8 +53,6 @@ To get up and running quickly, use [examples/grafana-example.json](examples/graf
Usage: status-cake-exporter [OPTIONS]

Options:
--username TEXT Username for the account. This is only required for
legacy accounts. [env var: USERNAME]
--api-key TEXT API Key for the account. [env var: API_KEY;
required]
--tags TEXT A comma separated list of tags used to filter tests
Expand Down
11 changes: 0 additions & 11 deletions status_cake_exporter/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@


def exporter(
username: str = typer.Option(
"",
help="Username for the account. This is only required for legacy accounts. (DEPRECATED)",
envvar="USERNAME",
),
api_key: str = typer.Option(..., help="API Key for the account.", envvar="API_KEY"),
tags: str = typer.Option(
"",
Expand All @@ -40,7 +35,6 @@ def exporter(
The entry point for the exporter. This will start the exporter and begin collecting metrics.
Args:
username: The username for the account. This is only required for legacy accounts.
api_key: The api key for the account.
tags: A comma separated list of tags used to filter tests returned from the api.
log_level: The log level of the application. Value can be one of {debug, info, warn, error}.
Expand All @@ -51,11 +45,6 @@ def exporter(
try:
configure_logging(log_level)

if username:
logger.warning(
"The username option is deprecated and will be removed in a future release."
)

logger.info(f"Starting web server on port: {port}")
start_http_server(port)

Expand Down

0 comments on commit 7f34d8d

Please sign in to comment.