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

kubeconfig-default-ttl-minutes setting should be made to accept only integer values #6530

Closed
anupama2501 opened this issue Jul 27, 2022 · 1 comment · Fixed by #6546
Closed
Assignees
Milestone

Comments

@anupama2501
Copy link

Setup

Rancher version: 2.6-head 78017e6
Browser type & version: Chrome

Describe the bug
Currently we can set the value for kubeconfig-default-ttl-minutes setting in the UI to any non-integer values. By accidentally setting the value to a non-integer value, when we try to download the kubeconfig button, the file will not be downloaded and fails with an error

To Reproduce

  1. On rancher v2.6-head, navigate to global settings >> Settings >> set kubeconfig-token-ttl-minutes to 2/
  2. Navigate to local explorer, click on download kubeconfig button

Result
Download fails with the error
message: "failed to get default token TTL: failed to parse setting 'kubeconfig-default-ttl-minutes': error parsing token ttl: time: unknown unit \";m\" in duration \"2;m\""
Expected Result
UI not allowing to save non integer values.

Related: #6120

@anupama2501
Copy link
Author

Verified on v2.6-head 6629e3e

Input takes only integer values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants