Omit static compute resource requests and limits from deployment

Do not specify static resource settings in the kubernetes-deployment to avoid
unnecessary replacement of pods when the manifest is reapplied (`kubectl
apply`).

The addon-resizer will dynamically set the pod compute resource values. If the
values are also set statically in the deployment configuration, reapplying the
configuration will result in the pods getting replaced. Without the static
resource, the deployment configuration can be reapplied, and the pods will not
be replaced.

This change was also made in the upstream kube-state-metrics example manifests.

https://github.com/kubernetes/kube-state-metrics/pull/285
This commit is contained in:
Svend Sorensen
2017-10-30 13:16:22 -07:00
parent 8bf449907c
commit 73e3dffa72

View File

@@ -22,13 +22,6 @@ spec:
port: 8080
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
requests:
memory: 100Mi
cpu: 100m
limits:
memory: 200Mi
cpu: 200m
- name: addon-resizer
image: gcr.io/google_containers/addon-resizer:1.0
resources: