Skip to content

Hold ksvc name in status.firstServiceName to fixed URL allocated - #37

Merged
tom24d merged 1 commit into
masterfrom
holdname
Jun 16, 2020
Merged

tom24d merged 1 commit into
masterfrom
holdname

Conversation

@tom24d

@tom24d tom24d commented Jun 15, 2020

Copy link
Copy Markdown
Owner

The context is refereed in #28 (comment) .

@tom24d

tom24d commented Jun 16, 2020

Copy link
Copy Markdown
Owner Author

I think this is needed.

@tom24d
tom24d merged commit 9e4a4f2 into master Jun 16, 2020
@tom24d
tom24d deleted the holdname branch June 16, 2020 10:09
@aliok

aliok commented Jun 22, 2020

Copy link
Copy Markdown

@tom24d sorry, I didn't understand why this change was needed (checked #28 as well)

@tom24d

tom24d commented Jun 22, 2020 •

Copy link
Copy Markdown
Owner Author

@aliok
If you use this source normally, this change does not affect daily use.
I am imagining that there might be a case that the user accidentally deletes adapter ksvc like:
k delete ksvc dockerhub-source-...

If the ksvc gets deleted manually, the source should re-create ksvc. That is the principal of Reconciliation. However the source could not allocate former URL, because, if my understanding is correct, there is no way to allocate specific URL from controller code, without re-using existed resource name.

Option:
I thought it could be good to set same resource name/ns in backing ksvc and dockerhubsource, but the other source like GitHubSource's or GitLabSource's one always have generatedName field, so I assume that is not good act. That is why first created ksvc name is set by generatedName whereas from the second created ksvc name is set using first created ksvc's one.

The point is, I do not want to make user bothered to re-configure webhook manually if they accidentally exec k delete. That change makes permanent 1:1 relation for allocated URL and applied source.

but, I can understand this might be overdoing. WDYT?

@tom24d

tom24d commented Jun 22, 2020

Copy link
Copy Markdown
Owner Author

Sorry if this is a difficult explanation to understand... does it make sense?

@tom24d

tom24d commented Jun 22, 2020

Copy link
Copy Markdown
Owner Author

This change is for improving user/developer experience.
Actually I do not know actual use case in the industry for event source. It might be @aliok you have a better opinion for that. If this change is not worthy, of course I can revert it👍

@aliok

aliok commented Jun 23, 2020

Copy link
Copy Markdown

@tom24d thanks for the explanation, it makes sense.

The name sound a bit confusing though. I though it has something to do with the sink, but it is related to the RA.

How about receiteAdapterServiceName or something like that?

@tom24d

tom24d commented Jun 23, 2020

Copy link
Copy Markdown
Owner Author

Sounds great! I will make a patch for it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants