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

Introduce a --registry-insecure flag #2234

Merged
merged 5 commits into from
Mar 16, 2024

Conversation

dprotaso
Copy link
Member

  • fix env var casing otherwise flags with hyphens will continue to have hyphens
  • Introduce an --registry-insecure flag

@knative-prow knative-prow bot requested a review from maximilien March 16, 2024 01:02
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2024
@knative-prow knative-prow bot requested a review from navidshaikh March 16, 2024 01:02
@knative-prow knative-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 16, 2024
@dprotaso
Copy link
Member Author

/hold

Deploy is still broken.

Tthough I'm noticing 'insecure' in oci.Pusher code is being confused with anonymous user so I'm unsure what's best to do here

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2024
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 16, 2024
@dprotaso
Copy link
Member Author

/hold cancel

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2024
@dprotaso
Copy link
Member Author

All good now - anon is still disabled by default (like it was before).

Insecure flag changes the registry scheme

@@ -58,6 +58,7 @@ Learn more about Knative at: https://knative.dev`, cfg.Name),
// a version prefixed by "FUNC_"
viper.AutomaticEnv() // read in environment variables for FUNC_<flag>
viper.SetEnvPrefix("func") // ensure that all have the prefix
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
Copy link
Member

Choose a reason for hiding this comment

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

Good stuff! I am surprised this isn't the default behavior

@@ -170,6 +171,7 @@ func bindEnv(flags ...string) bindFunc {
}
viper.AutomaticEnv() // read in environment variables for FUNC_<flag>
viper.SetEnvPrefix("func") // ensure that all have the prefix
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
Copy link
Member

Choose a reason for hiding this comment

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

And this duplicate directive is another reason we have a flag refactor/cleanup in the works

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 16, 2024
Copy link

knative-prow bot commented Mar 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, lkingland

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit 1d0d761 into knative:main Mar 16, 2024
36 of 37 checks passed
@dprotaso dprotaso deleted the registry-insecure-flag branch March 16, 2024 11:48
matzew added a commit to matzew/kn-plugin-func that referenced this pull request Mar 25, 2024
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
matzew added a commit to matzew/kn-plugin-func that referenced this pull request Mar 27, 2024
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
knative-prow bot pushed a commit that referenced this pull request Mar 27, 2024
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants