-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
HTTP API for pinning plugin versions #25105
Conversation
return logical.ErrorResponse("missing plugin version"), nil | ||
} | ||
if builtin { | ||
return logical.ErrorResponse("cannot pin a builtin plugin: %q", pluginVersion), nil |
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'd like to support pinning to builtin versions, but it requires a bit of extra thought and logic because of the fact we don't want to store builtin versions in storage (they disappear/change as Vault gets updated), so I've deferred this for now.
}, nil | ||
resp := &logical.Response{} | ||
if dbi, err := b.GetConnection(ctx, req.Storage, name); err == nil { | ||
config.RunningPluginVersion = dbi.runningPluginVersion |
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 would be good to add running SHA256 as well like we have for secrets/auth plugins, but this requires a bit of refactoring in the sdk package, so to be pragmatic (and safe) I've left it as just the plugin version for now.
Build Results: |
CI Results: |
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.
LGTM
Thanks! |
Adds the HTTP API for pinning plugin versions, building on #24960. This lets users in the root namespace safely upgrade plugin versions for the cluster without having to enumerate through child namespaces.
Also:
running_plugin_version
field to the response when reading a database connection config so that users can see when their configured plugin version is being overridden by a pinvault/http
and operate on the API like a normal clientGiven the size of this already, I've deferred API docs to the next PR.