image-automation-controller/config/samples
Michael Bridgen bd76267be5 Reform update strategy types
It's convenient to be able to leave out the update strategy, since
there is only one possible value at present; and if there were
alternatives, the present choice would still be a reasonable
default. However, with the format as it is, this doesn't work with
OpenAPIv3 schema, so you have to supply a value, even though there are
no parameters:

```yaml
spec:
  update:
    setters: {}
```

A more self-explanatory format which _does_ work with defaulting is to
name the strategy rather than relying on the presence of a field:

```yaml
spec:
  update:
    strategy: Setters
```

The whole `update` field can be elided and left to default. This
doesn't preclude having other strategies later, even those with
parameters, e.g.,

```yaml
spec:
  update:
    strategy: Foo
    fooParam: 5
```

This commit changes the API types and code that uses them, and the CRD
manifest, and adds a test that checks the defaulting actually works.

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-01-20 13:16:18 +00:00
..
image_v1alpha1_imageupdateautomation.yaml Reform update strategy types 2021-01-20 13:16:18 +00:00