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

Add webhook timeoutSeconds to allow configuration how long the api server should wait for webhook, default 10 second #153

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

noony
Copy link
Contributor

@noony noony commented Dec 20, 2023

Purpose

The timeout for an admission webhook defaults to 10 seconds according to kubernetes documentation.

When using ImageCopyPolicy immediate or force in some cases you need to increase it to more than 10s.

This should fix #40

Changes

  • Add .Values.webhook.timeoutSeconds configuration set default to 10 seconds has kubernetes documentation

Testing

Code Author Checklist

  • Bump the chart version (Chart.yaml -> version)
  • JSON Schema updated (values.schema.json)
  • Update README.md via helm-docs (or make prep)
  • Run pre-commit run --all-files via pre-commit (or make prep)
  • Update Artifacthub annotation (Chart.yaml -> artifacthub.io/changes, artifacthub.io/images)

@noony noony force-pushed the webhook-timeout branch 2 times, most recently from 56146af to 4f4dd06 Compare December 20, 2023 14:19
@noony
Copy link
Contributor Author

noony commented Dec 20, 2023

Hi @estahn this pr is ready, test are failing but for another reason.

------------------------------------------------------------------------------------------------------------------------
{"level":"info","file":"/.k8s-image-swapper.yaml","time":"2023-12-20T14:26:22Z","message":"using config file"}
2:26PM ERR error connecting to registry client error="NoCredentialProviders: no valid providers in chain\ncaused by: EnvAccessKeyNotFound: failed to find credentials in the environment.\nSharedCredsLoad: failed to load profile, .\nEC2RoleRequestError: no EC2 instance role found\ncaused by: 400 Bad Request: Bad Request\n\tstatus code: 400, request id: \ncaused by: EC2MetadataError: failed to make EC2Metadata request\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Error xmlns:xsi=\"[http://www.w3.org/2001/XMLSchema-instance\](http://www.w3.org/2001/XMLSchema-instance/)" xmlns:xsd=\"[http://www.w3.org/2001/XMLSchema\](http://www.w3.org/2001/XMLSchema/)">\n    <Code>InvalidHttpVerb</Code>\n    <Message>The HTTP verb specified was not recognized by the server.</Message>\n    <Details>'PUT' is not a supported verb.</Details>\n</Error>\n\tstatus code: 400, request id: "
------------------------------------------------------------------------------------------------------------------------
<== Logs of container k8s-image-swapper-4m9dk3p3cg-5db4f5c875-gwj6r

Can you help us to release it please, thanks in advance

@estahn
Copy link
Owner

estahn commented Feb 21, 2024

@noony Thanks for the PR. Can you please update with latests main?

Don't worry about the failing tests.

@noony noony force-pushed the webhook-timeout branch 2 times, most recently from 5eabcae to 86ce23c Compare February 26, 2024 14:03
…rver should wait for webhook, default 10 second
@noony
Copy link
Contributor Author

noony commented Feb 26, 2024

done @estahn

@estahn estahn merged commit 70e8654 into estahn:main Feb 26, 2024
4 of 5 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.

[k8s-image-swapper] Allows configuration of timeoutSeconds for Mutating Webhook Configuration
2 participants