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.
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
Migration Design: Rename Bundle to ClusterBundle #485
base: main
Are you sure you want to change the base?
Migration Design: Rename Bundle to ClusterBundle #485
Changes from all commits
be2f40d
702eb96
553f662
dd44ef1
c559344
19cebb2
78d85b1
6b04cd9
ce7c573
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think we should also add a clear message in the
Bundle
.status
stating that using theBundle
is deprecated.Also, the validation webhook should throw a warning explaining that the
Bundle
resources are deprecated.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.
CRDs supports deprecating APIs/versions, and we can tailor the warning message. Isn't this enough?
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.
Im pretty sure the CRD deprecation warning tells you every time you run kubectl against it, we can test this though to make sure thats true with all the commands (describe, get, apply). If that is the case then I think a CRD deprecation warning is enough
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.
I've often thought that instead of having
spec.target.configMap
andspec.target.secret
we should just havespec.targets
which is an array of object references including apiVersion and kind.This makes supporting future sources much easier, say for example if we wanted to add a plugin system like cert-manager has.
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.
Interesting! Could you draw an example? 😊
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.
🤦 I was thinking of sources not targets, for example:
In my head it would mean that AWS for example could release an operator that exposes the
AWSPrivateCABundleSource
that a user creates to reference their private ca. Then by referencing thatAWSPrivateCABundleSource
object in a bundle we pick up the CA.That kind of support would be added in the longer term, not this piece of work, but the API change could enable that future.
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.
Good input, thanks! I suggest moving the detailed API changes discussion to #242. I have also opened #486, which will be modified to change the initially unserved
ClusterBundle
- after it's introduced.For this design, I suggest we agree that we should consider changing the API. And not exactly what we want to change. Are you ok with this approach?
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.
There are two conflicting goals here:
Bundle
resourceBundle
resource and start using theClusterBundle
instead.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.
An alternative approach here would be to add owner references and document how to remove those owner references when you want to start using the
ClusterBundle
as the new "source of truth".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.
If "owner references" are too complex, we can also implement our own garbage collector (eg. using labels).
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.
Why do you consider this as "conflicting goals"? I did not mention "do not want to break the behavior when deleting the Bundle resource" as a goal specifically, did I? 🤔 Considering the alpha state of Bundle API, I don't see a big harm in potentially orphaning some resources that can easily be deleted by the user as a workaround. The alternative could be a lot more destructive.
As a user, I don't want my
ClusterBundle
to be deleted when the correspondingBundle
is deleted. Maybe I am missing your point. Please clarify!