GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remember `--registry-insecure` setting on recurring runs by creydr · Pull Request #3490 · knative/func

Remember --registry-insecure setting on recurring runs #3490

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.

Sign up for GitHub

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

Merged
knative-prow merged 18 commits into knative:main from creydr:respect-insecure-registry-on-consecutive-runs
Mar 13, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

Remember --registry-insecure setting on recurring runs #3490

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6552187
Revert "Pass --registry-insecure flag to Tekton pipeline tlsVerify pa…
creydr Mar 12, 2026
37ae142
Remember `--registry-insecure` setting on recurring runs
creydr Mar 12, 2026
7def61f
Run `make schema-generate`
creydr Mar 12, 2026
10bfeeb
Simplify parsing
creydr Mar 13, 2026
a016a3b
Extend description of flag, that values are persited
creydr Mar 13, 2026
f67d995
Add warning, when registry changed but insecure-registry is still set…
creydr Mar 13, 2026
cfa6a24
Fix typo
creydr Mar 13, 2026
ea492f9
Rerun update-codegen
creydr Mar 13, 2026
2cfb280
Cleanup test names
creydr Mar 13, 2026
5986c9d
Add unit test for WarnRegistryInsecureChange
creydr Mar 13, 2026
f42ecfd
Run schema-generate
creydr Mar 13, 2026
57d8c41
Update pkg/functions/client.go
creydr Mar 13, 2026
ad88a8b
Update pkg/functions/client.go
creydr Mar 13, 2026
d75206e
Update pkg/config/config.go
creydr Mar 13, 2026
00d336c
Update pkg/config/config.go
creydr Mar 13, 2026
96e1157
Fix format issues (goimport and gofmt)
creydr Mar 13, 2026
6ef0d42
Refactor registry-insecure unit test to make it available for the Dep…
creydr Mar 13, 2026
5a87051
Refactor GlobalConfig.WarnRegistryInsecureChange() method to function…
creydr Mar 13, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Fix format issues (goimport and gofmt)
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@creydr
creydr committed Mar 13, 2026
commit 96e115761f01884d51d82af9c3b0cb1f9d7193b7

There are no files selected for viewing

8 changes: 4 additions & 4 deletions 8 pkg/config/config.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ func (c Global) Apply(f fn.Function) Global {
if f.Registry != "" {
c.Registry = f.Registry
}
// Unconditional because bool has no "empty value". Works because
// viper resolves the correct precedence via our defaulting.
// Unconditional because bool has no "empty value". Works because
// viper resolves the correct precedence via our defaulting.
c.RegistryInsecure = f.RegistryInsecure
Comment thread
creydr marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.


return c
Expand All @@ -170,8 +170,8 @@ func (c Global) Configure(f fn.Function) fn.Function {
if c.Registry != "" {
f.Registry = c.Registry
}
// Unconditional because bool has no "empty value". Works because
// viper resolves the correct precedence via our defaulting.
// Unconditional because bool has no "empty value". Works because
// viper resolves the correct precedence via our defaulting.
f.RegistryInsecure = c.RegistryInsecure
Comment thread
creydr marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.


return f
Expand Down
12 changes: 6 additions & 6 deletions 12 pkg/functions/client.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func WithRegistry(registry string) Option {
// be skipped.
Comment thread
creydr marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

//
// NOTE: Unlike WithRegistry and other Options, which act as a fallback (function's value
// takes precedence when set), WithRegistryInsecure(true) WILL override the
// takes precedence when set), WithRegistryInsecure(true) WILL override the
// function's value unconditionally -> bool has no "unset" (unlike string's ""),
// so we cannot distinguish "not configured" from "explicitly set to false".
// As a result:
Expand All @@ -387,7 +387,7 @@ func WithRegistry(registry string) Option {
// NOTE-2: gauron99 - If we ever need to make this consistent with the rest of Options
// RegistryInsecure needs to become *bool in Function's struct & global.Config struct
// (nil == unset == empty value) and it would most likely require special use of
// cmd.Flags.Changed() and viper.IsSet() (non-standard for rest of commands)
// cmd.Flags.Changed() and viper.IsSet() (non-standard for rest of commands)
func WithRegistryInsecure(insecure bool) Option {
Comment thread

@twoGiants twoGiants Mar 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a comment here, that a WithRegistryInsecure(false) does not override function's existing true? Because one could think that this setting would set registryInsecure definitely to false.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@creydr creydr Mar 13, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted the suggestion from @gauron99 in #3490 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
return func(c *Client) {
c.registryInsecure = insecure
Expand Down Expand Up @@ -713,10 +713,10 @@ func (c *Client) Build(ctx context.Context, f Function, options ...BuildOption)
}

if c.registryInsecure {
// Unlike other With* functions (like WithRegistry) this takes bool.
// Bool has no "empty value" (like "" for string) therefore we always
// override if client's value is true.
// See WithRegistryInsecure definition comment for more info.
// Unlike other With* functions (like WithRegistry) this takes bool.
// Bool has no "empty value" (like "" for string) therefore we always
// override if client's value is true.
// See WithRegistryInsecure definition comment for more info.
f.RegistryInsecure = true
}

Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402860 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.