Merge pull request #3162 from quay/fix-config-app-certs-install

Override config directory in certs install script in config app
This commit is contained in:
Sam Chow 2018-07-18 17:23:50 -04:00 committed by GitHub
commit 45853deef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
set -e set -e
QUAYPATH=${QUAYPATH:-"."} QUAYPATH=${QUAYPATH:-"."}
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf/stack"} QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf/stack"}
QUAYCONFIG="$QUAYCONF/stack" QUAYCONFIG=${QUAYCONFIG:-"$QUAYCONF/stack"}
cd ${QUAYDIR:-"/quay-registry"} cd ${QUAYDIR:-"/quay-registry"}

View file

@ -51,7 +51,7 @@ class SuperUserCustomCertificate(ApiResource):
# Call the update script with config dir location to install the certificate immediately. # Call the update script with config dir location to install the certificate immediately.
if subprocess.call([os.path.join(INIT_SCRIPTS_LOCATION, 'certs_install.sh')], if subprocess.call([os.path.join(INIT_SCRIPTS_LOCATION, 'certs_install.sh')],
env={ 'QUAYCONF': config_provider.get_config_dir_path() }) != 0: env={ 'QUAYCONFIG': config_provider.get_config_dir_path() }) != 0:
raise Exception('Could not install certificates') raise Exception('Could not install certificates')
return '', 204 return '', 204

View file

@ -22,7 +22,7 @@ class LDAPValidator(BaseValidator):
# If there is a custom LDAP certificate, then reinstall the certificates for the container. # If there is a custom LDAP certificate, then reinstall the certificates for the container.
if config_provider.volume_file_exists(LDAP_CERT_FILENAME): if config_provider.volume_file_exists(LDAP_CERT_FILENAME):
subprocess.check_call([os.path.join(init_scripts_location, 'certs_install.sh')], subprocess.check_call([os.path.join(init_scripts_location, 'certs_install.sh')],
env={ 'QUAYCONF': config_provider.get_config_dir_path() }) env={ 'QUAYCONFIG': config_provider.get_config_dir_path() })
# Note: raises ldap.INVALID_CREDENTIALS on failure # Note: raises ldap.INVALID_CREDENTIALS on failure
admin_dn = config.get('LDAP_ADMIN_DN') admin_dn = config.get('LDAP_ADMIN_DN')