Skip to content

Commit 6e5837b

Browse files
committed
resolve comments
1 parent 85e1400 commit 6e5837b

File tree

2 files changed

+51
-14
lines changed

2 files changed

+51
-14
lines changed

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

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ spring.cloud.azure.appconfiguration.stores[0].connection-strings[1]="${SECOND_RE
164164
> - `spring-cloud-azure-appconfiguration-config-web`
165165
> - `spring-cloud-azure-starter-appconfiguration-config`
166166
167-
### [Kubernetes](#tab/kubernetes)
168-
169-
Azure App Configuration Kubernetes provider will automatically discover replicas and attempt to connect to them when it fails to connect to user-provided endpoint. Replica auto-discovery is enabled by default and can be disabled by setting `replicaDiscoveryEnabled` to `false`.
170-
171-
> [!NOTE]
172-
> The failover support is available if you use version **1.3.0** or later of Azure App Configuration Kubernetes Provider.
173-
174167
---
175168

176169
The failover may occur if the App Configuration provider observes the following conditions.
@@ -186,6 +179,8 @@ You can specify one or more endpoints of a geo-replication-enabled App Configura
186179

187180
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.
188181

182+
### [.NET](#tab/dotnet)
183+
189184
Edit the call to the `AddAzureAppConfiguration` method, which is often found in the `program.cs` file of your application.
190185

191186
```csharp
@@ -204,6 +199,27 @@ configurationBuilder.AddAzureAppConfiguration(options =>
204199
> - `Microsoft.Azure.AppConfiguration.AspNetCore`
205200
> - `Microsoft.Azure.AppConfiguration.Functions.Worker`
206201
202+
### [Kubernetes](#tab/kubernetes)
203+
204+
Replica auto-discovery is enabled by default and can be disabled by setting `replicaDiscoveryEnabled` to `false`.
205+
206+
``` yaml
207+
apiVersion: azconfig.io/v1
208+
kind: AzureAppConfigurationProvider
209+
metadata:
210+
name: appconfigurationprovider-sample
211+
spec:
212+
endpoint: <your-app-configuration-store-endpoint>
213+
replicaDiscoveryEnabled: false
214+
target:
215+
configMapName: configmap-created-by-appconfig-provider
216+
```
217+
218+
> [!NOTE]
219+
> The failover support is available if you use version **1.3.0** or later of Azure App Configuration Kubernetes Provider.
220+
221+
---
222+
207223
## Next steps
208224
209225
> [!div class="nextstepaction"]

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

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ If the `spec.configuration.selectors` property isn't set, all key-values with no
7878

7979
|Name|Description|Required|Type|
8080
|---|---|---|---|
81-
|keyFilter|The key filter for querying key-values.|false|string|
81+
|keyFilter|The key filter for querying key-values.|alternative|string|
8282
|labelFilter|The label filter for querying key-values.|false|string|
83-
|snapshotName|The snapshot for querying its contained key-values.|false|string|
83+
|snapshotName|The snapshot for querying its contained key-values.|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. `Opaque`, `kubernetes.io/tls` [Secret types](https://kubernetes.io/docs/concepts/configuration/secret/#secret-types) are supported.
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.
101101

102102
|Name|Description|Required|Type|
103103
|---|---|---|---|
@@ -147,9 +147,9 @@ If the `spec.featureFlag.selectors` property isn't set, feature flags are not do
147147

148148
|Name|Description|Required|Type|
149149
|---|---|---|---|
150-
|keyFilter|The key filter for querying feature flags.|false|string|
150+
|keyFilter|The key filter for querying feature flags.|alternative|string|
151151
|labelFilter|The label filter for querying feature flags.|false|string|
152-
|snapshotName|The snapshot for querying its contained feature flags.|false|string|
152+
|snapshotName|The snapshot for querying its contained feature flags.|alternative|string|
153153

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

@@ -331,6 +331,8 @@ spec:
331331

332332
Use the `configuration.selectors.snapshotName` property to specify a snapshot and its contained key-values will be downloaded.
333333

334+
#### [snapshot only](#tab/snapshotOnly)
335+
334336
The following example downloads key-values from specified snapshot.
335337

336338
``` yaml
@@ -347,6 +349,26 @@ spec:
347349
- snapshotName: snapshot_app1
348350
```
349351

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.
355+
356+
``` yaml
357+
apiVersion: azconfig.io/v1
358+
kind: AzureAppConfigurationProvider
359+
metadata:
360+
name: appconfigurationprovider-sample
361+
spec:
362+
endpoint: <your-app-configuration-store-endpoint>
363+
target:
364+
configMapName: configmap-created-by-appconfig-provider
365+
configuration:
366+
selectors:
367+
- keyFilter: app1*
368+
labelFilter: common
369+
- snapshotName: snapshot_app1
370+
```
371+
350372
### Key prefix trimming
351373

352374
The following sample uses the `trimKeyPrefixes` property to trim two prefixes from key names before adding them to the generated ConfigMap.
@@ -418,8 +440,7 @@ spec:
418440
servicePrincipalReference: <name-of-secret-containing-service-principal-credentials>
419441
```
420442

421-
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.
422-
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:
443+
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:
423444

424445
```
425446
{

0 commit comments

Comments
 (0)