Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(common): KubernetesHelper.exportKubernetesClientConfigToFile shou…
…ld not set certificate related fields in NamedCluster when `trustCerts=true` While adapting tests in HelmService for install goal, I'm facing problems with exported kubeconfig file. It is getting rejected by Kubernetes as invalid kubeconfig file. In KubernetesMockServer tests, we enable `trustCerts` option to skip certificate verification. However, ClusterConfiguration creates a KubernetesClient config object by merging opinionated default with user provided cluster attributes, this causes resulting config to contain additional fields from user's kubernetes environment. To work around this error, we should not set `certificateAuthority` and `certificateAuthorityData` fields whenever `trustCerts` is enabled. Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information