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

event stream: add events for CSI volumes and plugins #24724

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Dec 19, 2024

Adds new topics to the event stream for CSI volumes and CSI plugins. We'll emit events when either is created or deleted, and when CSI volumes are claimed.

Ref: #24721

Description

Testing & Reproduction steps

In addition to the unit tests, you can use nomad operator api "/v1/event/stream?topic=CSIVolume" to poll for CSI volume events while running the host path demo.

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

aimeeu
aimeeu previously approved these changes Dec 19, 2024
Adds new topics to the event stream for CSI volumes and CSI plugins. We'll emit
event when either is created or deleted, and when CSI volumes are claimed.
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

lgtm!

return false
}
case structs.TopicCSIPlugin:
if ok := aclObj.AllowNsOp(subReq.Namespace, acl.NamespaceCapabilityReadJob); !ok {
Copy link
Member

Choose a reason for hiding this comment

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

was ReadJob selected because the CSIPlugin contains alloc information (and whatever JobDescriptions is)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Although the reason we're using it here is because the CSIPlugin.Read RPC handler uses the same permission, and they should match 😁

@tgross tgross merged commit c3ac9c1 into main Dec 19, 2024
32 checks passed
@tgross tgross deleted the csi-event-stream branch December 19, 2024 20:26
gulducat pushed a commit that referenced this pull request Dec 20, 2024
Adds new topics to the event stream for CSI volumes and CSI plugins. We'll emit
event when either is created or deleted, and when CSI volumes are claimed.
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.

3 participants