Configuration File Hosting
The configuration file hosting feature provides a hosting service for configuration files. Using the hosted configuration file service, you can achieve the following:
- Host configuration files online.
- Conveniently use hosted configuration files during deployment and redeployment.
- View which services are using the hosted configuration files.
- Update the configuration files of multiple services simultaneously by updating the hosted configuration file.
Hosting and Managing Configuration Files
In the sidebar, you can select Hosted Config to access the configuration file hosting feature.
On this page, you can create, update, and delete configuration files. The related functions will be introduced in sequence.
In the upper left corner of the function bar, select Create to create a configuration file.
You can provide a "Config Name" as the name of the hosted file. This name is not related to the actual configuration file name used, it is only used to distinguish different configuration files.
Please note:
- Configuration file names should not be duplicated.
- Each address can host configuration files with a total size of up to 1MB.
After creation, you will find the newly created configuration file in the list at the bottom of the page. In addition to the configuration file name, creation time, and other information, a unique ID will be generated for distinction.
You can search by ID or name in the search bar.
In the list, you can edit or delete configuration files.
In the editing process, you can browse the specific content of the configuration file on a read-only page and edit it through the "Edit" button in the upper right corner.
You can also delete the hosted configuration file on this page. After deleting the hosted configuration file, the configuration files in the service will not be affected.
Using Hosted Configuration Files When Deploying Services
When deploying your own service, you can use your hosted configuration file for convenient configuration.
In addition to directly filling in the configuration file content, you can directly use the hosted configuration file. After clicking From hosted config, you can search for the configuration file you want to use by ID or name, or select it from the list below.
After selecting your hosted configuration file, you can also make temporary edits. This edit only applies to this deployment and will not affect the hosted configuration file.
Both methods generate the same file in the service, but if you use hosted configuration files, you can update the content of configuration files in multiple services by updating the hosted configuration file without redeploying any services.
Batch Update Configuration Files in Services
When updating the hosted file, the configuration files in the service can be updated accordingly.
When updating, click Only update hosted config to switch to "Overwrite the config in referrer services and restart them". When updating, the services using the hosted configuration will be updated together, and the pods will be restarted to read the latest configuration file.
You can confirm which services refer to the configuration file in Referrer Services.
Please note:
- Batch updates to services are not real-time and may have a delay of about one minute.
- This process requires restarting your services, so be sure to save any necessary data.
- After using the hosted configuration file in the service, even if the content is modified, the configuration file content of the service will still be updated after the batch modification.