Skip to content

Commit

Permalink
fix: Rename azureLandscape.subscriptionIds to `azureLandscape.subsc…
Browse files Browse the repository at this point in the history
…riptionIds` to avoid confusion (#29)

Signed-off-by: Tom Kerkhove <[email protected]>
  • Loading branch information
tomkerkhove authored Feb 7, 2021
1 parent 616a961 commit 953d628
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
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

0 comments on commit 953d628

Please sign in to comment.