Skip to content

Commit b9039cc

Browse files
committed
Add support to interact with a local podman installation
Signed-off-by: Tobias Wolf <[email protected]>
1 parent 9bc3c1f commit b9039cc

File tree

13 files changed

+1351
-61
lines changed

13 files changed

+1351
-61
lines changed

poetry.lock

Lines changed: 32 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,26 @@ packages = [{ include = "gardenlinux", from = "src" }]
1010
[tool.poetry.dependencies]
1111
python = ">=3.13, <3.14"
1212
apt-repo = "^0.5"
13-
boto3 = "^1.42.10"
13+
boto3 = "^1.42.11"
1414
click = "^8.3.1"
1515
cryptography = "^46.0.3"
1616
jsonschema = "^4.25.1"
1717
networkx = "^3.6"
1818
oras = "^0.2.38"
19+
podman = "^5.6.0"
1920
pygit2 = "^1.19.0"
2021
pygments = "^2.19.2"
2122
PyYAML = "^6.0.2"
2223
gitpython = "^3.1.45"
2324

2425
[tool.poetry.group.dev.dependencies]
2526
bandit = "^1.9.2"
27+
isort = "^7.0.0"
2628
moto = "^5.1.16"
27-
pre-commit = "^4.5.0"
29+
pre-commit = "^4.5.1"
2830
python-dotenv = "^1.2.1"
2931
pytest = "^9.0.2"
3032
pytest-cov = "^7.0.0"
31-
isort = "^7.0.0"
3233
requests-mock = "^1.12.1"
3334

3435
[tool.poetry.group.docs.dependencies]

src/gardenlinux/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@
165165
GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME = "gardenlinux-github-releases"
166166
GLVD_BASE_URL = "https://security.gardenlinux.org/v1"
167167

168+
PODMAN_CONNECTION_MAX_IDLE_SECONDS = 3
169+
168170
# https://github.com/gardenlinux/gardenlinux/issues/3044
169171
# Empty string is the 'legacy' variant with traditional root fs and still needed/supported
170172
IMAGE_VARIANTS = ["", "_usi", "_tpm2_trustedboot"]

src/gardenlinux/github/release/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import logging
23
import os
34
import sys
45

@@ -7,7 +8,7 @@
78
from gardenlinux.constants import RELEASE_ID_FILE, REQUESTS_TIMEOUTS
89
from gardenlinux.logger import LoggerSetup
910

10-
LOGGER = LoggerSetup.get_logger("gardenlinux.github.release", "INFO")
11+
LOGGER = LoggerSetup.get_logger("gardenlinux.github.release", logging.INFO)
1112

1213

1314
def create_github_release(owner, repo, tag, commitish, latest, body):

src/gardenlinux/github/release/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import logging
23

34
from gardenlinux.constants import GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME
45
from gardenlinux.logger import LoggerSetup
@@ -10,10 +11,10 @@
1011
write_to_release_id_file,
1112
)
1213

13-
LOGGER = LoggerSetup.get_logger("gardenlinux.github", "INFO")
14+
LOGGER = LoggerSetup.get_logger("gardenlinux.github", logging.INFO)
1415

1516

16-
def main():
17+
def main() -> None:
1718
parser = argparse.ArgumentParser(description="GitHub Release Script")
1819
subparsers = parser.add_subparsers(dest="command")
1920

src/gardenlinux/oci/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,15 @@
99
from .index import Index
1010
from .layer import Layer
1111
from .manifest import Manifest
12+
from .podman import Podman
13+
from .podman_context import PodmanContext
1214

13-
__all__ = ["Container", "ImageManifest", "Index", "Layer", "Manifest"]
15+
__all__ = [
16+
"Container",
17+
"ImageManifest",
18+
"Index",
19+
"Layer",
20+
"Manifest",
21+
"Podman",
22+
"PodmanContext",
23+
]

0 commit comments

Comments
 (0)