Merge pull request #74 from nilshamerlinck/fix_issue_73

[FIX] builds /log endpoint (#73)
This commit is contained in:
Stéphane Bidoul 2022-09-24 09:38:29 +02:00 committed by GitHub
commit 8dba500f25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -282,6 +282,9 @@ def log(build_name: str, job_kind: DeploymentMode | None) -> str | None:
corev1.read_namespaced_pod_log( corev1.read_namespaced_pod_log(
pod.metadata.name, pod.metadata.name,
namespace=settings.build_namespace, namespace=settings.build_namespace,
container=pod.metadata.annotations.get(
"kubectl.kubernetes.io/default-container"
),
tail_lines=None if job_kind else None, tail_lines=None if job_kind else None,
follow=False, follow=False,
), ),

View file

@ -15,6 +15,8 @@ spec:
metadata: metadata:
labels: labels:
app: odoo app: odoo
annotations:
kubectl.kubernetes.io/default-container: odoo
spec: spec:
# let Odoo stop gracefully to disconnect from postgres # let Odoo stop gracefully to disconnect from postgres
terminationGracePeriodSeconds: 10 terminationGracePeriodSeconds: 10