Merge "[k8s] Support configurable health polling interval"
This commit is contained in:
commit
a6757e560d
|
@ -28,6 +28,11 @@ kubernetes_opts = [
|
||||||
'the Kubernetes cluster created. For exmaple, this '
|
'the Kubernetes cluster created. For exmaple, this '
|
||||||
'could be a file including the vendor specific '
|
'could be a file including the vendor specific '
|
||||||
'storage class.'),
|
'storage class.'),
|
||||||
|
cfg.IntOpt('health_polling_interval',
|
||||||
|
default=60,
|
||||||
|
help=('The default polling interval for Kubernetes cluster '
|
||||||
|
'health. If this number is negative the periodic task '
|
||||||
|
'will be disabled.')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,9 @@ class MagnumPeriodicTasks(periodic_task.PeriodicTasks):
|
||||||
super(MagnumPeriodicTasks, self).__init__(conf)
|
super(MagnumPeriodicTasks, self).__init__(conf)
|
||||||
self.notifier = rpc.get_notifier()
|
self.notifier = rpc.get_notifier()
|
||||||
|
|
||||||
@periodic_task.periodic_task(spacing=10, run_immediately=True)
|
@periodic_task.periodic_task(
|
||||||
|
spacing=CONF.kubernetes.health_polling_interval,
|
||||||
|
run_immediately=True)
|
||||||
@set_context
|
@set_context
|
||||||
def sync_cluster_status(self, ctx):
|
def sync_cluster_status(self, ctx):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The default 10 seconds health polling interval is too frequent for most of
|
||||||
|
the cases. Now it has been changed to 60s. A new config
|
||||||
|
`health_polling_interval` is supported to make the interval configurable.
|
||||||
|
Cloud admin can totally disable the health polling by set a negative value
|
||||||
|
for the config.
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
If it's still preferred to have 10s health polling interval for Kubernetes
|
||||||
|
cluster. It can be set by config `health_polling_interval` under
|
||||||
|
`kubernetes` section.
|
Loading…
Reference in New Issue