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
[WIP] 📖 Add docs for writing provider integrations #30
base: main
Are you sure you want to change the base?
[WIP] 📖 Add docs for writing provider integrations #30
Changes from 2 commits
aedc7b9
d3da49d
530ad5e
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.
It seems that this part will be the most important, so I would recommend addressing it before we merge this PR.
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.
Same here as before. As long as there is no common structure for
ProviderNodeImageRelease
specs will most likely differ fundamentally resulting in bad readability on provider's code.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 don't agree here. Why should that be the case? Reliability of code will be mostly about how people write their code, not about how they name their API. And we cannot control how they write the code anyway.
Maybe I misunderstand also what you mean, so you can elaborate maybe?
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.
It's about using Go's rudimentary support for interfaces to enforce / provide a certain structure for resources expected to be handled the same way for each provider implementation anyway not how the result is achieved using provider specific code that will be fundamentally different.
Take a look at CSI drivers as an example. They all implement common interfaces and work with storage classes. Commonly under parameters the filesystem type was and sometimes is defined as
fstype
. This meant that is was not always named the same way and moving from cloud to cloud got complicated. These days theexternal-provisioner
handles PVC requests and storage classes. They provided the common name [1]csi.storage.k8s.io/fstype
to handle the filesystem type the same way for all CSI drivers [2] and the common interface they share (it's used in e.g.NodeStageVolume
underreq.VolumeCapability
).[1] https://kubernetes-csi.github.io/docs/external-provisioner.html#storageclass-parameters
[2] https://github.com/kubernetes-csi/external-provisioner/blob/b255ee8f41384b330388c00a5f9252aff343fecf/pkg/controller/controller.go#L612
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.
We evaluated an interface approach, taking the Cloud Controller Manager as example. However, this is unfortunately not possible, same as with CAPI Provider Integrations, as provider-specific CRDs are needed!