Skip to content

Commit b09753e

Browse files
Resolve comments
1 parent fc6e7a4 commit b09753e

File tree

1 file changed

+84
-20
lines changed

1 file changed

+84
-20
lines changed

articles/azure-app-configuration/reference-kubernetes-provider.md

Lines changed: 84 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If the `spec.target.configMapData` property is not set, the generated ConfigMap
3737

3838
|Name|Description|Required|Type|
3939
|---|---|---|---|
40-
|type|The type that indicates how the retrieved data is constructed in the generated ConfigMap. The allowed values include `default`, `json`, `yaml` and `properties`|optional|string|
40+
|type|The setting that indicates how the retrieved data is constructed in the generated ConfigMap. The allowed values include `default`, `json`, `yaml` and `properties`|optional|string|
4141
|key|The key name of the retrieved data when the `type` is set to `json`, `yaml` or `properties`. Set it to the file name if the ConfigMap is set up to be consumed as a mounted file|conditional|string|
4242

4343
If the `spec.auth` property isn't set, the system-assigned managed identity is used. It has the following child properties. Only one authentication method should be set.
@@ -297,7 +297,19 @@ spec:
297297

298298
Applications running in Kubernetes typically consume the ConfigMap either as environment variables or as configuration files. If the `configMapData.type` property is absent or is set to environment variables, the ConfigMap is populated with the itemized list of data retrieved from Azure App Configuration, which can be easily consumed as environment variables. If the `configMapData.type` property is set to json, yaml or properties, data retrieved from Azure App Configuration is grouped into one item with key name specified by the `configMapData.key` property in the generated ConfigMap, which can be consumed as a mounted file.
299299

300-
For example, you can create an `AzureAppConfigurationProvider` with following settings to populate the ConfigMap with grouped values in json type.
300+
Following examples show you how the data is populated in the generated ConfigMap with different setting of `configMapData.type` property.
301+
302+
Assume these key-values are selected from Azure App Configuration:
303+
304+
|key|value|
305+
|---|---|
306+
|key1|value1|
307+
|key2|value2|
308+
|key3|value3|
309+
310+
#### [default](#tab/default)
311+
312+
Use the following sample `AzureAppConfigurationProvider` with `configMapData.type` property absent or set to `default`.
301313

302314
``` yaml
303315
apiVersion: azconfig.io/v1beta1
@@ -308,25 +320,23 @@ spec:
308320
endpoint: <your-app-configuration-store-endpoint>
309321
target:
310322
configMapName: configmap-created-by-appconfig-provider
311-
configMapData:
312-
type: json
313-
key: appSettings.json
314-
keyValues:
315-
selectors:
316-
- keyFilter: key1, key2, key3
317323
```
324+
or
318325

319-
Assume these key-values are selected from Azure App Configuration:
320-
321-
|key|value|
322-
|---|---|
323-
|key1|value1|
324-
|key2|value2|
325-
|key3|value3|
326-
327-
The data of generated ConfigMap with different setting of `configMapData.type` property would be:
326+
``` yaml
327+
apiVersion: azconfig.io/v1beta1
328+
kind: AzureAppConfigurationProvider
329+
metadata:
330+
name: appconfigurationprovider-sample
331+
spec:
332+
endpoint: <your-app-configuration-store-endpoint>
333+
target:
334+
configMapName: configmap-created-by-appconfig-provider
335+
configMapData:
336+
type: default
337+
```
328338

329-
#### [default](#tab/default)
339+
The generated ConfigMap is populated with the following data:
330340

331341
``` yaml
332342
data:
@@ -337,6 +347,24 @@ data:
337347

338348
#### [json](#tab/json)
339349

350+
Use the following sample `AzureAppConfigurationProvider` with `configMapData.type` property set to `json`.
351+
352+
``` yaml
353+
apiVersion: azconfig.io/v1beta1
354+
kind: AzureAppConfigurationProvider
355+
metadata:
356+
name: appconfigurationprovider-sample
357+
spec:
358+
endpoint: <your-app-configuration-store-endpoint>
359+
target:
360+
configMapName: configmap-created-by-appconfig-provider
361+
configMapData:
362+
type: json
363+
key: appSettings.json
364+
```
365+
366+
The generated ConfigMap is populated with the following data:
367+
340368
``` yaml
341369
data:
342370
appSettings.json: >-
@@ -345,19 +373,55 @@ data:
345373

346374
#### [yaml](#tab/yaml)
347375

376+
Use the following sample `AzureAppConfigurationProvider` with `configMapData.type` property set to `yaml`.
377+
378+
``` yaml
379+
apiVersion: azconfig.io/v1beta1
380+
kind: AzureAppConfigurationProvider
381+
metadata:
382+
name: appconfigurationprovider-sample
383+
spec:
384+
endpoint: <your-app-configuration-store-endpoint>
385+
target:
386+
configMapName: configmap-created-by-appconfig-provider
387+
configMapData:
388+
type: yaml
389+
key: appSettings.yaml
390+
```
391+
392+
The generated ConfigMap is populated with the following data:
393+
348394
``` yaml
349395
data:
350-
appSettings.json: >-
396+
appSettings.yaml: >-
351397
key1: value1
352398
key2: value2
353399
key3: value3
354400
```
355401

356402
#### [properties](#tab/properties)
357403

404+
Use the following sample `AzureAppConfigurationProvider` with `configMapData.type` property set to `properties`.
405+
406+
``` yaml
407+
apiVersion: azconfig.io/v1beta1
408+
kind: AzureAppConfigurationProvider
409+
metadata:
410+
name: appconfigurationprovider-sample
411+
spec:
412+
endpoint: <your-app-configuration-store-endpoint>
413+
target:
414+
configMapName: configmap-created-by-appconfig-provider
415+
configMapData:
416+
type: properties
417+
key: app.properties
418+
```
419+
420+
The generated ConfigMap is populated with the following data:
421+
358422
``` yaml
359423
data:
360-
appSettings.json: >-
424+
app.properties: >-
361425
key1=value1
362426
key2=value2
363427
key3=value3

0 commit comments

Comments
 (0)