Skip to content

Commit

Permalink
not all providers utilize calc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jr0d committed Jul 31, 2019
1 parent 35165f6 commit c517762
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion gen/exhibitor_tls_bootstrap.py
Expand Up @@ -25,7 +25,7 @@ def _check(config: Dict[str, Any]) -> List[str]:
DC/OS variant must be enterprise
"""
checks = [
(lambda: config['exhibitor_tls_enabled'] == 'true',
(lambda: config.get('exhibitor_tls_enabled', False) == 'true',
'Exhibitor security is disabled'),
(lambda: config['exhibitor_storage_backend'] == 'static',
'Only static exhibitor backends are supported'),
Expand Down Expand Up @@ -92,6 +92,9 @@ def _get_ca_alt_name(config: Dict[str, Any]) -> str:


def initialize_exhibitor_ca(final_arguments: Dict[str, Any]):
if final_arguments['platform'] != 'onprem':
return

reasons = _check(final_arguments)
if reasons:
print('[{}] not bootstrapping exhibitor CA: {}'.format(
Expand Down
2 changes: 1 addition & 1 deletion packages/exhibitor/extra/bootstrap_exhibitor_tls.py
Expand Up @@ -142,7 +142,7 @@ def gen_tls_artifacts(ca_url, artifacts_path) -> None:
def main():
exhibitor_env = os.environ.copy()

if exhibitor_env['EXHIBITOR_TLS_ENABLED'] == 'false':
if exhibitor_env.get('EXHIBITOR_TLS_ENABLED', 'false') == 'false':
return

if os.path.exists(TLS_ARTIFACT_LOCATION):
Expand Down

0 comments on commit c517762

Please sign in to comment.