Merge pull request #11137 from ninjadq/should_not_return_error_when_internal_tls_not_specifyed

Fix: return error when internal_tls_not_provided
This commit is contained in:
Qian Deng 2020-03-19 11:13:21 +08:00 committed by GitHub
commit 175afe300a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,9 +335,9 @@ def parse_yaml_config(config_file_path, with_notary, with_clair, with_trivy, wit
config_dict['registry_username'] = REGISTRY_USER_NAME
config_dict['registry_password'] = generate_random_string(32)
internal_tls_config = configs['internal_tls']
internal_tls_config = configs.get('internal_tls')
# TLS related configs
if internal_tls_config.get('enabled'):
if internal_tls_config and internal_tls_config.get('enabled'):
config_dict['internal_tls'] = InternalTLS(
internal_tls_config['enabled'],
internal_tls_config['verify_client_cert'],