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

not support --insecure-skip-tls-verify option when helm install #219

Open
sunyeongchoi opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@sunyeongchoi
Copy link

sunyeongchoi commented Oct 7, 2024

helm install my-app oci://URL/my-app --version 1.0 --insecure-skip-tls-verify When I run this command, I should use option --insecure-skip-tls-verify when helm install.

However, go-helm-client doesn't seem to provide an option to include the --insecure-skip-tls-verify option for helm install.

So I get an error as below:

failed to do request: Head "https://REPOSITORY_URL" tls: failed to verify certificate: x509: certificate signed by unknown authority

Therefore, how about adding the code below to include the insecure-skip-tls-verify option?

// Options defines the options of a client. If Output is not set, os.Stdout will be used.
type Options struct {
  Namespace        string
  RepositoryConfig string
  RepositoryCache  string
  Debug            bool
  Linting          bool
  DebugLog         action.DebugLog
  RegistryConfig   string
  Output           io.Writer
  // [Add Option for --insecure-skip-tls-verify]
  InsecureSkipTlsVerify bool
}
	registryClient, err := registry.NewClient(
		registry.ClientOptDebug(settings.Debug),
		registry.ClientOptCredentialsFile(settings.RegistryConfig),
                // [Add Option for --insecure-skip-tls-verify]
		registry.ClientOptHTTPClient(&http.Client{
				Transport: &http.Transport{
						TLSClientConfig: &tls.Config{
						InsecureSkipVerify: options.InsecureSkipTlsVerify,
						},
				},
		}),
	)
	if err != nil {
		return nil, err
	}
	actionConfig.RegistryClient = registryClient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant