You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/xxxx-cli-plugin-system/README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ The `flux-<name>` binary maps to the `flux <name>` command. For example,
59
59
`flux-operator` becomes `flux operator`.
60
60
61
61
The default plugin directory is `~/.fluxcd/plugins/`. Users can override it with the
62
-
`$FLUXCD_PLUGINS` environment variable. Only this single directory is scanned.
62
+
`FLUXCD_PLUGINS` environment variable. Only this single directory is scanned.
63
63
64
64
When a plugin is discovered, it appears under a "Plugin Commands:" group in `flux --help`:
65
65
@@ -118,6 +118,19 @@ versions:
118
118
checksum: sha256:9712026094a5...
119
119
```
120
120
121
+
The plugin manifest includes metadata (name, description, homepage, source repo), the binary name
122
+
(`bin`), and a list of versions with platform-specific download URLs and checksums.
123
+
124
+
The download URLs can point to one of the following formats:
125
+
126
+
- An archive containing the binary (`tar`, `tar.gz` or `zip`), with the binary at the root of the archive. The binary name inside the archive must match the `bin` field in the manifest.
127
+
- A direct binary URL. The binary is downloaded and saved without extraction. The `bin` field is used for naming the installed plugin, not for discovery in this case.
128
+
- Note that when the OS is Windows, the binary name is composed by appending `.exe` to the `bin` field (e.g., `flux-operator.exe`).
129
+
130
+
The Flux Operator CLI detects if the URL points to an archive by checking the file extension.
131
+
If no extension is present, it checks the content type by probing for archive magic bytes after downloading the file.
132
+
If the content is not an archive, it treats it as a direct binary URL.
133
+
121
134
A generated `catalog.yaml` (`PluginCatalog` kind) contains static metadata for all
122
135
plugins, enabling `flux plugin search` with a single HTTP fetch.
123
136
@@ -265,7 +278,7 @@ directly without filesystem fixtures.
265
278
266
279
- **Default**: `~/.fluxcd/plugins/` -- auto-created by install/update commands
267
280
(best-effort, no error if filesystem is read-only).
268
-
- **Override**: `$FLUXCD_PLUGINS` env var replaces the default directory path.
281
+
- **Override**: `FLUXCD_PLUGINS` env var replaces the default directory path.
269
282
When set, the CLI does not auto-create the directory.
0 commit comments