From bb47a34482b60c7e849c1eb3f491921f8d5d8d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 May 2023 11:18:28 +0200 Subject: [PATCH] Fix more references to old doc location --- .dockerignore | 1 - CHANGELOG.md | 2 +- Makefile.maker.yaml | 1 - README.md | 2 +- controllers/alert_rule.go | 2 +- docs/absence-alert-rule-definition.md | 2 +- .../resmgmt_kubernetes_absent_metric_alert_rules.yaml | 4 ++-- .../resmgmt_openstack_absent_metrics_alert_rules.yaml | 6 +++--- .../resmgmt_openstack_absent_metrics_alert_rules.yaml | 2 +- .../swift_openstack_absent_metric_alert_rules.yaml | 8 ++++---- 10 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5ff80abc..265fa70d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,6 +16,5 @@ README.md report.html shell.nix /testing/ -doc/ PROJECT RELEASE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b4fa4247..2c6abb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,7 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -- Support for determining `tier` label [heuristically](./doc/playbook.md) has been +- Support for determining `tier` label [heuristically](./docs/playbook.md) has been deprecated and will be removed in a later version. ## 0.8.0 - 2022-04-12 diff --git a/Makefile.maker.yaml b/Makefile.maker.yaml index 63f82f2c..a74f4492 100644 --- a/Makefile.maker.yaml +++ b/Makefile.maker.yaml @@ -14,7 +14,6 @@ coverageTest: dockerfile: enabled: true extraIgnores: - - doc/ - PROJECT - RELEASE.md diff --git a/README.md b/README.md index c3c00ea8..d4348f31 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ absent-metrics-operator --help ``` In case of a false positive, the operator can be disabled for a specific alert rule or the -entire `PrometheusRule` resource. Refer to the [playbook for operators](./doc/playbook.md#disable-the-operator) +entire `PrometheusRule` resource. Refer to the [playbook for operators](./docs/playbook.md#disable-the-operator) for instructions. ### Metrics diff --git a/controllers/alert_rule.go b/controllers/alert_rule.go index 9c2511b1..4bb69e05 100644 --- a/controllers/alert_rule.go +++ b/controllers/alert_rule.go @@ -272,7 +272,7 @@ func parseAlertRule(logger logr.Logger, in monitoringv1.Rule, opts LabelOpts) ([ "summary": fmt.Sprintf("missing %s", m), "description": fmt.Sprintf( "The metric '%s' is missing. '%s' alert using it may not fire as intended. "+ - "See .", + "See .", m, in.Alert, ), } diff --git a/docs/absence-alert-rule-definition.md b/docs/absence-alert-rule-definition.md index 508e7347..1dc719a1 100644 --- a/docs/absence-alert-rule-definition.md +++ b/docs/absence-alert-rule-definition.md @@ -44,7 +44,7 @@ _absence alert rule_ would be `AbsentContainersLimesSuccessfulScrapesRate5m`. The values of `support_group` and `service` labels are only included in the name if the labels are specified in the `--keep-labels` flag. -The description also includes a [link](./doc/playbook.md) to the playbook for operators +The description also includes a [link](./docs/playbook.md) to the playbook for operators that can be referenced on how to deal with _absence alert rules_. ## Labels diff --git a/test/fixtures/resmgmt_kubernetes_absent_metric_alert_rules.yaml b/test/fixtures/resmgmt_kubernetes_absent_metric_alert_rules.yaml index f01897dd..ce700ed2 100644 --- a/test/fixtures/resmgmt_kubernetes_absent_metric_alert_rules.yaml +++ b/test/fixtures/resmgmt_kubernetes_absent_metric_alert_rules.yaml @@ -27,7 +27,7 @@ spec: description: The metric 'keppel_container_memory_usage_percent' is missing. 'OpenstackKeppelPodOOMExceedingLimits' alert using it may not fire as intended. - See . summary: missing keppel_container_memory_usage_percent @@ -43,6 +43,6 @@ spec: description: The metric 'kube_pod_failed_scheduling_memory_total' is missing. 'OpenstackKeppelPodSchedulingInsufficientMemory' alert using it may not - fire as intended. See . summary: missing kube_pod_failed_scheduling_memory_total diff --git a/test/fixtures/resmgmt_openstack_absent_metrics_alert_rules.yaml b/test/fixtures/resmgmt_openstack_absent_metrics_alert_rules.yaml index 2cfedc9f..fb283efc 100644 --- a/test/fixtures/resmgmt_openstack_absent_metrics_alert_rules.yaml +++ b/test/fixtures/resmgmt_openstack_absent_metrics_alert_rules.yaml @@ -26,7 +26,7 @@ spec: annotations: description: The metric 'http_requests_total' is missing. 'OpenstackLimesHttpErrors' - alert using it may not fire as intended. See . summary: missing http_requests_total @@ -41,7 +41,7 @@ spec: annotations: description: The metric 'limes_suspended_scrapes' is missing. 'OpenstackLimesSuspendedScrapes' - alert using it may not fire as intended. See . summary: missing limes_suspended_scrapes @@ -58,6 +58,6 @@ spec: annotations: description: The metric 'openstack_assignments_per_role' is missing. 'OpenstackLimesUnexpectedCloudViewerRoleAssignments' - alert using it may not fire as intended. See . summary: missing openstack_assignments_per_role diff --git a/test/fixtures/start-data/resmgmt_openstack_absent_metrics_alert_rules.yaml b/test/fixtures/start-data/resmgmt_openstack_absent_metrics_alert_rules.yaml index 8847f515..a9ac4c05 100644 --- a/test/fixtures/start-data/resmgmt_openstack_absent_metrics_alert_rules.yaml +++ b/test/fixtures/start-data/resmgmt_openstack_absent_metrics_alert_rules.yaml @@ -23,6 +23,6 @@ spec: annotations: description: The metric 'openstack_assignments_per_role' is missing. 'OpenstackLimesUnexpectedCloudViewerRoleAssignments' - alert using it may not fire as intended. See . summary: missing openstack_assignments_per_role diff --git a/test/fixtures/swift_openstack_absent_metric_alert_rules.yaml b/test/fixtures/swift_openstack_absent_metric_alert_rules.yaml index 17904733..3747d4b1 100644 --- a/test/fixtures/swift_openstack_absent_metric_alert_rules.yaml +++ b/test/fixtures/swift_openstack_absent_metric_alert_rules.yaml @@ -28,7 +28,7 @@ spec: annotations: description: The metric 'swift_cluster_md5_not_matched' is missing. 'OpenstackSwiftMismatchedConfig' - alert using it may not fire as intended. See . summary: missing swift_cluster_md5_not_matched @@ -44,7 +44,7 @@ spec: annotations: description: The metric 'swift_dispersion_task_exit_code' is missing. 'OpenstackSwiftHealthCheck' - alert using it may not fire as intended. See . summary: missing swift_dispersion_task_exit_code @@ -61,7 +61,7 @@ spec: description: The metric 'global:swift_cluster_storage_used_percent_average' is missing. 'OpenstackSwiftUsedSpace' alert using it may not fire as intended. - See . summary: missing global:swift_cluster_storage_used_percent_average @@ -77,6 +77,6 @@ spec: annotations: description: The metric 'swift_recon_task_exit_code' is missing. 'OpenstackSwiftHealthCheck' - alert using it may not fire as intended. See . summary: missing swift_recon_task_exit_code