kuke / k8s-config-discovery
k8s config map auto update
v1.0.2
2021-12-20 09:22 UTC
Requires
- php: >=7.4
- hyperf/config-center: ~2.2.0
- hyperf/contract: ~2.2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- mockery/mockery: ^1.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: >=7.0
- swoole/ide-helper: dev-master
- swow/swow: dev-develop
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2024-10-20 15:52:09 UTC
README
composer require kuke/k8s-config-discovery
desc
完美融合hyperf官方的config-center,提供autoload目录下的项目启动后配置的热更新,解决php项目使用k8s的configMap作为配置中心的问题.
useAge
//config_center新加配置
'k8s' => [
'driver' => Kuke\K8sConfigDiscovery\K8sDriver::class,//驱动文件
'interval' => 3,//扫描时间
'base_path' => 'config/autoload/',//要热更新的文件目录
'listener_config' => [
'kuke_test.php',
'kuke_test1.php',
]//要监听的文件
]
],