Skip to content

Commit 348a449

Browse files
committed
add key vault refresh feature
1 parent d689e68 commit 348a449

File tree

1 file changed

+46
-5
lines changed

1 file changed

+46
-5
lines changed

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

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The `spec.keyValues` has the following child properties. The `spec.keyValues.key
4646
|selectors|The list of selectors for key-value filtering|false|object array|
4747
|trimKeyPrefixes|The list of key prefixes to be trimmed|false|string array|
4848
|keyVaults|The settings for Key Vault references|conditional|object|
49-
|refresh|The settings for refreshing the key-values in ConfigMap or Secret|false|object|
49+
|refresh|The settings for refreshing the key-values in ConfigMap|false|object|
5050

5151
If the `spec.keyValues.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.
5252

@@ -61,6 +61,7 @@ The `spec.keyValues.keyVaults` property has the following child properties.
6161
|---|---|---|---|
6262
|target|The destination of resolved Key Vault references in Kubernetes|true|object|
6363
|auth|The authentication method to access Key Vaults|false|object|
64+
|refresh|The settings for refreshing the data in Secret|false|object|
6465

6566
The `spec.keyValues.keyVaults.target` property has the following child property.
6667

@@ -84,12 +85,18 @@ The authentication method of each *vault* can be specified with the following pr
8485
|managedIdentityClientId|The client ID of a user-assigned managed identity used for authentication with a vault|false|string|
8586
|servicePrincipalReference|The name of the Kubernetes Secret that contains the credentials of a service principal used for authentication with a vault|false|string|
8687

88+
The `spec.keyValues.keyVaults.refresh` property has the following child property.
89+
90+
|Name|Description|Required|Type|
91+
|---|---|---|---|
92+
|interval|The interval for Secret's refresh, must be greater than 1 minute|false|duration string|
93+
8794
The `spec.keyValues.refresh` property has the following child properties.
8895

8996
|Name|Description|Required|Type|
9097
|---|---|---|---|
9198
|monitoring|The key-values that are monitored by the provider, provider automatically refreshes the ConfigMap or Secret if value change in any designated key-value|true|object|
92-
|interval|The interval for refreshing, default value is 30 seconds, must be greater than 1 second|false|duration string|
99+
|interval|The interval for ConfigMap's refresh, default value is 30 seconds, must be greater than 1 second|true|duration string|
93100

94101
The `spec.keyValues.refresh.monitoring.keyValues` is an array of objects, which have the following child properties.
95102

@@ -254,11 +261,12 @@ spec:
254261
servicePrincipalReference: <name-of-secret-containing-service-principal-credentials>
255262
```
256263

257-
### Dynamically refresh ConfigMap and Secret
264+
### Dynamic configuration
265+
#### Refresh ConfigMap
258266

259-
Setting the `spec.keyValues.refresh` property enables dynamic configuration data refresh in ConfigMap and Secret by monitoring designated key-values. The provider periodically polls the key-values, if there is any value change, provider triggers ConfigMap and Secret refresh in accordance with the present data in Azure App Configuration.
267+
Setting the `spec.keyValues.refresh` property enables dynamic configuration data refresh in ConfigMap by monitoring designated key-values. The provider periodically polls the key-values, if there is any value change, provider triggers ConfigMap refresh in accordance with the present data in Azure App Configuration.
260268

261-
The following sample instructs monitoring two key-values with 1 minute polling interval.
269+
The following sample instructs monitoring two key-values with 1 minute refresh interval.
262270

263271
``` yaml
264272
apiVersion: azconfig.io/v1beta1
@@ -283,4 +291,37 @@ spec:
283291
label: common
284292
- key: sentinelKey
285293
label: development
294+
```
295+
296+
#### Refresh Secret
297+
Setting `spec.keyValues.keyVaults.refresh` property enables dynamic data refresh in Secret. Any refresh operation triggered by refresh interval will only update the value for a Key Vault secret with latest version. And refresh operation triggered by monitored key-values will make provider poll the key-values, ensuring consistency between Secret's data and Azure App Configuration.
298+
299+
The following sample instructs monitoring one key-value with different refresh interval for ConfigMap and Secret.
300+
301+
``` yaml
302+
apiVersion: azconfig.io/v1beta1
303+
kind: AzureAppConfigurationProvider
304+
metadata:
305+
name: appconfigurationprovider-sample
306+
spec:
307+
endpoint: <your-app-configuration-store-endpoint>
308+
target:
309+
configMapName: configmap-created-by-appconfig-provider
310+
keyValues:
311+
selectors:
312+
- keyFilter: app1*
313+
labelFilter: common
314+
refresh:
315+
interval: 1m
316+
monitoring:
317+
keyValues:
318+
- key: sentinelKey
319+
label: common
320+
keyVaults:
321+
target:
322+
secretName: secret-created-by-appconfig-provider
323+
auth:
324+
managedIdentityClientId: <your-user-assigned-managed-identity-client-id>
325+
refresh:
326+
interval: 10m
286327
```

0 commit comments

Comments
 (0)