Install certs locally in config app to validate
This commit is contained in:
parent
6dc2cd3691
commit
01c23be9d6
2 changed files with 48 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
import pathvalidate
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from flask import request, jsonify
|
||||
|
||||
|
@ -49,13 +50,10 @@ class SuperUserCustomCertificate(ApiResource):
|
|||
return '', 204
|
||||
|
||||
# TODO(QUAY-991): properly install the custom certs provided by user
|
||||
# Call the update script to install the certificate immediately.
|
||||
# if not app.config['TESTING']:
|
||||
# logger.debug('Calling certs_install.sh')
|
||||
# if os.system('/conf/init/certs_install.sh') != 0:
|
||||
# raise Exception('Could not install certificates')
|
||||
#
|
||||
# logger.debug('certs_install.sh completed')
|
||||
# Call the update script with config dir location to install the certificate immediately.
|
||||
if subprocess.call(['/quay-registry/config_app/init/certs_install.sh'],
|
||||
env={ 'QUAYCONF': config_provider.get_config_dir_path() }) != 0:
|
||||
raise Exception('Could not install certificates')
|
||||
|
||||
return '', 204
|
||||
|
||||
|
|
Reference in a new issue