uptainer.uptainer¶
Main module.
- class uptainer.uptainer.UpTainer(config: Config, log: BoundLoggerLazyProxy)[source]¶
Bases:
object- __init__(config: Config, log: BoundLoggerLazyProxy) None[source]¶
Main class of the package.
- Parameters:
config (Config) – Uptainer Config class, it will contain all the infos.
log (BoundLoggerLazyProxy) – Log class to inject into the vars. Class: structlog
- Returns:
None
- detect_current_version(fpath: str, key: str) TyperDetectedVersion[source]¶
Reading and return the tag image used on the git project.
- Parameters:
fpath (str) – Absolute path of the yaml file to read.
key (str) – Key path to read on the yaml, like “image.tag”.
- Returns:
TyperDetectedVersion object
- detect_version(tags: list[TyperImageList]) TyperDetectedVersion[source]¶
Find the latest version to apply.
- Parameters:
tags (list) – The list of the tags found from the remote repo.
- Returns:
Return a dict that have version matched. Its like: {“error”: <bool>, “data”: “<matched version>”}
- get_image_provider(image_repository: str) TyperImageProvider[source]¶
Return container image provider.
- Parameters:
image_repository (str) – Container Image repository url
- Returns:
Return a dict that have image provider object. Its like: {“error”: <bool>, “data”: “<provider object>”}
- update_version(fpath: str, key: str, newversion: str) TyperGenericReturn[source]¶
Update the tag image used on the git project in the values file specified.
- Parameters:
fpath (str) – Absolute path of the yaml file to read.
key (str) – Key path to read on the yaml, like “image.tag”.
newversion (str) – New version to apply.
- Returns:
TyperDetectedVersion object