-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: optimize metrics creation and add documentation
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
- Loading branch information
Showing
29 changed files
with
526 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Terraform Provider testing workflow. | ||
name: go-generate | ||
|
||
# This GitHub action runs your tests for each pull request and push. | ||
# Optionally, you can turn it on using a schedule for regular testing. | ||
on: | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
- 'tools/**' | ||
|
||
jobs: | ||
generate: | ||
name: Generate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 # v3.5.0 | ||
- uses: actions/setup-go@v5 # v4.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: go generate ./... | ||
- name: git diff | ||
run: | | ||
git diff --compact-summary --exit-code || \ | ||
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1) |
File renamed without changes.
6 changes: 2 additions & 4 deletions
6
.github/workflows/goproxy.yml → .github/workflows/go-proxy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: Unit tests | ||
|
||
on: | ||
pull_request_target: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
hide: | ||
- toc | ||
--- | ||
|
||
# Metrics | ||
|
||
kimup exposes metrics to monitor the performance. The metrics are exposed in the Prometheus format and can be scraped by Prometheus or any other monitoring tool that can scrape Prometheus. | ||
|
||
## Settings | ||
|
||
The following arguments can be used to configure the metrics *(Available in kimup-operator, kimup-controller and kimup-admission-controller)*: | ||
|
||
| Flag | Default | Description | | ||
| -------------- | -------- | ------------------------- | | ||
| --metrics | false | Enable metrics collection | | ||
| --metrics-port | :9080 | Port to expose metrics on | | ||
| --metrics-path | /metrics | Path to expose metrics on | | ||
|
||
|
||
## Metrics | ||
|
||
The following metrics are exposed: | ||
|
||
| Metrics | Description | | ||
| ---------------------------------------------- | ----------------------------------------------------------- | | ||
| kimup_actions_duration | The duration in seconds of action performed. | | ||
| kimup_actions_err_total | The total number of action performed with error. | | ||
| kimup_actions_total | The total number of action performed. | | ||
| kimup_admission_controller_patch_duration | The duration in seconds of patch in admission controller. | | ||
| kimup_admission_controller_patch_err_total | The total number of patch action performed with error. | | ||
| kimup_admission_controller_patch_total | The total number of patch action performed. | | ||
| kimup_admission_controller_request_duration | The duration in seconds of request in admission controller. | | ||
| kimup_admission_controller_request_error_total | The total number of request received with error. | | ||
| kimup_admission_controller_request_total | The total number of request received. | | ||
| kimup_events_duration | The duration in seconds of events performed. | | ||
| kimup_events_err_total | The total number of events performed with error. | | ||
| kimup_events_total | The total number of events performed. | | ||
| kimup_registry_duration | The duration in seconds of registry evaluated. | | ||
| kimup_registry_err_total | The total number of registry evaluated with error. | | ||
| kimup_registry_total | The total number of registry evaluated. | | ||
| kimup_rules_duration | The duration in seconds of rules evaluated. | | ||
| kimup_rules_err_total | The total number of rules evaluated with error. | | ||
| kimup_rules_total | The total number of rules evaluated. | | ||
| kimup_tags_duration | The duration in seconds for func tags to list the tags. | | ||
| kimup_tags_total | The total number of func tags is called to list tags. | | ||
| kimup_tags_total_err | The total number return by the func tags with error. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
hide: | ||
- toc | ||
--- | ||
|
||
# Metrics | ||
|
||
kimup exposes metrics to monitor the performance. The metrics are exposed in the Prometheus format and can be scraped by Prometheus or any other monitoring tool that can scrape Prometheus. | ||
|
||
## Settings | ||
|
||
The following arguments can be used to configure the metrics *(Available in kimup-operator, kimup-controller and kimup-admission-controller)*: | ||
|
||
{{ tableSettings }} | ||
|
||
## Metrics | ||
|
||
The following metrics are exposed: | ||
|
||
{{ tableMetrics }} |
Oops, something went wrong.