Last active
January 2, 2020 16:14
-
-
Save hermanbanken/e2bfafc454a47737170e09463a684deb to your computer and use it in GitHub Desktop.
replica issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
# repro1.yaml | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: demo | |
namespace: default | |
spec: | |
replicas: 2 | |
# in next apply we'll remove this replicas property | |
strategy: { "type": "RollingUpdate", "rollingUpdate": { "maxUnavailable": 1 } } | |
selector: { "matchLabels": { "app": "demo" } } | |
template: | |
metadata: { "labels": { "app": "demo" } } | |
spec: | |
containers: | |
- image: alpine | |
name: noop | |
command: ["sh -c 'while true; do sleep 1; done'"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# repro2.yaml | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: demo | |
namespace: default | |
spec: | |
# replicas: 2 is now removed, it will default to 1 and overwrite the runtime value of 2 | |
strategy: { "type": "RollingUpdate", "rollingUpdate": { "maxUnavailable": 1 } } | |
selector: { "matchLabels": { "app": "demo" } } | |
template: | |
metadata: { "labels": { "app": "demo" } } | |
spec: | |
containers: | |
- image: alpine | |
name: noop | |
command: ["sh -c 'while true; do sleep 1; done'"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment