Skip to content

Commit 6af8af0

Browse files
Merge pull request #264171 from linglingye001/linglingye/k8sproviderv1.2.0
Update k8s provider reference for v1.2.0 release
2 parents a8fd4e8 + ec81e3e commit 6af8af0

File tree

1 file changed

+79
-20
lines changed

1 file changed

+79
-20
lines changed

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

Lines changed: 79 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: junbchen
1212

1313
# Azure App Configuration Kubernetes Provider reference
1414

15-
The following reference outlines the properties supported by the Azure App Configuration Kubernetes Provider.
15+
The following reference outlines the properties supported by the Azure App Configuration Kubernetes Provider `v1.2.0`. See [release notes](https://github.com/Azure/AppConfiguration/blob/main/releaseNotes/KubernetesProvider.md) for more information on the change.
1616

1717
## Properties
1818

@@ -26,6 +26,7 @@ An `AzureAppConfigurationProvider` resource has the following top-level child pr
2626
|auth|The authentication method to access Azure App Configuration.|false|object|
2727
|configuration|The settings for querying and processing key-values in Azure App Configuration.|false|object|
2828
|secret|The settings for Key Vault references in Azure App Configuration.|conditional|object|
29+
|featureFlag|The settings for feature flags in Azure App Configuration.|false|object|
2930

3031
The `spec.target` property has the following child property.
3132

@@ -34,15 +35,15 @@ The `spec.target` property has the following child property.
3435
|configMapName|The name of the ConfigMap to be created.|true|string|
3536
|configMapData|The setting that specifies how the retrieved data should be populated in the generated ConfigMap.|false|object|
3637

37-
If the `spec.target.configMapData` property is not set, the generated ConfigMap will be populated with the list of key-values retrieved from Azure App Configuration, which allows the ConfigMap to be consumed as environment variables. Update this property if you wish to consume the ConfigMap as a mounted file. This property has the following child properties.
38+
If the `spec.target.configMapData` property is not set, the generated ConfigMap is populated with the list of key-values retrieved from Azure App Configuration, which allows the ConfigMap to be consumed as environment variables. Update this property if you wish to consume the ConfigMap as a mounted file. This property has the following child properties.
3839

3940
|Name|Description|Required|Type|
4041
|---|---|---|---|
4142
|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|
4243
|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|
4344
|separator|The delimiter that is used to output the ConfigMap data in hierarchical format when the type is set to `json` or `yaml`. The separator is empty by default and the generated ConfigMap contains key-values in their original form. Configure this setting only if the configuration file loader used in your application can't load key-values without converting them to the hierarchical format.|optional|string|
4445

45-
The `spec.auth` property isn't required if the connection string of your App Configuration store is provided by setting the `spec.connectionStringReference` property. Otherwise, one of the identities, service principal, workload identity, or managed identity, will be used for authentication. The `spec.auth` has the following child properties. Only one of them should be specified. If none of them are set, the system-assigned managed identity of the virtual machine scale set will be used.
46+
The `spec.auth` property isn't required if the connection string of your App Configuration store is provided by setting the `spec.connectionStringReference` property. Otherwise, one of the identities, service principal, workload identity, or managed identity, is used for authentication. The `spec.auth` has the following child properties. Only one of them should be specified. If none of them are set, the system-assigned managed identity of the virtual machine scale set is used.
4647

4748
|Name|Description|Required|Type|
4849
|---|---|---|---|
@@ -70,9 +71,9 @@ The `spec.configuration` has the following child properties.
7071
|---|---|---|---|
7172
|selectors|The list of selectors for key-value filtering.|false|object array|
7273
|trimKeyPrefixes|The list of key prefixes to be trimmed.|false|string array|
73-
|refresh|The settings for refreshing data from Azure App Configuration. If the property is absent, data from Azure App Configuration will not be refreshed.|false|object|
74+
|refresh|The settings for refreshing key-values from Azure App Configuration. If the property is absent, key-values from Azure App Configuration are not refreshed.|false|object|
7475

75-
If the `spec.configuration.selectors` property isn't set, all key-values with no label will be downloaded. It contains an array of *selector* objects, which have the following child properties.
76+
If the `spec.configuration.selectors` property isn't set, all key-values with no label are downloaded. It contains an array of *selector* objects, which have the following child properties.
7677

7778
|Name|Description|Required|Type|
7879
|---|---|---|---|
@@ -83,9 +84,9 @@ The `spec.configuration.refresh` property has the following child properties.
8384

8485
|Name|Description|Required|Type|
8586
|---|---|---|---|
86-
|enabled|The setting that determines whether data from Azure App Configuration is automatically refreshed. If the property is absent, a default value of `false` will be used.|false|bool|
87-
|monitoring|The key-values monitored for change detection, aka sentinel keys. The data from Azure App Configuration will be refreshed only if at least one of the monitored key-values is changed.|true|object|
88-
|interval|The interval at which the data will be refreshed from Azure App Configuration. It must be greater than or equal to 1 second. If the property is absent, a default value of 30 seconds will be used.|false|duration string|
87+
|enabled|The setting that determines whether key-values from Azure App Configuration is automatically refreshed. If the property is absent, a default value of `false` is used.|false|bool|
88+
|monitoring|The key-values monitored for change detection, aka sentinel keys. The key-values from Azure App Configuration are refreshed only if at least one of the monitored key-values is changed.|true|object|
89+
|interval|The interval at which the key-values are refreshed from Azure App Configuration. It must be greater than or equal to 1 second. If the property is absent, a default value of 30 seconds is used.|false|duration string|
8990

9091
The `spec.configuration.refresh.monitoring.keyValues` is an array of objects, which have the following child properties.
9192

@@ -100,7 +101,7 @@ The `spec.secret` property has the following child properties. It is required if
100101
|---|---|---|---|
101102
|target|The destination of the retrieved secrets in Kubernetes.|true|object|
102103
|auth|The authentication method to access Key Vaults.|false|object|
103-
|refresh|The settings for refreshing data from Key Vaults. If the property is absent, data from Key Vaults will not be refreshed unless the corresponding Key Vault references are reloaded.|false|object|
104+
|refresh|The settings for refreshing data from Key Vaults. If the property is absent, data from Key Vaults is not refreshed unless the corresponding Key Vault references are reloaded.|false|object|
104105

105106
The `spec.secret.target` property has the following child property.
106107

@@ -126,12 +127,48 @@ The authentication method of each *Key Vault* can be specified with the followin
126127
|workloadIdentity|The settings of the workload identity used for authentication with a Key Vault. It has the same child properties as `spec.auth.workloadIdentity`.|false|object|
127128
|managedIdentityClientId|The client ID of a user-assigned managed identity of virtual machine scale set used for authentication with a Key Vault.|false|string|
128129

129-
The `spec.secret.refresh` property has the following child property.
130+
The `spec.secret.refresh` property has the following child properties.
130131

131132
|Name|Description|Required|Type|
132133
|---|---|---|---|
133-
|enabled|The setting that determines whether data from Key Vaults is automatically refreshed. If the property is absent, a default value of `false` will be used.|false|bool|
134-
|interval|The interval at which the data will be refreshed from Key Vault. It must be greater than or equal to 1 minute. The Key Vault refresh is independent of the App Configuration refresh configured via `spec.configuration.refresh`.|true|duration string|
134+
|enabled|The setting that determines whether data from Key Vaults is automatically refreshed. If the property is absent, a default value of `false` is used.|false|bool|
135+
|interval|The interval at which the data is refreshed from Key Vault. It must be greater than or equal to 1 minute. The Key Vault refresh is independent of the App Configuration refresh configured via `spec.configuration.refresh`.|true|duration string|
136+
137+
The `spec.featureFlag` property has the following child properties. It is required if any feature flags are expected to be downloaded.
138+
139+
|Name|Description|Required|Type|
140+
|---|---|---|---|
141+
|selectors|The list of selectors for feature flag filtering.|false|object array|
142+
|refresh|The settings for refreshing feature flags from Azure App Configuration. If the property is absent, feature flags from Azure App Configuration are not refreshed.|false|object|
143+
144+
If the `spec.featureFlag.selectors` property isn't set, feature flags are not downloaded. It contains an array of *selector* objects, which have the following child properties.
145+
146+
|Name|Description|Required|Type|
147+
|---|---|---|---|
148+
|keyFilter|The key filter for querying feature flags.|true|string|
149+
|labelFilter|The label filter for querying feature flags.|false|string|
150+
151+
The `spec.featureFlag.refresh` property has the following child properties.
152+
153+
|Name|Description|Required|Type|
154+
|---|---|---|---|
155+
|enabled|The setting that determines whether feature flags from Azure App Configuration are automatically refreshed. If the property is absent, a default value of `false` is used.|false|bool|
156+
|interval|The interval at which the feature flags are refreshed from Azure App Configuration. It must be greater than or equal to 1 second. If the property is absent, a default value of 30 seconds is used.|false|duration string|
157+
158+
## Installation
159+
160+
Use the following `helm install` command to install the Azure App Configuration Kubernetes Provider. See [helm-values.yaml](https://github.com/Azure/AppConfiguration-KubernetesProvider/blob/main/deploy/parameter/helm-values.yaml) for the complete list of parameters and their default values. You can override the default values by passing the `--set` flag to the command.
161+
162+
```bash
163+
helm install azureappconfiguration.kubernetesprovider \
164+
oci://mcr.microsoft.com/azure-app-configuration/helmchart/kubernetes-provider \
165+
--namespace azappconfig-system \
166+
--create-namespace
167+
```
168+
169+
### Autoscaling
170+
171+
By default, autoscaling is disabled. However, if you have multiple `AzureAppConfigurationProvider` resources to produce multiple ConfigMaps/Secrets, you can enable horizontal pod autoscaling by setting `autoscaling.enabled` to `true`.
135172

136173
## Examples
137174

@@ -387,6 +424,28 @@ spec:
387424
interval: 1h
388425
```
389426

427+
### Feature Flags
428+
429+
In the following sample, feature flags with keys starting with `app1` and labels equivalent to `common` are downloaded and refreshed every 10 minutes.
430+
431+
``` yaml
432+
apiVersion: azconfig.io/v1
433+
kind: AzureAppConfigurationProvider
434+
metadata:
435+
name: appconfigurationprovider-sample
436+
spec:
437+
endpoint: <your-app-configuration-store-endpoint>
438+
target:
439+
configMapName: configmap-created-by-appconfig-provider
440+
featureFlag:
441+
selectors:
442+
- keyFilter: app1*
443+
labelFilter: common
444+
refresh:
445+
enabled: true
446+
interval: 10m
447+
```
448+
390449
### ConfigMap Consumption
391450

392451
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 default, 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.
@@ -403,7 +462,7 @@ Assuming an App Configuration store has these key-values:
403462

404463
#### [default](#tab/default)
405464

406-
and the `configMapData.type` property is absent or set to `default`,
465+
And the `configMapData.type` property is absent or set to `default`,
407466

408467
``` yaml
409468
apiVersion: azconfig.io/v1
@@ -416,7 +475,7 @@ spec:
416475
configMapName: configmap-created-by-appconfig-provider
417476
```
418477

419-
the generated ConfigMap will be populated with the following data:
478+
The generated ConfigMap is populated with the following data:
420479

421480
``` yaml
422481
data:
@@ -427,7 +486,7 @@ data:
427486

428487
#### [json](#tab/json)
429488

430-
and the `configMapData.type` property is set to `json`,
489+
And the `configMapData.type` property is set to `json`,
431490

432491
``` yaml
433492
apiVersion: azconfig.io/v1
@@ -443,7 +502,7 @@ spec:
443502
key: appSettings.json
444503
```
445504

446-
the generated ConfigMap will be populated with the following data:
505+
The generated ConfigMap is populated with the following data:
447506

448507
``` yaml
449508
data:
@@ -453,7 +512,7 @@ data:
453512

454513
#### [yaml](#tab/yaml)
455514

456-
and the `configMapData.type` property is set to `yaml`,
515+
And the `configMapData.type` property is set to `yaml`,
457516

458517
``` yaml
459518
apiVersion: azconfig.io/v1
@@ -469,7 +528,7 @@ spec:
469528
key: appSettings.yaml
470529
```
471530

472-
the generated ConfigMap will be populated with the following data:
531+
The generated ConfigMap is populated with the following data:
473532

474533
``` yaml
475534
data:
@@ -481,7 +540,7 @@ data:
481540

482541
#### [properties](#tab/properties)
483542

484-
and the `configMapData.type` property is set to `properties`,
543+
And the `configMapData.type` property is set to `properties`,
485544

486545
``` yaml
487546
apiVersion: azconfig.io/v1
@@ -497,7 +556,7 @@ spec:
497556
key: app.properties
498557
```
499558

500-
the generated ConfigMap will be populated with the following data:
559+
The generated ConfigMap is populated with the following data:
501560

502561
``` yaml
503562
data:

0 commit comments

Comments
 (0)