-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-14433] Use correct kubeconfig for edit provider validation
Summary: During edit provider, kubeConfigContent is not present in the KubernetesInfo, so we defaulted to using in-cluster credentials instead of using the kubeconfig which provider has. With this change, we will check if kubeConfigContent is present, if not, check kubeConfig and use it. If both are not present we will default to using in-cluster credentials. Also, fixes an edge case where issuer is provided with non-existing namespace. Test Plan: - Removed in-cluster RBAC of YBA pod and then tried to edit an invalid provider. It used the kubeconfig from provider and validated all the parameters. - Tried adding a bogus kubeconfig, it failed as expected. - Also tried to create new provider, it is getting validated as expected. Reviewers: svarshney, rohita.payideti, #yba-api-review! Reviewed By: svarshney Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D36051
- Loading branch information
Showing
1 changed file
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters