-
Notifications
You must be signed in to change notification settings - Fork 20
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
Automate plugin installation #420
Conversation
Add ability to install plugin using url parameter in plugin config (plugins)
90d0824
to
aeb6d85
Compare
Fix user input scanner (use a slightly better syntax) Add maps to allow list of depguard
f214f14
to
42d6a9a
Compare
4571bae
to
3e06f08
Compare
dd13e7a
to
842f360
Compare
env: | ||
GITHUB_AUTH_TOKEN: ${{ secrets.INTEGRATION }} |
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.
This is to increase the rate limit of the GitHub API, so that consecutive CI runs don't hit the limit.
@@ -24,3 +20,18 @@ func executeCommandC(root *cobra.Command, args ...string) (string, error) { | |||
|
|||
return buf.String(), err | |||
} | |||
|
|||
// mustPullPlugin pulls the gatewayd-plugin-cache plugin and returns the path to the archive. |
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.
This is to prevent GitHub API rate limit to be reached by pulling the plugin once and reusing it (almost) everywhere.
Ticket(s)
Description
This PR introduces a notable enhancement for creating stateless pods in Kubernetes (k8s) by automating the plugin installation process. At present, installing plugins in GatewayD requires manual intervention, where each plugin is installed using the GatewayD CLI with a GitHub URL or a local file path of a plugin archive. This method requires executing
gatewayd plugin install
individually for each plugin, which is inefficient (in general and also) for Kubernetes environments. A more automated approach is needed for installing and configuring plugins in k8s. Currently, the only feasible method for plugin installation involves using a volume to store the plugins and a script to execute the plugin installation commands. This approach ensures that restarting a pod does not erase the plugin configurations and binaries.To address these challenges, this PR automates the plugin installation process by introducing a
url
parameter in thegatewayd_plugins.yaml
configuration file. Consequently, executinggatewayd plugin install
without specifying CLI arguments (such as a GitHub URL or file path) will trigger the following automated steps:gatewayd_plugins.yaml
file to extract all the plugin URLs.gatewayd_plugins.yaml
file.It also adds support for the
--overwrite-config
flag that can be used to disable overwriting the plugins config file after the plugins are installed.Note
Since the automated plugin installation relies on the
gatewayd_plugins.yaml
file to be up to date with all the configuration, local paths and checksums for the latest plugins, and overwriting the plugins config file might be disabled by the user (for example, since they use configmaps), one should make sure to use the correct local paths and checksums.Related PRs
N/A
Development Checklist
Legal Checklist