Skip to content

Commit

Permalink
fix: wait init migrations lack env var (#929)
Browse files Browse the repository at this point in the history
* fix: add `BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS` & `BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS` in all pods

Signed-off-by: Guilhem Barthés <[email protected]>

* fix: cast values to int

Signed-off-by: Guilhem Barthés <[email protected]>

---------

Signed-off-by: Guilhem Barthés <[email protected]>
  • Loading branch information
guilhem-barthes authored Jun 10, 2024
1 parent fbb9179 commit fe7ddca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions backend/backend/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
from django.core.files.storage import FileSystemStorage

from .deps.celery import *

# The two next lines are needed for wait_init_migration as we have one configmap with all settings,
# wait-init-migrations receives `PRIVATE_CA_ENABLED`, which requires the following vat
from .deps.image_build import BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS
from .deps.image_build import BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS
from .deps.jwt import *
from .deps.org import *
from .deps.path import *
Expand Down
6 changes: 4 additions & 2 deletions backend/backend/settings/deps/image_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
IMAGE_BUILD_TIMEOUT = 3 * 60 * 60 # 3 hours
# Delay before two check
IMAGE_BUILD_CHECK_DELAY = 5
BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS = os.getenv("BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS", 60)
BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS = os.getenv("BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS", 2)
BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS = int(os.getenv("BUILDER_KANIKO_STARTUP_MAX_ATTEMPTS", 60))
BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS = int(
os.getenv("BUILDER_KANIKO_STARTUP_PENDING_STATE_WAIT_SECONDS", 2)
)

0 comments on commit fe7ddca

Please sign in to comment.