You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-geo-replication.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,8 @@ You can specify one or more endpoints of a geo-replication-enabled App Configura
179
179
180
180
The automatically discovered replicas will be selected and used randomly. If you have a preference for specific replicas, you can explicitly specify their endpoints. This feature is enabled by default, but you can refer to the following sample code to disable it.
181
181
182
+
### [.NET](#tab/Dotnet)
183
+
182
184
Edit the call to the `AddAzureAppConfiguration` method, which is often found in the `program.cs` file of your application.
Update the `AzureAppConfigurationProvider` resource of your Azure App Configuration Kubernetes Provider. Add a `replicaDiscoveryEnabled` property and set it to `false`.
> The automatic replica discovery and failover support is available if you use version **1.3.0** or later of [Azure App Configuration Kubernetes Provider](./quickstart-azure-kubernetes-service.md).
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.
15
+
The following reference outlines the properties supported by the Azure App Configuration Kubernetes Provider `v1.3.0`. See [release notes](https://github.com/Azure/AppConfiguration/blob/main/releaseNotes/KubernetesProvider.md) for more information on the change.
16
16
17
17
## Properties
18
18
@@ -22,6 +22,7 @@ An `AzureAppConfigurationProvider` resource has the following top-level child pr
22
22
|---|---|---|---|
23
23
|endpoint|The endpoint of Azure App Configuration, which you would like to retrieve the key-values from.|alternative|string|
24
24
|connectionStringReference|The name of the Kubernetes Secret that contains Azure App Configuration connection string.|alternative|string|
25
+
|replicaDiscoveryEnabled|The setting that determines whether replicas of Azure App Configuration are automatically discovered and used for failover. If the property is absent, a default value of `true` is used.|false|bool|
25
26
|target|The destination of the retrieved key-values in Kubernetes.|true|object|
26
27
|auth|The authentication method to access Azure App Configuration.|false|object|
27
28
|configuration|The settings for querying and processing key-values in Azure App Configuration.|false|object|
@@ -73,12 +74,13 @@ The `spec.configuration` has the following child properties.
73
74
|trimKeyPrefixes|The list of key prefixes to be trimmed.|false|string array|
74
75
|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|
75
76
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.
77
+
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. Note that the key-values of the last selector take precedence and override any overlapping keys from the previous selectors.
77
78
78
79
|Name|Description|Required|Type|
79
80
|---|---|---|---|
80
-
|keyFilter|The key filter for querying key-values.|true|string|
81
-
|labelFilter|The label filter for querying key-values.|false|string|
81
+
|keyFilter|The key filter for querying key-values. This property and the `snapshotName` property should not be set at the same time.|alternative|string|
82
+
|labelFilter|The label filter for querying key-values. This property and the `snapshotName` property should not be set at the same time.|false|string|
83
+
|snapshotName|The name of a snapshot from which key-values are loaded. This property should not be used in conjunction with other properties.|alternative|string|
82
84
83
85
The `spec.configuration.refresh` property has the following child properties.
84
86
@@ -95,7 +97,7 @@ The `spec.configuration.refresh.monitoring.keyValues` is an array of objects, wh
95
97
|key|The key of a key-value.|true|string|
96
98
|label|The label of a key-value.|false|string|
97
99
98
-
The `spec.secret` property has the following child properties. It is required if any Key Vault references are expected to be downloaded.
100
+
The `spec.secret` property has the following child properties. It is required if any Key Vault references are expected to be downloaded. To learn more about the support for Kubernetes built-in types of Secrets, see [Types of Secret](#types-of-secret).
99
101
100
102
|Name|Description|Required|Type|
101
103
|---|---|---|---|
@@ -141,12 +143,13 @@ The `spec.featureFlag` property has the following child properties. It is requir
141
143
|selectors|The list of selectors for feature flag filtering.|false|object array|
142
144
|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
145
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.
146
+
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. Note that the feature flags of the last selector take precedence and override any overlapping keys from the previous selectors.
145
147
146
148
|Name|Description|Required|Type|
147
149
|---|---|---|---|
148
-
|keyFilter|The key filter for querying feature flags.|true|string|
149
-
|labelFilter|The label filter for querying feature flags.|false|string|
150
+
|keyFilter|The key filter for querying feature flags. This property and the `snapshotName` property should not be set at the same time.|alternative|string|
151
+
|labelFilter|The label filter for querying feature flags. This property and the `snapshotName` property should not be set at the same time.|false|string|
152
+
|snapshotName|The name of a snapshot from which feature flags are loaded. This property should not be used in conjunction with other properties.|alternative|string|
150
153
151
154
The `spec.featureFlag.refresh` property has the following child properties.
152
155
@@ -324,6 +327,24 @@ spec:
324
327
labelFilter: development
325
328
```
326
329
330
+
A snapshot can be used alone or together with other key-value selectors. In the following sample, you load key-values of common configuration from a snapshot and then override some of them with key-values for development.
The following sample uses the `trimKeyPrefixes` property to trim two prefixes from key names before adding them to the generated ConfigMap.
@@ -371,6 +392,8 @@ spec:
371
392
372
393
### Key Vault references
373
394
395
+
#### Authentication
396
+
374
397
In the following sample, one Key Vault is authenticated with a service principal, while all other Key Vaults are authenticated with a user-assigned managed identity.
Two Kubernetes built-in [types of Secrets](https://kubernetes.io/docs/concepts/configuration/secret/#secret-types), Opaque and TLS, are currently supported. Secrets resolved from Key Vault references are saved as the [Opaque Secret](https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets) type by default. If you have a Key Vault reference to a certificate and want to save it as the [TLS Secret](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets) type, you can add a **tag** with the following name and value to the Key Vault reference in Azure App Configuration. By doing so, a Secret with the `kubernetes.io/tls` type will be generated and named after the key of the Key Vault reference.
424
+
425
+
|Name|Value|
426
+
|---|---|
427
+
|.kubernetes.secret.type|kubernetes.io/tls|
428
+
429
+
#### Refresh of secrets from Key Vault
399
430
400
431
Refreshing secrets from Key Vaults usually requires reloading the corresponding Key Vault references from Azure App Configuration. However, with the `spec.secret.refresh` property, you can refresh the secrets from Key Vault independently. This is especially useful for ensuring that your workload automatically picks up any updated secrets from Key Vault during secret rotation. Note that to load the latest version of a secret, the Key Vault reference must not be a versioned secret.
0 commit comments