Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Conversation

@aliok
Copy link
Member

@aliok aliok commented Apr 9, 2020

Issue to be fixed

Fixes #175

Proposed Changes

  • New DefaultBrokerClass in KnativeEventing CR
  • Make the given broker default broker

Notes:

  • Overwrites the config-br-defaults configmap based on the value given on CR

TODO:

  • Manifest update (waiting until the changes from Move broker defaults into core eventing#2947 updates the file gs://knative-nightly/eventing/latest/eventing.yaml)
  • Tooling to get new manifest files
  • Tests
  • Verification instructions

Release Note

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@aliok: 2 warnings.

Details

In response to this:

Issue to be fixed

Fixes #175

Proposed Changes

  • New DefaultBrokerClass in KnativeEventing CR
  • Make the given broker default broker

Notes:

  • Overwrites the config-br-defaults configmap based on the value given on CR

TODO:

  • Manifest update (waiting until the changes from knative/eventing#2947 updates the file gs://knative-nightly/eventing/latest/eventing.yaml)
  • Tooling to get new manifest files
  • Tests
  • Verification instructions

Release Note

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/test-infra repository.

reconcilerName = "KnativeEventing"
controllerAgentName = "knativeeventing-controller"
reconcilerName = "KnativeEventing"
ChannelBasedBrokerClass = "ChannelBasedBroker"
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: exported const ChannelBasedBrokerClass should have comment (or a comment on this block) or be unexported. More info.

MasterURL = flag.String("master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
Kubeconfig = flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
recursive = flag.Bool("recursive", false, "If filename is a directory, process all manifests recursively")
MasterURL = flag.String("master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Golint comments: exported var MasterURL should have comment or be unexported. More info.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)

import (
"context"
"flag"
"k8s.io/client-go/rest"
Copy link
Member

Choose a reason for hiding this comment

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

Format Go code:

Suggested change
"k8s.io/client-go/rest"

"flag"
"k8s.io/client-go/rest"
"os"
"path/filepath"
Copy link
Member

Choose a reason for hiding this comment

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

Format Go code:

Suggested change
"path/filepath"
"path/filepath"
"k8s.io/client-go/rest"

// +optional
Registry Registry `json:"registry,omitempty"`

// The default broker type to use for the brokers Knative creates.
Copy link
Member

Choose a reason for hiding this comment

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

The default broker class ? I mean, that's what it is :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

happy to receive naming suggestions!

recursive = flag.Bool("recursive", false, "If filename is a directory, process all manifests recursively")
MasterURL = flag.String("master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
Kubeconfig = flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
AvailableBrokerClases = []string{ChannelBasedBrokerClass, MTChannelBasedBrokerClass}
Copy link
Member

Choose a reason for hiding this comment

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

not sure if available is "right" here.

There might be others "available" ? I think I still could install my "custom broker", and set its class on the CR, right ?

Perhaps built-in? 🤷‍♂️

Copy link
Member Author

@aliok aliok Apr 9, 2020

Choose a reason for hiding this comment

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

hmm, never thought of the custom brokers.
good point. gonna change some things to support it

# to "false". To opt namespaces out of Broker injection, label
# them with:
# knative-eventing-injection: disabled
name: BROKER_INJECTION_DEFAULT
Copy link
Member

Choose a reason for hiding this comment

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

why is this here, twice ?

# to "false". To opt namespaces out of Broker injection, label
# them with:
# knative-eventing-injection: disabled
name: BROKER_INJECTION_DEFAULT
Copy link
Member

Choose a reason for hiding this comment

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

and here too

@knative-prow-robot
Copy link
Contributor

@aliok: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-knative-eventing-operator-upgrade-tests df9dc49 link /test pull-knative-eventing-operator-upgrade-tests
pull-knative-eventing-operator-integration-tests df9dc49 link /test pull-knative-eventing-operator-integration-tests

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@aliok aliok closed this Apr 9, 2020
@aliok
Copy link
Member Author

aliok commented Apr 9, 2020

I am rewriting this PR to support customer brokers as well. that will need a different approach

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broker selection fields on install

5 participants