-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(image): push otp and super_gluu configuration to secrets (#784)
- Loading branch information
Showing
4 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os | ||
|
||
from jans.pycloudlib import get_manager | ||
|
||
import logging.config | ||
from settings import LOGGING_CONFIG | ||
|
||
logging.config.dictConfig(LOGGING_CONFIG) | ||
logger = logging.getLogger("entrypoint") | ||
|
||
|
||
manager = get_manager() | ||
|
||
|
||
def push_auth_conf(): | ||
conf_files = ( | ||
"otp_configuration.json", | ||
"super_gluu_creds.json", | ||
) | ||
for conf_file in conf_files: | ||
file_ = f"/etc/certs/{conf_file}" | ||
secret_name = os.path.splitext(conf_file)[0] | ||
logger.info(f"Pushing {file_} to secrets") | ||
manager.secret.from_file(secret_name, file_) | ||
|
||
|
||
if __name__ == "__main__": | ||
push_auth_conf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters