From a5387d75c74664c0c9718cb4fc15afef2298cc11 Mon Sep 17 00:00:00 2001 From: Radek Chrzanowski Date: Tue, 28 Dec 2021 08:03:22 +0100 Subject: [PATCH] gh actions added for checking link correctnes in documentation (#282) --- .github/workflows/markdown-links-check.yaml | 20 ++++++++++++++++++++ .github/workflows/markdown-links-config.json | 7 +++++++ docs/architecture.md | 2 +- docs/configuration.md | 8 ++++---- docs/development.md | 2 +- docs/features/multi_dc_support.md | 2 +- docs/integrations/envoy.md | 6 +++--- 7 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/markdown-links-check.yaml create mode 100644 .github/workflows/markdown-links-config.json diff --git a/.github/workflows/markdown-links-check.yaml b/.github/workflows/markdown-links-check.yaml new file mode 100644 index 000000000..5c0d1f02b --- /dev/null +++ b/.github/workflows/markdown-links-check.yaml @@ -0,0 +1,20 @@ +name: Markdown Links Check + +on: + schedule: + - cron: "0 8 * * MON" # runs every monday at 8 am + workflow_dispatch: + push: + paths: + - 'docs/**' + +jobs: + check-links: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-verbose-mode: 'yes' + folder-path: 'docs' + config-file: '.github/workflows/markdown-links-config.json' diff --git a/.github/workflows/markdown-links-config.json b/.github/workflows/markdown-links-config.json new file mode 100644 index 000000000..e9cb58483 --- /dev/null +++ b/.github/workflows/markdown-links-config.json @@ -0,0 +1,7 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost" + } + ] +} diff --git a/docs/architecture.md b/docs/architecture.md index e247e47c5..8d0f77b9e 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -56,4 +56,4 @@ You can easily replace it with your framework of choice - Envoy Control module a ### Extensibility If you want to extend Envoy Control you can either depend on Envoy Control module and create your own Runner or you can -depend on the Envoy Control Runner itself and provide only minimal modifications. \ No newline at end of file +depend on the Envoy Control Runner itself and provide only minimal modifications. diff --git a/docs/configuration.md b/docs/configuration.md index 5f8a9c5b2..732ba5aee 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -118,9 +118,9 @@ Property Property | Description | Default value ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- **envoy-control.envoy.snapshot.load-balancing.weights.enabled** | if set to true, weighted load balancing will be enabled | false -**envoy-control.envoy.snapshot.load-balancing.canary.enabled** | if set to true, routing to canary instances based on *canary header* will be enabled (corresponding Envoy static config is required, see [docs](../features/load_balancing)) | false -**envoy-control.envoy.snapshot.load-balancing.canary.metadata-key** | metadata that will be set for canary EDS endpoints - key (must match Envoy static `header_to_metadata` filter config, see [docs](../features/load_balancing)) | canary -**envoy-control.envoy.snapshot.load-balancing.canary.header-value** | only when *canary header* is set to this value request will be routed to canary instances (*canary header* name is set in Envoy static config, see [docs](../features/load_balancing)) | 1 +**envoy-control.envoy.snapshot.load-balancing.canary.enabled** | if set to true, routing to canary instances based on *canary header* will be enabled (corresponding Envoy static config is required, see [docs](features/load_balancing.md)) | false +**envoy-control.envoy.snapshot.load-balancing.canary.metadata-key** | metadata that will be set for canary EDS endpoints - key (must match Envoy static `header_to_metadata` filter config, see [docs](features/load_balancing.md)) | canary +**envoy-control.envoy.snapshot.load-balancing.canary.header-value** | only when *canary header* is set to this value request will be routed to canary instances (*canary header* name is set in Envoy static config, see [docs](features/load_balancing.md)) | 1 **envoy-control.envoy.snapshot.load-balancing.policy** | load balancing policy used for clusters. [Accepted values](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/cds.proto.html#enum-cluster-lbpolicy) | LEAST_REQUEST **envoy-control.envoy.snapshot.load-balancing.use-keys-subset-fallback-policy** | KEYS_SUBSET fallback policy is used by default when canary and service-tags are enabled. It is not supported in Envoy <= 1.12.x. Set to false for compatibility with Envoy 1.12.x | true @@ -155,7 +155,7 @@ Property Property | Description | Default value --------------------------------------------------------------------------------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- **envoy-control.envoy.snapshot.localService.retryPolicy.\.enabled** | Enable retry policy for localService | false -**envoy-control.envoy.snapshot.localService.retryPolicy.\.retry-on** | When should envoy retry request [Envoy V2 API retry-on](https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter#x-envoy-retry-on) | empty list +**envoy-control.envoy.snapshot.localService.retryPolicy.\.retry-on** | When should envoy retry request [Envoy V2 API retry-on](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on) | empty list **envoy-control.envoy.snapshot.localService.retryPolicy.\.num-retries** | Number of retries | 1 **envoy-control.envoy.snapshot.localService.retryPolicy.\.per-try-timeout** | Specifies a non-zero upstream timeout per retry attempt | 0ms **envoy-control.envoy.snapshot.localService.retryPolicy.\.host-selection-retry-max-attempts** | The maximum number of times host selection will be reattempted before request being routed to last selected host | 1 diff --git a/docs/development.md b/docs/development.md index 3fcb19f45..85f89347a 100644 --- a/docs/development.md +++ b/docs/development.md @@ -45,6 +45,6 @@ The package should be available in `{root}/envoy-control-runner/build/distributi To apply [ktlint](https://ktlint.github.io/) formatting rules to IntelliJ IDEA. Run: `./gradlew ktlintApplyToIdea` ## Linter -A linter - [detekt](https://arturbosch.github.io/detekt/) runs when Envoy Control is built. You can run it separately: +A linter - [detekt](https://detekt.github.io/detekt/) runs when Envoy Control is built. You can run it separately: `./gradlew detekt`. diff --git a/docs/features/multi_dc_support.md b/docs/features/multi_dc_support.md index bc2f34531..54f5439ca 100644 --- a/docs/features/multi_dc_support.md +++ b/docs/features/multi_dc_support.md @@ -18,7 +18,7 @@ The extra challenge here is to not end up in an infinite loop. ### Instance synchronization The second strategy is to have all instances from all clusters available in Envoy but with different -[priorities](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/load_balancing/priority). +[priorities](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/priority). Only if there are no instances in the local cluster, an instance from remote cluster will be used. The main benefit of this approach is a lack of single point of failure and maintainability at the cost of extra logic in Control Plane. diff --git a/docs/integrations/envoy.md b/docs/integrations/envoy.md index 80f659bd1..d0c09f327 100644 --- a/docs/integrations/envoy.md +++ b/docs/integrations/envoy.md @@ -37,7 +37,7 @@ in Envoy metadata config. Envoy Control will pick it up and use ADS for this nod ## Outlier detection You can configure global -[outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/outlier#arch-overview-outlier-detection) +[outlier detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier#arch-overview-outlier-detection) for all clusters with properties [described here](../configuration.md#outlier-detection). ## Retry policy @@ -62,6 +62,6 @@ By default Envoy Control will set HTTP/1 for all clusters under it's control. A preferred protocol for communication is HTTP/2 whenever it's available. If you have a heterogeneous environment and only some of your services support HTTP2 or run Envoy you might want to tweak this option. Based on `envoy-control.envoy.snapshot.egress.http2.enabled` -Envoy Control will enable Http2 for clusters that have a [tag](https://github.com/allegro/envoy-control/blob/master/envoy-control-services/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/services/ServiceInstance.kt#L5) -with a value equal to property `envoy-control.envoy.snapshot.egress.http2.tagName` only when it's present on every [instance](https://github.com/allegro/envoy-control/blob/master/envoy-control-services/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/services/ServiceInstance.kt). +Envoy Control will enable Http2 for clusters that have a [tag](https://github.com/allegro/envoy-control/blob/master/envoy-control-services/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/services/ServiceInstances.kt#L5) +with a value equal to property `envoy-control.envoy.snapshot.egress.http2.tagName` only when it's present on every [instance](https://github.com/allegro/envoy-control/blob/master/envoy-control-services/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/services/ServiceInstances.kt). By default `tagName` is `envoy` so if one of your discovery service sources uses that you need to change the value of `tagName`.