|
1 | 1 | # plugins |
| 2 | + |
| 3 | +## Plugin Spec |
| 4 | + |
| 5 | +PluginSpec defines the desired state of Plugin |
| 6 | + |
| 7 | +``` |
| 8 | +type PluginSpec struct { |
| 9 | + Type string `json:"type,omitempty"` |
| 10 | + Data string `json:"data,omitempty"` |
| 11 | + Action string `json:"action,omitempty"` |
| 12 | + Scope string `json:"scope,omitempty"` |
| 13 | +} |
| 14 | +``` |
| 15 | + |
| 16 | +1. for `PluginSpec.Type`: plugin type,currently only supported "SHELL". |
| 17 | +2. for `PluginSpec.Data`: plugin`s real data, sealer will use it to do actual action. |
| 18 | +3. for `PluginSpec.Scope`: plugin`s scope, it is usually the role name, support use '|' to specify multiple scopes. |
| 19 | +4. for `PluginSpec.Action`: phase of this plugin will run. below is the phase list we currently supported. |
| 20 | + |
| 21 | +plugin will be executed by `PluginSpec.Name` in alphabetical order at the same stage. |
| 22 | + |
| 23 | +The following is a detailed introduction for plugin action. |
| 24 | + |
| 25 | +| action name | action scope | explanation | |
| 26 | +| :-----| ----: | :----: | |
| 27 | +| pre-init-host | cluster host | will run before init cluster host | |
| 28 | +| post-init-host | cluster host | will run after init cluster host | |
| 29 | +| pre-clean-host | cluster host | will run before clean cluster host | |
| 30 | +| post-clean-host | cluster host | will run after clean cluster host | |
| 31 | +| pre-install | master0 | will run before install cluster | |
| 32 | +| post-install | master0 | will run after install cluster | |
| 33 | +| pre-uninstall | master0 | will run before uninstall cluster | |
| 34 | +| post-uninstall | master0 | will run after uninstall cluster | |
| 35 | +| pre-scaleup | master0 | will run before scaleup cluster | |
| 36 | +| post-scaleup | master0 | will run after scaleup cluster | |
| 37 | +| upgrade-host | cluster host | will run before upgrade cluster | |
| 38 | +| upgrade | master0 | will run for upgrading cluster | |
| 39 | + |
0 commit comments