Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rename azureLandscape.subscriptionIds to azureLandscape.subscriptionIds to avoid confusion #29

Merged
merged 1 commit into from
Feb 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/promitor-agent-resource-discovery.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ azureAuthentication:
azureLandscape:
cloud: Global
tenantId: c8819874-9e56-4e3f-b1a8-1c0325138f27
subscriptionIds:
subscriptions:
- 0329dd2a-59dc-4493-aa54-cb01cb027dc2
- 0f9d7fea-99e8-4768-8672-06a28514f77e
resourceDiscoveryGroups:
Expand Down
2 changes: 1 addition & 1 deletion promitor-agent-resource-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ their default values.
| `image.pullPolicy` | Policy to pull image | `Always` |
| `azureLandscape.cloud` | Azure Cloud to discover resources in. Options are `Global` (default), `China`, `UsGov` & `Germany` | `Global` |
| `azureLandscape.tenantId` | Id of Azure tenant to discover resources in | |
| `azureLandscape.subscriptionIds` | List of Azure subscription ids to discover resources in | `[]` |
| `azureLandscape.subscriptions` | List of Azure subscription ids to discover resources in | `[]` |
| `resourceDiscoveryGroups` | List of resource discovery groups to configured following the [resource discovery declaration docs](https://promitor.io/configuration/v2.x/resource-discovery) | |
| `azureAuthentication.appId` | Id of the Azure AD entity to authenticate with | |
| `azureAuthentication.appKey` | Secret of the Azure AD entity to authenticate with | |
Expand Down
6 changes: 6 additions & 0 deletions promitor-agent-resource-discovery/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $resourceDiscoveryGroups := toYaml .Values.resourceDiscoveryGroups -}}
{{- $subscriptionIds := toYaml .Values.azureLandscape.subscriptionIds -}}
{{- $subscriptions := toYaml .Values.azureLandscape.subscriptions -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -34,7 +35,12 @@ data:
azureLandscape:
tenantId: {{ .Values.azureLandscape.tenantId }}
subscriptions:
{{- if .Values.azureLandscape.subscriptionIds }}
{{ tpl $subscriptionIds . | indent 6 }}
{{- end }}
{{- if .Values.azureLandscape.subscriptions }}
{{ tpl $subscriptions . | indent 6 }}
{{- end }}
cloud: {{ .Values.azureLandscape.cloud }}
resourceDiscoveryGroups:
{{ tpl $resourceDiscoveryGroups . | indent 4 }}
2 changes: 2 additions & 0 deletions promitor-agent-resource-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ telemetry:
azureLandscape:
cloud: Global
tenantId:
subscriptions: []
# This field is deprecated, use subscriptions instead please
subscriptionIds: []

resourceDiscoveryGroups: []
Expand Down