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

Use specified 'pod-creation-timeout' in Kubernetes API requests #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

machadovilaca
Copy link

@machadovilaca machadovilaca commented Apr 16, 2021

Flag '--pod-creation-timeout' was not being respected when requesting the creation of the pod to the Kubernetes API resulting in

Error: Post https://<url>/api/v1/namespaces/<namespace>/pods?timeout=30s: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

@machadovilaca
Copy link
Author

Any feedback?

@bostrt bostrt self-assigned this Jul 27, 2022
@bostrt
Copy link
Collaborator

bostrt commented Jul 27, 2022

Ksniff's --pod-creation-timeout right now only waits for the privileged pod to startup, after being initially created. In other words, there is not a timeout flag for the POST that creates the Pod initially (as you have pointed out with the error msg).

A downside I see to the change in this PR is that a user could potentially wait for --pod-creation-timeout twice; once during the POST and again during pod startup.

@machadovilaca what do you think about creating a new/separate --request-timeout flag that mimics the kubectl flag of the same name?

For reference:

$ kubectl options  | grep request-timeout
      --request-timeout='0': The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

@mgerasimchuk
Copy link

Faced the same problem, the --request-timeout flag will be helpful

@mgerasimchuk
Copy link

Proposed another option adding the --request-timeout flag: #179 (comment)

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.

3 participants