Skip to content

Add check for ExtraMount duplicate checking #609

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bshephar
Copy link
Contributor

@bshephar bshephar commented Mar 7, 2025

If an ExtraMount is provided with two mountPaths that are the same, the creation of Kubernetes objects will be blocked. This function will allow us to verify early before we try to create the Kubernetes objects. Such as in webhook validations.

If an ExtraMount is provided with two mountPaths that are the same,
the creation of Kubernetes objects will be blocked. This function will allow us to
verify early before we try to create the Kubernetes objects. Such as in webhook
validations.

Signed-off-by: Brendan Shephard <[email protected]>
@fmount
Copy link
Contributor

fmount commented Apr 6, 2025

The point is: k8s would block you by default and it returns a pretty nice verbose message because you're mounting something twice. In other words, we rely on k8s to provide this kind of check.
At that point you can go back to your CR and fix it. Is there a particular use case I'm missing?

@fmount
Copy link
Contributor

fmount commented Apr 6, 2025

however I think I see an interesting use case

The point is: k8s would block you by default and it returns a pretty nice verbose message because you're mounting something twice. In other words, we rely on k8s to provide this kind of check. At that point you can go back to your CR and fix it. Is there a particular use case I'm missing?

Thinking a little bit more about this, I recognize that there might be an opportunity to improve webhooks and call this function in advance to analyze what has been passed through extraMounts. Is your idea going to that direction?

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