diff --git a/.mdox.validate.yaml b/.mdox.validate.yaml index f92581326..af11491d0 100644 --- a/.mdox.validate.yaml +++ b/.mdox.validate.yaml @@ -1,6 +1,8 @@ version: 1 timeout: "1m" +explicitLocalValidators: true + validators: # docs.github.com returns 403 if not in browser. Cannot curl as well. - regex: 'docs\.github\.com' @@ -20,3 +22,6 @@ validators: # Ignore GitHub container packages link as it returns 404 in curl, but works in browser - regex: 'https://github.com/prometheus-operator/prometheus-operator/pkgs/container/prometheus-operator' type: "ignore" + # Ignore links to /img/ because the generated content will resolve them correctly. + - regex: '/img/.+' + type: ignore diff --git a/Documentation/custom-metrics-elements.png b/Documentation/img/custom-metrics-elements.png similarity index 100% rename from Documentation/custom-metrics-elements.png rename to Documentation/img/custom-metrics-elements.png diff --git a/Documentation/troubleshooting.md b/Documentation/troubleshooting.md index e05b66377..323934ad4 100644 --- a/Documentation/troubleshooting.md +++ b/Documentation/troubleshooting.md @@ -50,7 +50,9 @@ When creating/deleting/modifying `ServiceMonitor` objects it is sometimes not as A common problem related to `ServiceMonitor` identification by Prometheus is related to an incorrect tagging, that does not match the `Prometheus` custom resource definition scope, or lack of permission for the Prometheus `ServiceAccount` to *get, list, watch* `Services` and `Endpoints` from the target application being monitored. As a general guideline consider the diagram below, giving an example of a `Deployment` and `Service` called `my-app`, being monitored by Prometheus based on a `ServiceMonitor` named `my-service-monitor`: - +<!-- do not change this link without verifying that the image will display correctly on https://prometheus-operator.dev --> + + Note: The `ServiceMonitor` references a `Service` (not a `Deployment`, or a `Pod`), by labels *and* by the port name in the `Service`. This *port name* is optional in Kubernetes, but must be specified for the `ServiceMonitor` to work. It is not the same as the port name on the `Pod` or container, although it can be. diff --git a/scripts/go.mod b/scripts/go.mod index cb452996a..7bb5e4f61 100644 --- a/scripts/go.mod +++ b/scripts/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/brancz/gojsontoyaml v0.1.0 - github.com/bwplotka/mdox v0.9.0 + github.com/bwplotka/mdox v0.9.1-0.20220712163347-7dcc385468d7 github.com/golangci/golangci-lint v1.46.2 github.com/google/go-jsonnet v0.18.0 github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 diff --git a/scripts/go.sum b/scripts/go.sum index 33845112a..3ae0f77cf 100644 --- a/scripts/go.sum +++ b/scripts/go.sum @@ -223,8 +223,8 @@ github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1x github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/bwplotka/mdox v0.9.0 h1:NRrJNWGDUjA2dWeWiJv/4WNQZp5+OcVYIHz94T6ksxs= -github.com/bwplotka/mdox v0.9.0/go.mod h1:d9tSrvKyHqgb/IuvvhncvLzbV1SfSfhH56ct1TOYncw= +github.com/bwplotka/mdox v0.9.1-0.20220712163347-7dcc385468d7 h1:HfWBdOFK+Ya2az0ck4DM/mer9TyFpwwnbCw0uMxQ5ow= +github.com/bwplotka/mdox v0.9.1-0.20220712163347-7dcc385468d7/go.mod h1:d9tSrvKyHqgb/IuvvhncvLzbV1SfSfhH56ct1TOYncw= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=