Files
airshipctl/cmd/document/testdata/TestPluginGoldenOutput/document-plugin-cmd-with-help.golden
Dmitry Ukov 39ee048451 Introduce document plugin subcommand
airship document plugin is intended to be executed as an exec plugin
for kustomize document model.
Environment variable is used to gather plugin configuration. Plugin to
execute is determined based on group-version-kind specified in plugin
configuration. Each airship plugin must implement plugin interface.

Relates-To: #173
Change-Id: I4f6c3b5be140c0d8fd7519f1cedd33de1cef662c
2020-04-21 15:00:22 +04:00

28 lines
834 B
Plaintext

Subcommand reads configuration file CONFIG passed as
a first argument and determines a particular plugin to execute. Additional
arguments may be passed to this sub-command abd can be used by the
particular plugin. CONFIG file must be structured as kubernetes
manifest (i.e. resource) and must have 'apiVersion' and 'kind' keys.
Example:
$ cat /tmp/generator.yaml
---
apiVersion: airshipit.org/v1alpha1
kind: BareMetalHostGenerator
spec:
hostList:
- mac: 00:aa:bb:cc:dd
powerAddress: redfish+http://1.2.3.4/
$ airshipctl document plugin /tmp/generator.yaml
subcommand will try to identify appropriate plugin using apiVersion and
kind keys (a.k.a group, version, kind) as an identifier. If appropriate
plugin was not found command returns an error.
Usage:
plugin CONFIG [ARGS] [flags]
Flags:
-h, --help help for plugin