Set cpu/memory resources requests/limits for some addons

* Set resource requests and limits for Grafana and CLUO
* Set resource requests for Prometheus, but allow usage
to grow since needs vary widely
* Leave nginx without resource requests/limits for now,
its typically well behaved
This commit is contained in:
Dalton Hubble 2019-03-20 00:15:08 -07:00
parent 1feefbe9c6
commit 6dd2731046
4 changed files with 58 additions and 39 deletions

View File

@ -18,20 +18,15 @@ spec:
annotations: annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec: spec:
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers: containers:
- name: update-agent - name: update-agent
image: quay.io/coreos/container-linux-update-operator:v0.7.0 image: quay.io/coreos/container-linux-update-operator:v0.7.0
command: command:
- "/bin/update-agent" - "/bin/update-agent"
volumeMounts:
- mountPath: /var/run/dbus
name: var-run-dbus
- mountPath: /etc/coreos
name: etc-coreos
- mountPath: /usr/share/coreos
name: usr-share-coreos
- mountPath: /etc/os-release
name: etc-os-release
env: env:
# read by update-agent as the node name to manage reboots for # read by update-agent as the node name to manage reboots for
- name: UPDATE_AGENT_NODE - name: UPDATE_AGENT_NODE
@ -42,10 +37,22 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
tolerations: resources:
- key: node-role.kubernetes.io/master requests:
operator: Exists cpu: 10m
effect: NoSchedule memory: 20Mi
limits:
cpu: 20m
memory: 40Mi
volumeMounts:
- mountPath: /var/run/dbus
name: var-run-dbus
- mountPath: /etc/coreos
name: etc-coreos
- mountPath: /usr/share/coreos
name: usr-share-coreos
- mountPath: /etc/os-release
name: etc-os-release
volumes: volumes:
- name: var-run-dbus - name: var-run-dbus
hostPath: hostPath:

View File

@ -15,6 +15,10 @@ spec:
annotations: annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec: spec:
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers: containers:
- name: update-operator - name: update-operator
image: quay.io/coreos/container-linux-update-operator:v0.7.0 image: quay.io/coreos/container-linux-update-operator:v0.7.0
@ -25,7 +29,11 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
tolerations: resources:
- key: node-role.kubernetes.io/master requests:
operator: Exists cpu: 10m
effect: NoSchedule memory: 20Mi
limits:
cpu: 20m
memory: 40Mi

View File

@ -32,11 +32,11 @@ spec:
containerPort: 8080 containerPort: 8080
resources: resources:
requests: requests:
memory: 100Mi
cpu: 100m cpu: 100m
memory: 100Mi
limits: limits:
memory: 200Mi
cpu: 200m cpu: 200m
memory: 200Mi
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /etc/grafana mountPath: /etc/grafana

View File

@ -28,6 +28,10 @@ spec:
ports: ports:
- name: web - name: web
containerPort: 9090 containerPort: 9090
resources:
requests:
cpu: 100m
memory: 200Mi
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /etc/prometheus mountPath: /etc/prometheus