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

CSI: Add ControllerJob and NodeJob to the Plugin API response #7974

Closed
DingoEatingFuzz opened this issue May 14, 2020 · 5 comments
Closed

CSI: Add ControllerJob and NodeJob to the Plugin API response #7974

DingoEatingFuzz opened this issue May 14, 2020 · 5 comments
Assignees

Comments

@DingoEatingFuzz
Copy link
Contributor

It would be nice to be able to link from a CSI plugin to the jobs that power the plugin.

This is technically currently possible by doing the following:

  1. Request a plugin
  2. Request an allocation from the map of CSIInfo objects
  3. Request the job the allocation is running on behalf of

If the plugin response also had this job information (JobID, JobNamespace, JobVersion) then we can save a step.

I'm imagining six new properties on the Plugin, but since some of these may only be applicable for CSI Plugins, I don't think I'm the best judge on API design.

{
  "ID": "example",
  "Provider": "megacloud",
  "ControllerJobID": "example-controller",
  "ControllerJobNamespace": "top-secret-ops-stuff",
  "ControllerJobVersion": 1,
  "NodeJobID": "example-node",
  "NodeJobNamespace": "top-secret-ops-stuff",
  "NodeJobVersion": 2,
}
@DingoEatingFuzz
Copy link
Contributor Author

The UI would use this for #7969

@tgross
Copy link
Member

tgross commented May 15, 2020

There's one hiccup with this: more than one job and version can define a node plugin or controller plugin. It definitely seems like a weird case, but there are a couple of examples where you might see this:

  • You want to validate that a new version of a plugin provider works. You might run a controller-v1 and a controller-v2 job side-by-side.
  • You're running plugins in multiple DCs, and want to deploy each plugin/DC pair as its own job to reduce your deployment blast radius.

@tgross
Copy link
Member

tgross commented May 15, 2020

It occurs to me that this is a problem with the existing API as well and frankly with the data model we have; we define plugins by fingerprinting the jobs so that updates to jobs update the plugin definition as well. So maybe my concern isn't a problem we need to worry about.

@langmartin
Copy link
Contributor

This doesn't actually turn out to help the UI reduce the number of queries, so the API change is omitted.

@github-actions
Copy link

github-actions bot commented Nov 2, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants