Skip to content

Commit e5613aa

Browse files
committed
resolve comments
1 parent 89e86bb commit e5613aa

File tree

2 files changed

+26
-58
lines changed

2 files changed

+26
-58
lines changed

articles/azure-app-configuration/howto-geo-replication.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ When geo-replication is enabled, and if one replica isn't accessible, you can le
9696

9797
Assuming you have an application using Azure App Configuration, you can update it as the following sample code to take advantage of the failover feature. You can either provide a list of endpoints for Microsoft Entra authentication or a list of connection strings for access key-based authentication.
9898

99-
### [.NET](#tab/net)
99+
### [.NET](#tab/dotnet)
100100

101101
Edit the call to the `AddAzureAppConfiguration` method, which is often found in the `program.cs` file of your application.
102102

@@ -179,7 +179,7 @@ You can specify one or more endpoints of a geo-replication-enabled App Configura
179179

180180
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.
181181

182-
### [.NET](#tab/dotnet)
182+
### [.NET](#tab/Dotnet)
183183

184184
Edit the call to the `AddAzureAppConfiguration` method, which is often found in the `program.cs` file of your application.
185185

@@ -201,7 +201,7 @@ configurationBuilder.AddAzureAppConfiguration(options =>
201201
202202
### [Kubernetes](#tab/kubernetes)
203203

204-
Replica auto-discovery is enabled by default and can be disabled by setting `replicaDiscoveryEnabled` to `false`.
204+
Update the `AzureAppConfigurationProvider` resource of your Azure App Configuration Kubernetes Provider. Add a `replicaDiscoveryEnabled` property and set it to `false`.
205205

206206
``` yaml
207207
apiVersion: azconfig.io/v1
@@ -216,7 +216,7 @@ spec:
216216
```
217217
218218
> [!NOTE]
219-
> The failover support is available if you use version **1.3.0** or later of Azure App Configuration Kubernetes Provider.
219+
> The automatic replica discovery and failover support is available if you use version **1.3.0** or later of [Azure App Configuration Kubernetes Provider](https://mcr.microsoft.com/product/azure-app-configuration/kubernetes-provider/about).
220220
221221
---
222222

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

Lines changed: 22 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ An `AzureAppConfigurationProvider` resource has the following top-level child pr
2121
|Name|Description|Required|Type|
2222
|---|---|---|---|
2323
|endpoint|The endpoint of Azure App Configuration, which you would like to retrieve the key-values from.|alternative|string|
24-
|replicaDiscoveryEnabled|The settings for replica discovery. When App Configuration stores with geo-replication enabled, the Kubernetes provider will automatically discover replicas and attempt to connect to them when it fails to connect to user-provided endpoint. If the property is absent, a default value of `true` is used.|false|bool|
2524
|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|
2626
|target|The destination of the retrieved key-values in Kubernetes.|true|object|
2727
|auth|The authentication method to access Azure App Configuration.|false|object|
2828
|configuration|The settings for querying and processing key-values in Azure App Configuration.|false|object|
@@ -74,13 +74,13 @@ The `spec.configuration` has the following child properties.
7474
|trimKeyPrefixes|The list of key prefixes to be trimmed.|false|string array|
7575
|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|
7676

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.
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.
7878

7979
|Name|Description|Required|Type|
8080
|---|---|---|---|
81-
|keyFilter|The key filter for querying key-values.|alternative|string|
82-
|labelFilter|The label filter for querying key-values.|false|string|
83-
|snapshotName|The snapshot for querying its contained key-values.|alternative|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|
8484

8585
The `spec.configuration.refresh` property has the following child properties.
8686

@@ -97,7 +97,7 @@ The `spec.configuration.refresh.monitoring.keyValues` is an array of objects, wh
9797
|key|The key of a key-value.|true|string|
9898
|label|The label of a key-value.|false|string|
9999

100-
The `spec.secret` property has the following child properties. It is required if any Key Vault references are expected to be downloaded. All selected secrets would be sourced into one `Opaque` type Secret by default. For generating other types of Secret, see [Key Vault references](#key-vault-references) for more details.
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).
101101

102102
|Name|Description|Required|Type|
103103
|---|---|---|---|
@@ -143,13 +143,13 @@ The `spec.featureFlag` property has the following child properties. It is requir
143143
|selectors|The list of selectors for feature flag filtering.|false|object array|
144144
|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|
145145

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.
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.
147147

148148
|Name|Description|Required|Type|
149149
|---|---|---|---|
150-
|keyFilter|The key filter for querying feature flags.|alternative|string|
151-
|labelFilter|The label filter for querying feature flags.|false|string|
152-
|snapshotName|The snapshot for querying its contained feature flags.|alternative|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|
153153

154154
The `spec.featureFlag.refresh` property has the following child properties.
155155

@@ -327,31 +327,7 @@ spec:
327327
labelFilter: development
328328
```
329329

330-
### Snapshot
331-
332-
Use the `configuration.selectors.snapshotName` property to specify a snapshot and its contained key-values will be downloaded.
333-
334-
#### [snapshot only](#tab/snapshotOnly)
335-
336-
The following example downloads key-values from specified snapshot.
337-
338-
``` yaml
339-
apiVersion: azconfig.io/v1
340-
kind: AzureAppConfigurationProvider
341-
metadata:
342-
name: appconfigurationprovider-sample
343-
spec:
344-
endpoint: <your-app-configuration-store-endpoint>
345-
target:
346-
configMapName: configmap-created-by-appconfig-provider
347-
configuration:
348-
selectors:
349-
- snapshotName: snapshot_app1
350-
```
351-
352-
#### [snapshot with key/label filters](#tab/withfilters)
353-
354-
In following example, snapshot and key/label filters are used to retrieve key-values. It's important to note that the values of the last selector take precedence and override any overlapping keys from the previous selectors.
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.
355331

356332
``` yaml
357333
apiVersion: azconfig.io/v1
@@ -364,13 +340,11 @@ spec:
364340
configMapName: configmap-created-by-appconfig-provider
365341
configuration:
366342
selectors:
343+
- snapshotName: app1_common_configuration
367344
- keyFilter: app1*
368-
labelFilter: common
369-
- snapshotName: snapshot_app1
345+
labelFilter: development
370346
```
371347

372-
---
373-
374348
### Key prefix trimming
375349

376350
The following sample uses the `trimKeyPrefixes` property to trim two prefixes from key names before adding them to the generated ConfigMap.
@@ -418,6 +392,8 @@ spec:
418392

419393
### Key Vault references
420394

395+
#### Authentication
396+
421397
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.
422398

423399
``` yaml
@@ -442,21 +418,13 @@ spec:
442418
servicePrincipalReference: <name-of-secret-containing-service-principal-credentials>
443419
```
444420

445-
By default, all key vault reference items will be projected as key-value pairs into the specified target Secret, and the type of that target secret is `Opaque`, which cannot be customized. Given that Kubernetes has [various types](https://kubernetes.io/docs/concepts/configuration/secret/#secret-types) of Secret besides `Opaque`, Azure App Configuration Kubernetes Provider currently give compatibility for `kubernetes.io/tls` type. If you want a key vault reference item to be projected as a secret of `kubernetes.io/tls` type, you need to tag that key vault reference item with a special label `".kubernetes.secret.type": "kubernetes.io/tls"` in Azure App Configuration, like this:
446-
447-
```
448-
{
449-
"key": "mycertificate",
450-
"label": null,
451-
"value": "{\"uri\":\"https://<your-key-valut-endpoint>/secrets/mycertificate\"}",
452-
"content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8",
453-
"tags": {
454-
".kubernetes.secret.type": "kubernetes.io/tls"
455-
}
456-
}
457-
```
458-
459-
Then this key vault reference item will be generated as a `kubernetes.io/tls` type Secret naming with the key of it.
421+
#### Types of Secret
422+
423+
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|
460428

461429
### Refresh of secrets from Key Vault
462430

0 commit comments

Comments
 (0)