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

Kubernetes config validation update #19123

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Kubernetes config validation update #19123

merged 1 commit into from
Feb 10, 2023

Conversation

zofskeez
Copy link
Contributor

When validation was added to the manual config form to require kubernetes_host, this impacted the inferred config workflow and prevented it from saving. The validator was updated to only require kubernetes_host if disable_local_ca_jwt is true.

@zofskeez zofskeez added this to the 1.13.0-rc1 milestone Feb 10, 2023
@zofskeez zofskeez enabled auto-merge (squash) February 10, 2023 06:09
kubernetesHost: [{ type: 'presence', message: 'Kubernetes host is required' }],
kubernetesHost: [
{
validator: (model) => (model.disableLocalCaJwt && !model.kubernetesHost ? false : true),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a case where the config may be set manually using the CLI, and disabled_local_ca_jwt is true, but then the user wants to come to the UI to edit the config to use the local cluster?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think that would be possible. The user would still be able to update the config and add a value for kubernetes_host.

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@zofskeez zofskeez merged commit d9c8a8f into main Feb 10, 2023
@zofskeez zofskeez deleted the ui/k8s-config-save-bug branch May 6, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants