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

create v1beta1 brokers, use context for defaulting #2651

Merged
merged 6 commits into from
Feb 26, 2020

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Feb 26, 2020

Addresses #2128

Proposed Changes

  • when labeling a namespace for broker, use v1beta1 brokers
  • use context propagation for getting the defaults for the broker

Release Note

- 🎁 Add new feature
Create v1beta1 brokers when a namespace is labeled.

Docs

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 26, 2020
@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 26, 2020
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release labels Feb 26, 2020
Comment on lines +149 to +151
ctxFunc := func(ctx context.Context) context.Context {
return store.ToContext(ctx)
}
Copy link
Member

@dprotaso dprotaso Feb 26, 2020

Choose a reason for hiding this comment

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

If your APIs defaulting is now dependent on the store/config in the context - you'll need to update the conversion webhook context decorator - it will invoke defaulting on the way out

Copy link
Contributor

Choose a reason for hiding this comment

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

that is good to know!

Copy link
Contributor

Choose a reason for hiding this comment

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

@vaikas vaikas removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2020
@@ -0,0 +1 @@
core/configmaps/default-imc.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Add trailing newline:

Suggested change
core/configmaps/default-imc.yaml
core/configmaps/default-imc.yaml

@@ -0,0 +1 @@
core/configmaps/default-broker.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Add trailing newline:

Suggested change
core/configmaps/default-broker.yaml
core/configmaps/default-broker.yaml

@vaikas vaikas marked this pull request as ready for review February 26, 2020 23:02
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/config/defaults.go Do not exist 80.0%
pkg/apis/config/store.go Do not exist 100.0%

)

// MakeBroker creates a default Broker object for Namespace 'namespace'.
func MakeBroker(ns *corev1.Namespace) *v1alpha1.Broker {
return &v1alpha1.Broker{
func MakeBroker(ns *corev1.Namespace) *v1beta1.Broker {
Copy link
Contributor

Choose a reason for hiding this comment

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

HYPE

@n3wscott
Copy link
Contributor

/lgtm
/approve
/omgyes

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n3wscott, vaikas

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

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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants