-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally avoid sleeping in entrypoint.sh
#289
Conversation
2278a5d
to
71348e3
Compare
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.
I'm fine with this change.
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.
i see it already LGTM, up 2 u if you want to address minor comments
images/entrypoint.sh
Outdated
@@ -6,6 +6,7 @@ set -e | |||
# Set known directories. | |||
CNI_BIN_DIR="/host/opt/cni/bin" | |||
SRIOV_BIN_FILE="/usr/bin/sriov" | |||
AVOID_SLEEP=0 |
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.
nit: "NO_SLEEP" ?
images/entrypoint.sh
Outdated
@@ -18,6 +19,7 @@ usage() | |||
printf "\t-h --help\n" | |||
printf "\t--cni-bin-dir=%s\n" "$CNI_BIN_DIR" | |||
printf "\t--sriov-bin-file=%s\n" "$SRIOV_BIN_FILE" | |||
printf "\t--avoid-sleep\n" |
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.
nit: --no-sleep ?
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.
makes sense. changing
Container image might be used as `initcontainers` in kubernetes Pods. In such scenarios, it's important for the image entrypoint to exits once the copy logic is completed. Otherwise, the pod would stuck in a `PodInitializing` phase. Add Makefile rule `image-test` to check the integrity of the entrypoint.sh script. https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Signed-off-by: Andrea Panattoni <[email protected]>
Pull Request Test Coverage Report for Build 7802222930
💛 - Coveralls |
8136d36
into
k8snetworkplumbingwg:master
Container image might be used as
initcontainers
in kubernetes Pods. In such scenarios, it's important for the image entrypoint to exits once the copy logic is completed. Otherwise, the pod would stuck in aPodInitializing
phase.Add Makefile rule
image-test
to check the integrity of the entrypoint.sh script.https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
refs:
{ib-}sriov-cni
entrypoint script sriov-network-operator#581