This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
[Kube Runtime] Refine init and runtime scripts in k8s pods. #3245
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refine init and runtime scripts in k8s pods: * `init` script and `init.d`: * init script is executed as entrypoint in init container * all scripts under `init.d` will be executed in priority order * task container will be started after `init` script * `runtime` script and `runtime.d`: * `runtime` script will be executed as entrypoint in task container * all scripts under `runtime.d` will be executed in priority order * user commands will be executed in the end of `runtime` script
yqwang-ms
approved these changes
Jul 23, 2019
Update dockerfile and work dir.
2 similar comments
Add steps to onboard a new init/runtime script: 1. put it under init.d/runtime.d 2. give it a priority in [0, 100] and insert into init/runtime in order 3. add the following format block # comment for the script purpose # priority=value # ${PAI_{INIT,RUNTIME}_DIR}/{init,runtime}.sh >> ${PAI_LOG_FILE} 2>&1
pai/src/kube-runtime/build/kube-runtime.dockerfile Lines 27 to 28 in 4daecc4
|
wangdian
approved these changes
Jul 24, 2019
source ${PAI_RUNTIME_DIR}/runtime_env.sh | ||
|
||
# prepare ssh | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call all scripts in runtime.d here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script owner should add entrypoint here by themselves.
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refine init and runtime scripts in k8s pods:
init
script andinit.d
:init.d
will be executed in priority orderinit
scriptruntime
script andruntime.d
:runtime
script will be executed as entrypoint in task containerruntime.d
will be executed in priority orderruntime
scriptHere're the steps to onboard a new init/runtime script:
init.d
/runtime.d
init
/runtime
in order