Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

add feature to specify the init container image and tag #289

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tycho/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def __init__(self, config, name, principal, service_account, conn_string, proxy_
"""init security context"""
self.init_security_context = init_security_context
"""Resources and limits for the init container"""
self.init_image_repository = os.environ.get("TYCHO_APP_INIT_IMAGE_REPOSITORY", "busybox")
self.init_image_tag = os.environ.get("TYCHO_APP_INIT_IMAGE_TAG", "latest")
self.init_cpus = os.environ.get("TYCHO_APP_INIT_CPUS", "250m")
self.init_memory = os.environ.get("TYCHO_APP_INIT_MEMORY", "250Mi")
self.gpu_resource_name = os.environ.get("TYCHO_APP_GPU_RESOURCE_NAME", "nvidia.com/gpu")
Expand Down
2 changes: 1 addition & 1 deletion tycho/template/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
{% if (system.enable_init_container == "true") and (system.create_home_dirs == "true") and (system.dev_phase != "test") %}
initContainers:
- name: volume-tasks
image: busybox:1.28
image: {{ system.init_image_repository }}:{{ system.init_image_tag }}
{% if system.init_security_context.run_as_user or system.init_security_context.run_as_group %}
securityContext:
{% if system.init_security_context.run_as_user %}
Expand Down
Loading