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

Commit

Permalink
Merge pull request #1508 from montyz/patch-1
Browse files Browse the repository at this point in the history
Sample yaml with annotations.
  • Loading branch information
squaremo authored Nov 15, 2018
2 parents 49c75fb + 5fb0838 commit 07bf84f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions site/fluxctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,5 +563,42 @@ filtering annotations take the form
[`regexp`](#regexp). Filter values use the same syntax as when the filter is
configured using fluxctl.

Here's a simple but complete deployment file with annotations:

```
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: k8s-mon
namespace: admin
annotations:
flux.weave.works/automated: "true"
flux.weave.works/tag.k8s-mon: glob:master-*
spec:
replicas: 1
strategy:
rollingUpdate:
maxUnavailable: 0
maxSurge: 50%
template:
metadata:
labels:
app: k8s-mon
spec:
containers:
- name: k8s-mon
image: index.docker.io/larktech/k8s-mon:master-c00edf01
imagePullSecrets:
- name: myregistrykey
```

Things to notice:

1. The annotations are made in `metadata.annotations`, not in `spec.template.metadata`.
2. The `flux.weave.works/tag.`... references the container name `k8s-mon`--this will change based on your container name. If you have multiple containers you would have multiple lines like that.
3. The value for the `flux.weave.works/tag.`... annotation should includes the filter pattern type, in this case `glob`.

Annotations can also be used to tell Flux to temporarily ignore certain manifests
using `flux.weave.works/ignore: "true"`. Read more about this in the [FAQ](faq.md#can-i-temporarily-make-flux-ignore-a-deployment).

0 comments on commit 07bf84f

Please sign in to comment.