Repository navigation
Conversation
Downloads and uploads through a published endpoint with a self-signed certificate fail with x509: certificate signed by unknown authority, and the client always enforces verification there, even when the kubeconfig or --insecure-skip-tls-verify disables it for kube-apiserver. Add --data-insecure-skip-tls-verify to 'data export download', 'data export list' and 'data import upload'. It affects only the connection to the data endpoint, never kube-apiserver, and prints a warning to stderr when used. Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Member
Author
|
Moved to the internal repository for review. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
--data-insecure-skip-tls-verifyford8 data export download,d8 data export listandd8 data import upload(including the Windows build ofupload).SetTLSCAData). The connection to kube-apiserver still follows the kubeconfig and the kubectl flags.SafeClientkeeps the setting inCopy().download.Why do we need it, and what problem does it solve?
Downloading or uploading through a published endpoint whose certificate is self-signed fails with
x509: certificate signed by unknown authority. The client always enforces verification for the data endpoint, even when the kubeconfig or--insecure-skip-tls-verifydisables it for kube-apiserver, so there was no way to work with such an endpoint. The standard--insecure-skip-tls-verifyis already registered bygenericclioptionsfor kube-apiserver, so a separate flag is used to keep the two connections independent.The confirmation prompt can already be skipped by setting
--cleanupexplicitly, so no flag is added for it.What is the expected result?
With
--data-insecure-skip-tls-verify,d8 data export download --publishworks against an endpoint with a self-signed certificate and prints a warning; without the flag the behaviour does not change. A new unit test runs the client against anhttptestTLS server with a self-signed certificate: without the flag it getsx509.UnknownAuthorityError, with the flag the request succeeds.Checklist