Browse Source

Merge "Add resource requests for system components"

master
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
fa298eeab1
  1. 4
      magnum/drivers/common/templates/kubernetes/fragments/enable-auto-scaling.sh
  2. 21
      magnum/drivers/common/templates/kubernetes/fragments/enable-cinder-csi.sh
  3. 4
      magnum/drivers/common/templates/kubernetes/fragments/enable-helm-tiller.sh
  4. 3
      magnum/drivers/common/templates/kubernetes/fragments/enable-ingress-octavia.sh
  5. 4
      magnum/drivers/common/templates/kubernetes/fragments/enable-ingress-traefik.sh
  6. 3
      magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh
  7. 19
      magnum/drivers/common/templates/kubernetes/fragments/kube-dashboard-service.sh
  8. 4
      magnum/drivers/common/templates/kubernetes/helm/metrics-server.sh

4
magnum/drivers/common/templates/kubernetes/fragments/enable-auto-scaling.sh

@ -148,6 +148,10 @@ spec:
- --scale-down-unneeded-time=10m
- --scale-down-delay-after-failure=3m
- --scale-down-delay-after-add=10m
resources:
requests:
cpu: 100m
memory: 300Mi
ports:
- containerPort: 8085
name: metrics

21
magnum/drivers/common/templates/kubernetes/fragments/enable-cinder-csi.sh

@ -262,6 +262,9 @@ spec:
- "--v=5"
- "--csi-address=\$(ADDRESS)"
- "--timeout=3m"
resources:
requests:
cpu: 20m
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -274,6 +277,9 @@ spec:
args:
- "--csi-address=\$(ADDRESS)"
- "--timeout=3m"
resources:
requests:
cpu: 20m
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -285,6 +291,9 @@ spec:
image: ${CONTAINER_INFRA_PREFIX:-quay.io/k8scsi/}csi-snapshotter:${CSI_SNAPSHOTTER_TAG}
args:
- "--csi-address=\$(ADDRESS)"
resources:
requests:
cpu: 20m
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -297,6 +306,9 @@ spec:
args:
- "--v=5"
- "--csi-address=\$(ADDRESS)"
resources:
requests:
cpu: 20m
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
@ -312,6 +324,9 @@ spec:
- "--endpoint=\$(CSI_ENDPOINT)"
- "--cloud-config=\$(CLOUD_CONFIG)"
- "--cluster=\$(CLUSTER_NAME)"
resources:
requests:
cpu: 20m
env:
- name: NODE_ID
valueFrom:
@ -401,6 +416,9 @@ spec:
args:
- "--csi-address=\$(ADDRESS)"
- "--kubelet-registration-path=\$(DRIVER_REG_SOCK_PATH)"
resources:
requests:
cpu: 25m
lifecycle:
preStop:
exec:
@ -432,6 +450,9 @@ spec:
- "--nodeid=\$(NODE_ID)"
- "--endpoint=\$(CSI_ENDPOINT)"
- "--cloud-config=\$(CLOUD_CONFIG)"
resources:
requests:
cpu: 25m
env:
- name: NODE_ID
valueFrom:

4
magnum/drivers/common/templates/kubernetes/fragments/enable-helm-tiller.sh

@ -130,7 +130,9 @@ spec:
port: 44135
initialDelaySeconds: 1
timeoutSeconds: 1
resources: {}
resources:
requests:
cpu: 25m
volumeMounts:
- mountPath: /etc/certs
name: tiller-certs

3
magnum/drivers/common/templates/kubernetes/fragments/enable-ingress-octavia.sh

@ -89,6 +89,9 @@ spec:
args:
- /bin/octavia-ingress-controller
- --config=/etc/config/octavia-ingress-controller-config.yaml
resources:
requests:
cpu: 50m
volumeMounts:
- mountPath: /etc/kubernetes
name: kubernetes-config

4
magnum/drivers/common/templates/kubernetes/fragments/enable-ingress-traefik.sh

@ -70,6 +70,10 @@ spec:
containers:
- image: ${CONTAINER_INFRA_PREFIX:-docker.io/}traefik:${TRAEFIK_INGRESS_CONTROLLER_TAG}
name: ingress-traefik-backend
resources:
requests:
cpu: 100m
memory: 50Mi
ports:
- name: http
containerPort: 80

3
magnum/drivers/common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh

@ -370,6 +370,9 @@ spec:
- --cluster-name=${CLUSTER_UUID}
- --use-service-account-credentials=true
- --bind-address=127.0.0.1
resources:
requests:
cpu: 200m
volumeMounts:
- name: cloudconfig
mountPath: /etc/kubernetes

19
magnum/drivers/common/templates/kubernetes/fragments/kube-dashboard-service.sh

@ -216,6 +216,10 @@ spec:
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
resources:
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
@ -292,6 +296,9 @@ spec:
ports:
- containerPort: 8000
protocol: TCP
resources:
requests:
cpu: 50m
livenessProbe:
httpGet:
scheme: HTTP
@ -354,6 +361,10 @@ spec:
containers:
- name: influxdb
image: ${INFLUX_IMAGE}
resources:
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- mountPath: /data
name: influxdb-storage
@ -405,6 +416,10 @@ spec:
containers:
- name: grafana
image: ${GRAFANA_IMAGE}
resources:
requests:
cpu: 100m
memory: 200Mi
ports:
- containerPort: 3000
protocol: TCP
@ -508,6 +523,10 @@ spec:
command:
- /heapster
- --source=kubernetes:https://kubernetes.default?insecure=false&useServiceAccount=true&kubeletPort=10250&kubeletHttps=true
resources:
requests:
cpu: 100m
memory: 128Mi
${INFLUX_SINK}
---
apiVersion: v1

4
magnum/drivers/common/templates/kubernetes/helm/metrics-server.sh

@ -20,6 +20,10 @@ EOF
metrics-server:
image:
repository: ${CONTAINER_INFRA_PREFIX:-gcr.io/google_containers/}metrics-server-${ARCH}
resources:
requests:
cpu: 100m
memory: 200Mi
args:
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
EOF

Loading…
Cancel
Save