Incorrect use of 'subscriptions:' vs. 'subscriptionIds:' in resource discovery configuration in documentation and source code #1489
-
Throughout the promitor.io website and the GitHub site, there are multiple sample .yaml configurations for resource discovery. Some of these samples use a node named 'subscriptions' while others name that node 'subscriptionIds'. When resource discovery is deployed with a configuration file that uses 'subscriptions', the pod goes into a CrashLoopBackOff state, and the logs show the following error: Promitor Discovery Agent has encountered an unexpected error. Please open an issue at https://github.com/tomkerkhove/promitor/issues to let us know about it. Expected BehaviorThe documentation and source code samples for resource discovery configuration should all use valid schema. Actual BehaviorThe schema used is inconsistent, resulting in deployments that fail on startup. Steps to Reproduce the ProblemThe following URLs and source code uses the 'subscriptions' rather than 'subscriptionIds' in its sample configuration:
When a deployment is used with this schema, it fails to start. Specifications
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
Thanks for reporting!
Would it be possible to share your full declaration and logs please, so that I can have a look? |
Beta Was this translation helpful? Give feedback.
-
Also, where did you see that it should be |
Beta Was this translation helpful? Give feedback.
-
I understand that is what that particular documentation claims to be correct, but it contradicts other Promitor documentation, and attempting to deploy with both of those values shows that only subscriptionIds results in a valid deployment. Here is a deployment declaration using the 'subscriptionIds' and deployed via the helm chart as suggested at https://promitor.io/deployment/resource-discovery/: (NOTE: the markup is interpreting my yaml dashes as bullet points, apologize... I'm not sure how to escape those) version: v1
The deployment declaration above deploys correctly and the pod starts: Here is the same deployment declaration, but using 'subscriptions': The Promitor charts repo also supports the use of subscriptionIds: https://github.com/promitor/charts/blob/main/examples/promitor-agent-resource-discovery.config.yaml ...and subscriptionIds are used in some areas of the promitor.io site as well: https://promitor.io/deployment/resource-discovery/ ...but this contradicts other places in documentation, which suggest using subscriptions: https://promitor.io/configuration/v2.x/resource-discovery.html |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing! So you are deploying through Helm then?
I'll check this asap!
- Tom Kerkhove
…________________________________
From: Chad Coon <[email protected]>
Sent: Friday, February 5, 2021 8:42:55 PM
To: tomkerkhove/promitor <[email protected]>
Cc: Tom Kerkhove <[email protected]>; Comment <[email protected]>
Subject: Re: [tomkerkhove/promitor] Incorrect use of 'subscriptions:' vs. 'subscriptionIds:' in resource discovery configuration in documentation and source code (#1479)
I understand that is what that particular documentation claims to be correct, but it contradicts other Promitor documentation, and attempting to deploy with both of those values shows that only subscriptionIds results in a valid deployment.
Here is a deployment declaration using the 'subscriptionIds' and deployed via the helm chart as suggested at https://promitor.io/deployment/resource-discovery/<url>:
(NOTE: the markup is interpreting my yaml dashes as bullet points, apologize... I'm not sure how to escape those)
version: v1
azureLandscape:
tenantId:
subscriptionIds:
* 8b7abd21-5f1f-46ab-9173-ddc5db02e724
cloud: Global
resourceDiscoveryGroups:
* name: cosmos-db
type: CosmosDb
The deployment declaration above deploys correctly and the pod starts:
[subscriptionIds 1]<https://user-images.githubusercontent.com/40893895/107080349-c4e54280-67b6-11eb-9f59-314821d7d765.PNG>
[subscriptionIds 2]<https://user-images.githubusercontent.com/40893895/107080365-cb73ba00-67b6-11eb-83b7-45ab26d37e7e.PNG>
Here is the same deployment declaration, but using 'subscriptions':
[subscriptions 1]<https://user-images.githubusercontent.com/40893895/107080405-db8b9980-67b6-11eb-95fa-1515b7574ad6.PNG>
[subscriptions 2]<https://user-images.githubusercontent.com/40893895/107080429-e1817a80-67b6-11eb-88e6-02549c44b01b.PNG>
The Promitor charts repo also supports the use of subscriptionIds:
https://github.com/promitor/charts/blob/main/examples/promitor-agent-resource-discovery.config.yaml<url>
...and subscriptionIds are used in some areas of the promitor.io site as well:
https://promitor.io/deployment/resource-discovery/<url>
...but this contradicts other places in documentation, which suggest using subscriptions:
https://promitor.io/configuration/v2.x/resource-discovery.html<url>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1479 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABBE6P6GUTGE2DRFX2DAEBLS5RC37ANCNFSM4XDDHZGQ>.
|
Beta Was this translation helpful? Give feedback.
-
Update... I'm attempting to run the resource discovery API project locally to debug some issues. During that, I discovered that when providing the config through a local folder (C:\config), it requires the opposite of what the helm chart requires. The helm chart requires 'subscriptionIds', but when providing the config locally, the validator requires 'subscriptions'. So my guess is that the helm chart is loading 'subscriptionIds', and then doing some sort of translation and loading the values into 'subscriptions' for the API runtime. |
Beta Was this translation helpful? Give feedback.
-
Yes, that was what I was going to look for. I'll update the Helm chart, sorry about that! |
Beta Was this translation helpful? Give feedback.
Yes, that was what I was going to look for.
I'll update the Helm chart, sorry about that!