Skip to content

Commit 0bed692

Browse files
committed
refactor: simplify TLS configuration handling in Helm client
- Updated the TLS configuration logic to directly reference the Insecure and CAData fields from the rest.Config struct, improving clarity and reducing complexity in the getConfigFlags function.
1 parent ca1ff5d commit 0bed692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/ctrlc/root/sync/helm/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ func getConfigFlags(config *rest.Config, namespace string) *genericclioptions.Co
103103
}
104104

105105
// Set TLS options
106-
if config.TLSClientConfig.Insecure {
106+
if config.Insecure {
107107
insecure := true
108108
configFlags.Insecure = &insecure
109109
}
110110

111-
if len(config.TLSClientConfig.CAData) > 0 {
111+
if len(config.CAData) > 0 {
112112
// CA data is embedded in the config and will be used automatically
113113
// We rely on the kubeconfig file being available rather than creating a temp file
114114
}

0 commit comments

Comments
 (0)