feat: add processCredentialTimeout option to token command#940
feat: add processCredentialTimeout option to token command#940atishpatel wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
This update introduces a new flag `--process-credential-timeout` to the token command, allowing users to specify a timeout for the AWS credential_process execution. The timeout value can be set to a positive duration, overriding the SDK's default of 1 minute. The change includes updates to the `GetTokenOptions` struct and the associated binding in the command initialization.
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: atishpatel The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @atishpatel! |
|
Hi @atishpatel. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
This update introduces a new flag
--process-credential-timeoutto the token command, allowing users to specify a timeout for the AWS credential_process execution. The timeout value can be set to a positive duration, overriding the SDK's default of 1 minute. The change includes updates to theGetTokenOptionsstruct and the associated binding in the command initialization.What this PR does / why we need it:
--process-credential-timeoutflag to thetokencommand to control the AWScredential_processtimeout.GetTokenOptions.ProcessCredentialTimeoutand applies it viaconfig.WithProcessCredentialOptionsto setprocesscreds.Options.Timeout.0, the SDK’s default (1 minute) is used.Implementation highlights:
pkg/token/token.go: addedProcessCredentialTimeout time.DurationtoGetTokenOptions; set timeout inLoadDefaultConfigwhen > 0.cmd/aws-iam-authenticator/token.go: added--process-credential-timeoutflag (Duration), bound with viper, and passed toGetTokenOptions.Testing:
Testing Proof
Without Flag
With Flag
Release note:
--process-credential-timeouttoaws-iam-authenticator tokento override the default 1-minute AWS credential_process timeout.