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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate brokerclass exists #3507

Merged

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Jul 4, 2020

Validate that BrokerClass annotation is there and non-empty

Proposed Changes

  • validate that BrokerClass annotation exists and is non-empty.

Release Note

- 馃Ы Update or clean up current behavior
Can not create brokers without BrokerClassAnnotation.

Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 4, 2020
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 4, 2020
@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/eventing/v1/broker_validation.go 94.4% 95.2% 0.8
pkg/apis/eventing/v1beta1/broker_validation.go 94.4% 95.2% 0.8

@aliok
Copy link
Member

aliok commented Jul 6, 2020

/assign

@@ -31,6 +31,7 @@ const (
func MakeBroker(ns *corev1.Namespace) *v1beta1.Broker {
return &v1beta1.Broker{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{"eventing.knative.dev/broker.class": "MTChannelBasedBroker"},
Copy link
Member

Choose a reason for hiding this comment

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

There are some constants available for both of these hardcoded strings if you want to change them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

@aliok aliok left a comment

Choose a reason for hiding this comment

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

/approve

Minor comment. I can stamp the PR w/o any changes though.

Copy link
Contributor

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, 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

@knative-prow-robot knative-prow-robot merged commit e43c550 into knative:master Jul 6, 2020
@vaikas vaikas deleted the validate-brokerclass-exists branch July 8, 2020 21:25
@aliok aliok mentioned this pull request Sep 25, 2020
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants