Update annotations example to match flux-get-started
@@ -566,39 +566,41 @@ configured using fluxctl.
Here's a simple but complete deployment file with annotations:
```
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
- name: k8s-mon
- namespace: admin
+ name: podinfo
+ namespace: demo
+ labels:
+ app: podinfo
annotations:
flux.weave.works/automated: "true"
- flux.weave.works/tag.k8s-mon: glob:master-*
+ flux.weave.works/tag.podinfod: semver:~1.3
spec:
- replicas: 1
- strategy:
- rollingUpdate:
- maxUnavailable: 0
- maxSurge: 50%
+ selector:
+ matchLabels:
+ app: podinfo
template:
metadata:
labels:
- app: k8s-mon
+ app: podinfo
spec:
containers:
- - name: k8s-mon
- image: index.docker.io/larktech/k8s-mon:master-c00edf01
-
- imagePullSecrets:
- - name: myregistrykey
-
+ - name: podinfod
+ image: stefanprodan/podinfo:1.3.2
+ ports:
+ - containerPort: 9898
+ name: http
+ command:
+ - ./podinfo
+ - --port=9898
```
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`.
+2. The `flux.weave.works/tag.`... references the container name `podinfod`, 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 `semver`.
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).
