Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

docs: add other semver example with range #2866

Merged
merged 1 commit into from
Feb 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/references/automated-image-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ The above configuration will make Flux update the image when you push
an image tag that matches the [semantic version](https://semver.org/)
expression e.g `my-app:1.0.1` but not `my-app:1.2.0`.

Flux also support all the other ranges and operators available [here](https://github.com/Masterminds/semver) in addition to the `~` range.

Restrict image to deploy prerelease version up until `myapp:1.0.0` but not `myapp:1.0.1`:

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
fluxcd.io/automated: "true"
fluxcd.io/tag.app: "semver: >= 1.0.0-rc.0, <1.0.1"
spec:
template:
spec:
containers:
- name: app
image: docker.io/org/my-app:1.0.0-rc.1
```

Restrict image updates with glob and regex expressions:

```yaml
Expand Down Expand Up @@ -85,3 +104,4 @@ For the `app` container, Flux will update it when you push a tag for the
To target a specific container the annotation format is `fluxcd.io/tag.<CONTAINER>: <TYPE>:<EXPRESSION>`.

You can turn off the automation with `fluxcd.io/automated: "false"` or with `fluxcd.io/locked: "true"`.