-
Notifications
You must be signed in to change notification settings - Fork 139
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
Clarify --registry-insecure flag description #2348
Clarify --registry-insecure flag description #2348
Conversation
Hi @norbjd. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2348 +/- ##
==========================================
+ Coverage 60.22% 63.11% +2.88%
==========================================
Files 128 128
Lines 14890 11532 -3358
==========================================
- Hits 8968 7278 -1690
+ Misses 5003 3339 -1664
+ Partials 919 915 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I can't really understand why the integration test is failing (logs seems ok to me, but I have trouble reading the logs). I'm assuming the test is just flaky and will work after a few retries 🔧 |
@norbjd for some reason tests run out of space in the GH action. |
@dsimansk would you please override the test? |
/lgtm |
/override "Integration Test (ubuntu-latest)" |
@dsimansk: Overrode contexts on behalf of dsimansk: Integration Test (ubuntu-latest) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matejvasek, norbjd The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
--registry-insecure
flag description/kind documentation
Related to #2335, where we discovered that the description of
registry-insecure
flag was not really accurate/clear.After investigation, I've found that enabling this flag just means "skip TLS certificate verification when communicating to the registry", not "allow plain HTTP registries", as the current description ("Disable HTTPS when communicating to the registry") can let users think.
Today, the
RegistryInsecure
boolean in the config (filled from the flag) is used at two places:build
command: https://github.com/knative/func/blob/1e7dd33/cmd/build.go#L389The value is simply forwarded to the
Pusher
, and is used to configureInsecureSkipVerify
: https://github.com/knative/func/blob/1e7dd33/pkg/oci/pusher.go#L129-L135:deploy
command: https://github.com/knative/func/blob/1e7dd33/cmd/deploy.go#L282The value is simply forwarded to the
fn.Client
(throughNewClient
): https://github.com/knative/func/blob/1e7dd33/cmd/client.go#L58, and then used to create the transport withInsecureSkipVerify
:https://github.com/knative/func/blob/1e7dd33/cmd/client.go#L96-L98
I'm pretty confident it's not used elsewhere, but I'm not familiar with the codebase, so tell me if I've missed something.
Note: To me, a better solution would be to completely rename this flag, to something like
--insecure-skip-verify
or--registry-insecure-skip-verify
, as it's effectively only used to configure theInsecureSkipVerify
booleans in HTTP transport-related parts of the code.However, since renaming is a breaking change, I'm not sure if it can be done easily. Another approach, if we want to rename, would be to just 1) add a new flag
--insecure-skip-verify
, 2) deprecate the existing--registry-insecure
, and 3) eventually sunset--registry-insecure
.Internally changing the variable name from
RegistryInsecure
toInsecureSkipVerify
, without touching the flag name, is also possible though. Tell me what you think of this.In the meantime, changing the description is a good first step IMO to help users figuring out what this flag really means.
Release Note
/
Docs
/