Skip to content

Commit 88b80d0

Browse files
committed
update k8s provider refresh quickstart
1 parent a00ec72 commit 88b80d0

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

articles/azure-app-configuration/enable-dynamic-configuration-azure-kubernetes-service.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,11 @@ Finish the quickstart: [Use Azure App Configuration in Azure Kubernetes Service]
2525

2626
> [!TIP]
2727
> The Azure Cloud Shell is a free, interactive shell that you can use to run the command line instructions in this article. It has common Azure tools preinstalled, including the .NET Core SDK. If you're logged in to your Azure subscription, launch your [Azure Cloud Shell](https://shell.azure.com) from shell.azure.com. You can learn more about Azure Cloud Shell by [reading our documentation](../cloud-shell/overview.md).
28-
>
29-
## Add a sentinel key
3028
31-
A *sentinel key* is a key that you update after you complete the change of all other keys. Your app monitors the sentinel key. When a change is detected, your app refreshes all configuration values. This approach helps to ensure the consistency of configuration in your app and reduces the overall number of requests made to your App Configuration store, compared to monitoring all keys for changes.
32-
33-
Add the following key-value to your App Configuration store. For more information about how to add key-values to a store using the Azure portal or the CLI, go to [Create a key-value](./quickstart-azure-app-configuration-create.md#create-a-key-value).
34-
35-
| Key | Value |
36-
|---|---|
37-
| Settings:Sentinel | 1 |
3829

3930
## Reload data from App Configuration
4031

41-
1. Open the *appConfigurationProvider.yaml* file located in the *Deployment* directory. Then, add the `refresh` section under the `configuration` property. It enables configuration refresh by monitoring the sentinel key.
32+
1. Open the *appConfigurationProvider.yaml* file located in the *Deployment* directory. Then, add the `refresh` section under the `configuration` property. It enables the Kubernetes provider to reload the entire configuration whenever it detects a change in any of the selected key-values (those starting with *Settings:* and having no label). For more information about monitoring configuration changes, see [Best practices for configuration refresh](./howto-best-practices.md#configuration-refresh).
4233

4334
```yaml
4435
apiVersion: azconfig.io/v1
@@ -58,13 +49,10 @@ Add the following key-value to your App Configuration store. For more informatio
5849
configuration:
5950
refresh:
6051
enabled: true
61-
monitoring:
62-
keyValues:
63-
- key: Settings:Sentinel
6452
```
6553
6654
> [!TIP]
67-
> By default, the Kubernetes provider polls the monitoring key-values every 30 seconds for change detection. However, you can change this behavior by setting the `interval` property of the `refresh`. If you want to reduce the number of requests to your App Configuration store, you can adjust it to a higher value.
55+
> You can set the `interval` property of the `refresh` to specify the minimum time between configuration refreshes. In this example, you use the default value of 30 seconds. Adjust to a higher value if you need to reduce the number of requests made to your App Configuration store.
6856

6957
1. Open the *deployment.yaml* file in the *Deployment* directory and add the following content to the `spec.containers` section. Your application loads configuration from a volume-mounted file the App Configuration Kubernetes provider generates. By setting this environment variable, your application can [use polling to monitor changes in mounted files](/dotnet/api/microsoft.extensions.fileproviders.physicalfileprovider.usepollingfilewatcher).
7058

@@ -90,7 +78,6 @@ Add the following key-value to your App Configuration store. For more informatio
9078
| Key | Value |
9179
|---|---|
9280
| Settings:Message | Hello from Azure App Configuration - now with live updates! |
93-
| Settings:Sentinel | 2 |
9481

9582
1. After refreshing the browser a few times, you'll see the updated content once the ConfigMap is updated in 30 seconds.
9683

0 commit comments

Comments
 (0)