as default and changes the flux resource suspend behavior to only apply
the suspend reason annotation when a non-empty reason is provided.
Signed-off-by: Travis Mattera <travis@mattera.io>
accepts a reason for why the resource was suspended.
Defines the resource metadata annotation key that stores the reason for
the resource suspension.
Updates the suspend and resume resource patching to add or remove the
annotation holding the suspend reason.
Signed-off-by: Travis Mattera <travis@mattera.io>
It's a common pattern in the create commands to construct a value,
then (if not exporting it) upsert it and wait for it to
reconcile. This commit factors `upsert`, which does the update/insert
bit, and `upsertAndWait`, which does the whole thing.
Since these output messages, they are methods of `apiType` (previously
`names`), so that they have access to the name of the kind they are
operating on.
Signed-off-by: Michael Bridgen <michael@weave.works>
This means all the sub-subcommands can drop the `image-` prefix,
making them shorter and more fluent.
E.g.,
flux create image policy
rather than
flux create auto image-policy
Signed-off-by: Michael Bridgen <michael@weave.works>