Default Channel support for Channel CRDs#1560
Conversation
# Conflicts: # pkg/reconciler/sequence/resources/channel.go
|
Just a quick question, regarding the proposed changes: I find this interesting. I would expect no changes to existing channels or brokers, but what you seem to describe in your example. Changing the configmap, then deleting a broker I find interesting. I think I would expect the behaviour to be that if you change the configmap, then recreate the broker, the new defaults would be applied. |
Good catch. My previous impl did that, not the current one. If you change the defaults and delete a broker, it will get re-created with the new config. Sorry for the confusion. Let me remove that from the PR description... |
vaikas
left a comment
There was a problem hiding this comment.
Awesome sauce, thanks for doing this, will definitely help with usability. Just a couple of minor things, mainly around documentation, tracking bugs, etc.
|
Looks like the channel_types.go not having any test coverage is causing the test failure? |
| cs.Address = &v1alpha1.Addressable{} | ||
| } | ||
| if address != nil && address.URL != nil { | ||
| cs.Address.Hostname = address.URL.Host |
There was a problem hiding this comment.
This looks dangerous. We can only set Hostname if nothing in the URL is needed (i.e. path, query string, etc. are both empty).
There was a problem hiding this comment.
copy/paste from Matt's changes when he migrated to the new Addressable. We are doing this all over...
You'd rather not set anything in the hostname? I'm more inclined to leave it as is, and maybe then revisit how we are doing it everywhere...
|
code coverage must be at least 50% for each file to pass the test. |
Added it, and a couple others. Let's see now. |
|
The following is the coverage report on pkg/.
|
Thanks @lionelvillard, wasn't aware of that! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nachocano, vaikas-google The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
fyi initial documentation in this PR |
Helps with #1343
A separate documentation PR plus defaulting Sequence's channels should fix it.
Proposed Changes
channel.spec.channelTemplate, in case such value hasn't been set, which we assume will be the typical case. In other words, if the user knows she wants an InMemoryChannel, she will directly instantiate it, instead of through this proxy Channel object.broker.spec.channelTemplateSpecif it hasn't been set, in order to enable default channel CRDs when using the namespace injection.Release Note