Skip to content
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

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Jan 11, 2024

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/

refs:

Copy link
Collaborator

@Eoghan1232 Eoghan1232 left a 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.

Copy link
Contributor

@adrianchiris adrianchiris left a 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

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "NO_SLEEP" ?

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: --no-sleep ?

Copy link
Member Author

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]>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7802222930

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 45.959%

Totals Coverage Status
Change from base Build 7076950983: 0.0%
Covered Lines: 563
Relevant Lines: 1225

💛 - Coveralls

@adrianchiris adrianchiris merged commit 8136d36 into k8snetworkplumbingwg:master Feb 6, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants