1
0
mirror of synced 2026-02-06 10:55:56 +00:00

Add {create,export} auto image-policy

Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
Michael Bridgen
2020-12-04 10:38:42 +00:00
parent b66bdec61a
commit 037a5b71fd
6 changed files with 390 additions and 0 deletions

View File

@@ -30,5 +30,6 @@ being available.
### SEE ALSO
* [flux create](flux_create.md) - Create or update sources and resources
* [flux create auto image-policy](flux_create_auto_image-policy.md) - Create or update an ImagePolicy object
* [flux create auto image-repository](flux_create_auto_image-repository.md) - Create or update an ImageRepository object

View File

@@ -0,0 +1,42 @@
## flux create auto image-policy
Create or update an ImagePolicy object
### Synopsis
The create auto image-policy command generates an ImagePolicy resource.
An ImagePolicy object calculates a "latest image" given an image
repository and a policy, e.g., semver.
The image that sorts highest according to the policy is recorded in
the status of the object.
```
flux create auto image-policy <name> [flags]
```
### Options
```
-h, --help help for image-policy
--image-ref string the name of an image repository object
--semver string a semver range to apply to tags; e.g., '1.x'
```
### Options inherited from parent commands
```
--context string kubernetes context to use
--export export in YAML format to stdout
--interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
--label strings set labels on the resource (can specify multiple labels with commas: label1=value1,label2=value2)
-n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [flux create auto](flux_create_auto.md) - Create or update resources dealing with automation

View File

@@ -26,5 +26,6 @@ The export auto sub-commands export automation object in YAML format.
### SEE ALSO
* [flux export](flux_export.md) - Export resources in YAML format
* [flux export auto image-policy](flux_export_auto_image-policy.md) - Export ImagePolicy resources in YAML format
* [flux export auto image-repository](flux_export_auto_image-repository.md) - Export ImageRepository resources in YAML format

View File

@@ -0,0 +1,44 @@
## flux export auto image-policy
Export ImagePolicy resources in YAML format
### Synopsis
The export image-policy command exports one or all ImagePolicy resources in YAML format.
```
flux export auto image-policy [name] [flags]
```
### Examples
```
# Export all ImagePolicy resources
flux export auto image-policy --all > image-policies.yaml
# Export a Provider
flux export auto image-policy alpine1x > alpine1x.yaml
```
### Options
```
-h, --help help for image-policy
```
### Options inherited from parent commands
```
--all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [flux export auto](flux_export_auto.md) - Export automation objects