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

How to skip hostname validation in the client used by NewPodCommandExecutor #7765

Open
sai-sandeep-1 opened this issue May 2, 2024 · 2 comments

Comments

@sai-sandeep-1
Copy link

func NewPodCommandExecutor(restClientConfig *rest.Config, restClient poster) PodCommandExecutor {

I have a use case where the server certificate is self-signed and doesn't have a hostname in the SAN

How can I make it so that the hostname validation is skipped but the certificate verification still happens when using the PodCommandExecutor?

Most kubernetes clients support constructors that allow passing the HTTP client
func NewForConfigAndClient(c *rest.Config, h *http.Client)
this helps in configuring the TLS in the HTTP client to skip the hostname validation if needed.

Is there something that can be done for the pod command executor?

@reasonerjt
Copy link
Contributor

Are you trying to import velero's package in your code?
Please feel free to fork the repo to add such support, but it may not be merged into upstream, because at the moment velero doesn't have a use case to skip cert when executing hooks.

@sai-sandeep-1
Copy link
Author

Yes, I am using velero as a package in the code. Got it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants