-
Notifications
You must be signed in to change notification settings - Fork 537
Add pod_running_timeout
attribute to Kaniko
image builder
#2509
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
Add pod_running_timeout
attribute to Kaniko
image builder
#2509
Conversation
- Add attribute `pod_running_timeout` to `KanikoImageBuilderConfig` with `NonNegativeInt` number type; - Add default value `DEFAULT_KANIKO_POD_RUNNING_TIMEOUT` (defaults to 300) for new attribute `pod_running_timeout` in `KanikoImageBuilderConfig`; - Update method `_run_kaniko_build` in `KanikoImageBuilder` to run `kubectl run` with the argument `--pod-running-timeout`;
- Add description for the `pod_running_timeout` attribute;
- Update styles using `scripts/format.sh`;
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
- Change `NonNegativeInt` to `PositveInt`: `pod_running_timeout` can't be zero, it must be a positive integer to work correctly with `kubectl run` (https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run);
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.
Thanks for contributing! I left one minor suggestion to the docs.
docs/book/stacks-and-components/component-guide/image-builders/kaniko.md
Outdated
Show resolved
Hide resolved
…/kaniko.md - Update `pod_running_timeout`; Co-authored-by: Andrei Vishniakov <[email protected]>
…io#2509) * Add `pod_running_timeout` attribute to `Kaniko` image builder - Add attribute `pod_running_timeout` to `KanikoImageBuilderConfig` with `NonNegativeInt` number type; - Add default value `DEFAULT_KANIKO_POD_RUNNING_TIMEOUT` (defaults to 300) for new attribute `pod_running_timeout` in `KanikoImageBuilderConfig`; - Update method `_run_kaniko_build` in `KanikoImageBuilder` to run `kubectl run` with the argument `--pod-running-timeout`; * Update documention for `KanikoImageBuilder` - Add description for the `pod_running_timeout` attribute; * Update styles for `KanikoImageBuilder` and `KanikoImageBuilderConfig` - Update styles using `scripts/format.sh`; * Fix `pod_running_timeout` attribute type in `KanikoImageBuilderConfig` - Change `NonNegativeInt` to `PositveInt`: `pod_running_timeout` can't be zero, it must be a positive integer to work correctly with `kubectl run` (https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run); * Update docs/book/stacks-and-components/component-guide/image-builders/kaniko.md - Update `pod_running_timeout`; Co-authored-by: Andrei Vishniakov <[email protected]> --------- Co-authored-by: Alex Strick van Linschoten <[email protected]> Co-authored-by: Andrei Vishniakov <[email protected]>
Describe changes
I've added the
pod_running_timeout
attribute to theKanikoImageBuilderConfig
, so the--pod-running-timeout
flag fromkubectl run
can be specified. By default, a300
seconds timeout is set (kubectl
defaults to60
) with theDEFAULT_KANIKO_POD_RUNNING_TIMEOUT
.I've experience some difficulties when using Kaniko on GKE Autopilot, the pod provisioning for the Kaniko executor exceeds the default
60
seconds ofkubectl run
most of the time. Thus, it would be a great addition being able to control the timeout for the Pod to be running in the orchestrator.I'm not sure whether such change would require modifications on the dashboard.
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes