-
Notifications
You must be signed in to change notification settings - Fork 165
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
kpack monitors rfc #433
Open
matthewmcnew
wants to merge
2
commits into
buildpacks-community:main
Choose a base branch
from
matthewmcnew:rfc-kpack-monitors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
kpack monitors rfc #433
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Today, kpack provides resources to declaratively model the desired state for cnb built images and builders. These resources are simple to understand and deterministic which make them good building blocks for larger platform and CI/CD implementations. | ||
|
||
However, kpack also provides some resources with polling mechanisms that continually check for new updates (Git and Builders). These resources conflate the declarative configuration with a possible update strategy. | ||
|
||
This has resulted in confusion. Many users don’t desire a kpack polling mechanism and we have needed to create mechanisms to explicitly turn it off (PollingStrategy). Other users have been confused because they don’t want to utilize polling but assume it is required. This is especially common with git source monitoring. Explaining and documenting the role of these resources has also been made more difficult by their dual responsibilities. | ||
|
||
Despite these complexities, we still have had feature requests to provide more polling mechanisms in kpack. The Spring Team would like to be able to monitor a maven repo for updates. Other language ecosystems will likely have similar requests. At the same time, we suspect community kpack users would like to be able to leverage updates to Stacks and Stores without setting up external pipelines. | ||
|
||
### Goals: | ||
- Allow users to leverage polling of external resources without violating the sanctity of the single responsibility principle. | ||
- Experiment with monitoring and polling use-cases without significant API churn on kpack core resources. | ||
- Allow kpack “core” to align with the traditional expectations for kubernetes resources. | ||
- Allow kpack users to leverage Stack & Store updates without setting up external pipelines. | ||
- Support niche use-cases without introducing language-specific idioms in core kpack resources such as maven coordinates. | ||
- Decouple kpack critical core functionality from possibly unstable i/o intensive polling resources. | ||
|
||
### Actions to take: | ||
Start a new project/repo called kpack-monitors which will provide a set of custom resources that monitor external systems for relevant updates to kpack resources. | ||
|
||
*The immediate candidates for new resources are*: | ||
_MonitorStore_: A resource that will monitor a registry for new-build packages at a configured tag. | ||
_MonitorStack_: A resource that will monitor stack images for updated digests. | ||
_MonitorMavenSource_: A resource that will monitor a maven repo for new versions of a published jar artifact. | ||
|
||
*Possible Candidates*: | ||
_MonitorGitSource_: A resource that monitors a git repo for updated revisions. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this a "possible" candidate as opposed to something like |
||
|
||
### Prior Art: | ||
Extracting independent focused projects for related resources with distinct lifecycles is a common pattern in the Kubernetes ecosystem. | ||
|
||
Additionally, there are a couple of add-on projects which provide resources to handle updates from external sources and are good corollaries to kpack-monitors: | ||
|
||
The tekton pipeline has a sibling [tekton triggers](https://github.com/tektoncd/triggers) project which provides webhook trigger resources to initiate tekton pipelines. | ||
|
||
The argo project contains [argo events](https://argoproj.github.io/argo-events/) which provides tooling to update resources or trigger argo workflows on external events. | ||
|
||
### Complexity/Risks: | ||
There is non trivial complexity involved in creating a separate project/repo/controller. | ||
|
||
### Alternatives: | ||
We add polling primitives directly to existing kpack objects with the risk of introducing even more confusion about the intended role of our resources. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this would need to be a seperate project/repo? It seems to me like this functionality would be pretty much inline with this project and even more so is already a part of it. What value is the overhead of managing two repos providing?