From 468b3f86c5ffc3995ae17e7847ac484691fc4f29 Mon Sep 17 00:00:00 2001 From: Suraiya Hameed <22776421+Suraiya-Hameed@users.noreply.github.com> Date: Wed, 12 Feb 2025 10:24:50 -0800 Subject: [PATCH 1/6] feat: add docs for custom Azure cloud support https://github.com/tomkerkhove/promitor/pull/2579 --- docs/faq.md | 6 +++--- .../declaring-resource-discovery-groups.md | 10 +++++++++- docs/scraping/overview.md | 12 +++++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index c0124b47..9142fe5e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -54,11 +54,11 @@ We have it on [our backlog](https://github.com/tomkerkhove/promitor/issues/761) ## What Azure clouds are supported? -We support `Global` (default), `China`, `UsGov` & `Germany` Azure clouds. +We support `Global` (default), `China`, `UsGov`, `Germany` & `Custom` Azure clouds. -This can be configured in the metric configuration under `azureMetadata`. +This can be configured in the metric configuration under `azureMetadata` and in resource discovery configuration under `azureLandscape` -For more information see our ['Metric Configuration' page](scraping/overview.md). +For more information see our ['Metric Configuration' page](scraping/overview.md) and [`Resource Discovery` page](resource-discovery/declaring-resource-discovery-groups.md). ## Why does Azure Blob & File Storage only report account-level information? diff --git a/docs/resource-discovery/declaring-resource-discovery-groups.md b/docs/resource-discovery/declaring-resource-discovery-groups.md index de1fafe8..55f6d2e1 100644 --- a/docs/resource-discovery/declaring-resource-discovery-groups.md +++ b/docs/resource-discovery/declaring-resource-discovery-groups.md @@ -58,7 +58,15 @@ values are `v1`. *(Required)* - `azureLandscape.tenantId` - The id of the Azure tenant that will be queried. *(Required)* - `azureLandscape.subscriptions` - List of Azure subscriptions in the Azure tenant to discover resources in. *(Required)* -- `azureLandscape.cloud` - The name of the Azure cloud to use. Options are `Global` (default), `China`, `UsGov` & `Germany`. +- `azureLandscape.cloud` - The name of the Azure cloud to use. Options are `Global` + (default), `China`, `UsGov`, `Germany`, & `Custom`. +- `azureLandscape.endpoints` - Required when `azureLandscape.cloud` is set to `Custom`. Defines the custom endpoints to use: + - `authenticationEndpoint` - The custom authentication endpoint. + - `managementEndpoint` - The custom service management endpoint. + - `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint. + - `graphEndpoint` - The custom Active Directory graph endpoint. + - `storageEndpointSuffix` - The custom storage service url suffix. + - `keyVaultSuffix` - The custom Key Vault service url suffix. ### Resource Discovery Groups diff --git a/docs/scraping/overview.md b/docs/scraping/overview.md index eefa83a3..e48266d3 100644 --- a/docs/scraping/overview.md +++ b/docs/scraping/overview.md @@ -75,7 +75,17 @@ values are `v1`. *(Required)* - `azureMetadata.subscriptionId` - The id of the default subscription to query. - `azureMetadata.resourceGroupName` - The name of the default resource group to query. - `azureMetadata.cloud` - The name of the Azure cloud to use. Options are `Global` - (default), `China`, `UsGov` & `Germany`. + (default), `China`, `UsGov`, `Germany`, & `Custom`. +- `azureMetadata.endpoints` - Required when `azureMetadata.cloud` is set to `Custom`. Defines the custom endpoints to use: + - `authenticationEndpoint` - The custom authentication endpoint. + - `managementEndpoint` - The custom service management endpoint. + - `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint. + - `graphEndpoint` - The custom Active Directory graph endpoint. + - `storageEndpointSuffix` - The custom storage service url suffix. + - `keyVaultSuffix` - The custom Key Vault service url suffix. + - `metricsQueryAudience` - The custom audiences available for metrics query. + - `metricsClientAudience` - The custom audiences available for metrics client. + - `logAnalyticsEndpoint` - The custom log analytics endpoint. *(Required only if Azure Log Analytics resource is configured for scraping)* ### Metric Defaults From f90dd057a9942a64b646a3a20d9f6af13d562996 Mon Sep 17 00:00:00 2001 From: Suraiya Hameed <22776421+Suraiya-Hameed@users.noreply.github.com> Date: Wed, 12 Feb 2025 10:57:34 -0800 Subject: [PATCH 2/6] Remove the deprecated tags_file option --- docs/tags.md | 2 +- mkdocs.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/tags.md b/docs/tags.md index 422b139e..3b49781c 100644 --- a/docs/tags.md +++ b/docs/tags.md @@ -2,4 +2,4 @@ Following is a list of relevant tags: -[TAGS] \ No newline at end of file + \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 6eff271f..7bbc9da6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -68,8 +68,7 @@ plugins: - mike: version_selector: true # set to false to leave out the version selector - search - - tags: - tags_file: tags.md + - tags - htmlproofer: enabled: True raise_error: True From acd2284f3bb17a84d1292a29065232e064685a49 Mon Sep 17 00:00:00 2001 From: Suraiya Hameed <22776421+Suraiya-Hameed@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:25:21 -0800 Subject: [PATCH 3/6] skip 403 for external link --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 7bbc9da6..ee4090c7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -77,6 +77,7 @@ plugins: 404: ['https://www.nuget.org/packages/NetEscapades.Configuration.Yaml'] # No idea why this is failing, but it is. 405: ['*'] 520: ['*'] + 403: ['https://www.mend.io/free-developer-tools/blog/overcoming-dockers-mutable-image-tags/'] # Customization extra: From cc51eb5f3374c69a6eb11697eaace3a5461dc4d2 Mon Sep 17 00:00:00 2001 From: Suraiya Hameed <22776421+Suraiya-Hameed@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:39:23 -0800 Subject: [PATCH 4/6] Upsate example with custom cloud endpoints --- docs/scraping/overview.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/scraping/overview.md b/docs/scraping/overview.md index e48266d3..33f36226 100644 --- a/docs/scraping/overview.md +++ b/docs/scraping/overview.md @@ -140,9 +140,9 @@ Additionally, the following fields are optional: ### Example -Here is an example of how you can scrape two Azure Service Bus queues in different +Here is an example of how you can scrape two Azure Service Bus queues in different resource groups, one in the `promitor` resource group and one on the `promitor-dev` -resource group: +resource group. This example also shows custom cloud endpoints configuration: ```yaml version: v1 @@ -150,7 +150,16 @@ azureMetadata: tenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx subscriptionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy resourceGroupName: promitor - cloud: China + cloud: Cloud + endpoints: + authenticationEndpoint: https://custom.auth.endpoint.com + managementEndpoint: https://custom.svc.management.endpoint.com + resourceManagerEndpoint: https://custom.resource.management.endpoint.com + graphEndpoint: https://custom.graph.endpoint.com + storageEndpointSuffix: custom.windows.net + keyVaultSuffix: custom.vault.azure.net + metricsQueryAudience: https://custom.metric.query.endpoint.com + metricsClientAudience: https://custom.metric.client.endpoint.com metricDefaults: aggregation: interval: 00:05:00 From b056e24bab9ce4ba4cec38137f32720fb937e830 Mon Sep 17 00:00:00 2001 From: Tom Kerkhove Date: Tue, 18 Feb 2025 09:20:14 +0100 Subject: [PATCH 5/6] fix: Use appropriate cloud sample Co-authored-by: amirschw <24677563+amirschw@users.noreply.github.com> Signed-off-by: Tom Kerkhove --- docs/scraping/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/scraping/overview.md b/docs/scraping/overview.md index 33f36226..ff74b1e3 100644 --- a/docs/scraping/overview.md +++ b/docs/scraping/overview.md @@ -150,7 +150,7 @@ azureMetadata: tenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx subscriptionId: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy resourceGroupName: promitor - cloud: Cloud + cloud: Custom endpoints: authenticationEndpoint: https://custom.auth.endpoint.com managementEndpoint: https://custom.svc.management.endpoint.com From 5db3c9f32681d19954924a6857ec4507dbcee20c Mon Sep 17 00:00:00 2001 From: Suraiya Hameed <22776421+Suraiya-Hameed@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:35:26 -0800 Subject: [PATCH 6/6] update sample resource discovery --- .../declaring-resource-discovery-groups.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/resource-discovery/declaring-resource-discovery-groups.md b/docs/resource-discovery/declaring-resource-discovery-groups.md index 55f6d2e1..07475ac9 100644 --- a/docs/resource-discovery/declaring-resource-discovery-groups.md +++ b/docs/resource-discovery/declaring-resource-discovery-groups.md @@ -15,7 +15,7 @@ As part of the resource discovery group declaration, you can choose to filter re with which the resources have to be annotated. - **Regions** - Defines a list of Azure regions in which the regions the resources are located. -Here is an example of a full declaration: +Here is an example of a full declaration using a custom cloud: ```yaml version: v1 @@ -25,7 +25,14 @@ azureLandscape: - SUBSCRIPTON-ID-ABC - SUBSCRIPTON-ID-DEF - SUBSCRIPTON-ID-GHI - cloud: China + cloud: Custom + endpoints: + authenticationEndpoint: https://custom-authentication-endpoint + managementEndpoint: https://custom-management-endpoint + resourceManagerEndpoint: https://custom-resource-manager-endpoint + graphEndpoint: https://custom-graph-endpoint + storageEndpointSuffix: custom-storage-endpoint-suffix + keyVaultSuffix: custom-key-vault-suffix resourceDiscoveryGroups: - name: container-registry-landscape type: ContainerRegistry