Skip to content

Commit 0bc3b94

Browse files
Merge pull request #295490 from linglingye001/k8sprovider/on-demand-refresh
K8s provider: add on-demand refresh example
2 parents 316ec6f + 90fca2c commit 0bc3b94

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

articles/azure-app-configuration/quickstart-azure-kubernetes-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ Use the logs for further troubleshooting. Refer to the [FAQ](#faq) section for c
383383

384384
## FAQ
385385

386-
#### Why isnt the ConfigMap or Secret being generated?
386+
#### Why isn't the ConfigMap or Secret being generated?
387387

388388
You can follow the steps in the [Troubleshooting](#troubleshooting) guide to collect logs for detailed error information. Here are some common causes.
389389

@@ -400,7 +400,7 @@ You can customize the installation by providing additional Helm values when inst
400400

401401
#### How to trigger on-demand refresh of ConfigMap and Secret
402402

403-
While you can set up automatic data refresh, there are times when you might want to trigger an on-demand refresh to get the latest data from App Configuration and Key Vault. To do this, you can restart the deployment of the Azure App Configuration Kubernetes provider controller. The Kubernetes provider will then reconcile and update the ConfigMap and Secret with the latest data from your App Configuration store and Key Vault.
403+
While you can set up automatic data refresh, there are times when you might want to trigger an on-demand refresh to get the latest data from App Configuration and Key Vault. To do this, you can modify the `metadata.annotations` section of `AzureAppConfigurationProvider`. The Kubernetes provider will then reconcile and update the ConfigMap and Secret with the latest data from your App Configuration store and Key Vault. See [On-demand Refresh](./reference-kubernetes-provider.md#on-demand-refresh) for an example.
404404

405405
It is not recommended to delete or modify the ConfigMap and Secret generated by the Kubernetes provider. Although new ones will be generated from the latest data, this could cause downtime for your applications in the event of any failures.
406406

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: junbchen
1212

1313
# Azure App Configuration Kubernetes Provider reference
1414

15-
The following reference outlines the properties supported by the Azure App Configuration Kubernetes Provider `v2.1.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 `v2.2.0`. See [release notes](https://github.com/Azure/AppConfiguration/blob/main/releaseNotes/KubernetesProvider.md) for more information on the change.
1616

1717
## Properties
1818

@@ -550,6 +550,34 @@ spec:
550550
interval: 10m
551551
```
552552

553+
### On-demand Refresh
554+
555+
While you can set up automatic data refresh, there are times when you might want to trigger an on-demand refresh to get the latest data from App Configuration and Key Vault. This can be done by adding or updating any annotations in the `metadata.annotations` section of the `AzureAppConfigurationProvider`. The Kubernetes provider will then reconcile and update the ConfigMap and Secret with the latest data from your App Configuration store and Key Vault.
556+
557+
In the following example, the `AzureAppConfigurationProvider` is updated with a new annotation. After the modification, apply the changes using `kubectl apply` to trigger an on-demand refresh.
558+
559+
``` yaml
560+
apiVersion: azconfig.io/v1
561+
kind: AzureAppConfigurationProvider
562+
metadata:
563+
name: appconfigurationprovider-sample
564+
annotations:
565+
key1: value1
566+
spec:
567+
endpoint: <your-app-configuration-store-endpoint>
568+
target:
569+
configMapName: configmap-created-by-appconfig-provider
570+
configuration:
571+
selectors:
572+
- keyFilter: app1*
573+
labelFilter: common
574+
secret:
575+
target:
576+
secretName: secret-created-by-appconfig-provider
577+
auth:
578+
managedIdentityClientId: <your-user-assigned-managed-identity-client-id>
579+
```
580+
553581
### ConfigMap Consumption
554582

555583
Applications running in Kubernetes typically consume the ConfigMap either as environment variables or as configuration files. If the `configMapData.type` property is absent or is set to default, the ConfigMap is populated with the itemized list of data retrieved from Azure App Configuration, which can be easily consumed as environment variables. If the `configMapData.type` property is set to json, yaml or properties, data retrieved from Azure App Configuration is grouped into one item with key name specified by the `configMapData.key` property in the generated ConfigMap, which can be consumed as a mounted file.

0 commit comments

Comments
 (0)