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/enable-dynamic-configuration-azure-kubernetes-service.md
+2-15Lines changed: 2 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,20 +25,11 @@ Finish the quickstart: [Use Azure App Configuration in Azure Kubernetes Service]
25
25
26
26
> [!TIP]
27
27
> 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
30
28
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 |
38
29
39
30
## Reload data from App Configuration
40
31
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).
42
33
43
34
```yaml
44
35
apiVersion: azconfig.io/v1
@@ -58,13 +49,10 @@ Add the following key-value to your App Configuration store. For more informatio
58
49
configuration:
59
50
refresh:
60
51
enabled: true
61
-
monitoring:
62
-
keyValues:
63
-
- key: Settings:Sentinel
64
52
```
65
53
66
54
> [!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.
68
56
69
57
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).
70
58
@@ -90,7 +78,6 @@ Add the following key-value to your App Configuration store. For more informatio
90
78
| Key | Value |
91
79
|---|---|
92
80
| Settings:Message | Hello from Azure App Configuration - now with live updates! |
93
-
| Settings:Sentinel | 2 |
94
81
95
82
1. After refreshing the browser a few times, you'll see the updated content once the ConfigMap is updated in 30 seconds.
0 commit comments