Merge pull request #9964 from heww/fix-clair-updaters-disable

fix(prepaire,clair): disable clair updaters when its interval is 0
This commit is contained in:
Wang Yan 2019-11-22 13:38:34 +08:00 committed by GitHub
commit 60101c4ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,8 @@ def parse_yaml_config(config_file_path, with_notary, with_clair, with_chartmuseu
# Clair configs, optional # Clair configs, optional
clair_configs = configs.get("clair") or {} clair_configs = configs.get("clair") or {}
config_dict['clair_db'] = 'postgres' config_dict['clair_db'] = 'postgres'
config_dict['clair_updaters_interval'] = clair_configs.get("updaters_interval") or 12 updaters_interval = clair_configs.get("updaters_interval", None)
config_dict['clair_updaters_interval'] = 12 if updaters_interval is None else updaters_interval
# Chart configs # Chart configs
chart_configs = configs.get("chart") or {} chart_configs = configs.get("chart") or {}