Trigger rollout with a change to spec.template

The documentation clearly says:
```
Note: A Deployment’s rollout is triggered if and only if the
Deployment’s pod template (that is, .spec.template) is changed, for
example if the labels or container images of the template are updated.
Other updates, such as scaling the Deployment, do not trigger a
rollout.
```

Read: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
This commit is contained in:
Robert Schäfer 2019-03-25 16:47:08 +01:00
parent ecbdfdfb55
commit 09b6cbaba5
3 changed files with 7 additions and 7 deletions

View File

@ -4,8 +4,6 @@
metadata: metadata:
name: nitro-backend name: nitro-backend
namespace: human-connection namespace: human-connection
labels:
commit: "COMMIT"
spec: spec:
replicas: 1 replicas: 1
minReadySeconds: 15 minReadySeconds: 15
@ -20,6 +18,7 @@
template: template:
metadata: metadata:
labels: labels:
human-connection.org/commit: COMMIT
human-connection.org/selector: deployment-human-connection-backend human-connection.org/selector: deployment-human-connection-backend
name: "nitro-backend" name: "nitro-backend"
spec: spec:

View File

@ -3,8 +3,6 @@ kind: Deployment
metadata: metadata:
name: nitro-web name: nitro-web
namespace: human-connection namespace: human-connection
labels:
commit: "COMMIT"
spec: spec:
replicas: 2 replicas: 2
minReadySeconds: 15 minReadySeconds: 15
@ -15,6 +13,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
human-connection.org/commit: COMMIT
human-connection.org/selector: deployment-human-connection-web human-connection.org/selector: deployment-human-connection-web
name: nitro-web name: nitro-web
spec: spec:

View File

@ -1,3 +1,5 @@
metadata: spec:
labels: template:
commit: <COMMIT> metadata:
labels:
human-connection.org/commit: <COMMIT>