Skip to content
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

dynamic host volumes: Enterprise stubs and refactor API #24545

Open
wants to merge 1 commit into
base: dynamic-host-volumes
Choose a base branch
from

Conversation

tgross
Copy link
Member

@tgross tgross commented Nov 22, 2024

Most Nomad upsert RPCs accept a single object with the notable exception of CSI. But in CSI we don't actually expose this to users except through the Go API. It deeply complicates how we present errors to users, especially once Sentinel policy enforcement enters the mix.

Refactor the HostVolume.Create and HostVolume.Register RPCs to take a single volume instead of a slice of volumes.

Add a stub function for Enterprise policy enforcement. This requires splitting out placement from the createVolume function so that we can ensure we've completed placement before trying to enforce policy.

Ref: #24479

Most Nomad upsert RPCs accept a single object with the notable exception of
CSI. But in CSI we don't actually expose this to users except through the Go
API. It deeply complicates how we present errors to users, especially once
Sentinel policy enforcement enters the mix.

Refactor the `HostVolume.Create` and `HostVolume.Register` RPCs to take a single
volume instead of a slice of volumes.

Add a stub function for Enterprise policy enforcement. This requires splitting
out placement from the `createVolume` function so that we can ensure we've
completed placement before trying to enforce policy.

Ref: #24479
Comment on lines +4 to +5
//go:build !ent
// +build !ent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: https://github.com/hashicorp/nomad-enterprise/commit/5890c50480738bfecb7eca9560218dacea82d690 has my rough prototype for what this will look like in Nomad Enterprise, so the signature here should be what we want.

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

Successfully merging this pull request may close these issues.

1 participant