Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Add resources limits and requests for some charts #163

Merged
merged 16 commits into from
Feb 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions glance/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ spec:
- name: glance-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command:
- glance-api
- --config-file
Expand Down
9 changes: 9 additions & 0 deletions glance/templates/deployment-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ spec:
- name: glance-registry
image: {{ .Values.images.registry }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.registry.limits.cpu | quote }}
memory: {{ .Values.resources.registry.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.registry.requests.cpu | quote }}
memory: {{ .Values.resources.registry.requests.memory | quote }}
{{- end }}
command:
- glance-registry
- --config-file
Expand Down
9 changes: 9 additions & 0 deletions glance/templates/job-db-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ spec:
- name: glance-db-init
image: {{ .Values.images.db_init }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.jobs.init.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.init.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.init.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.init.requests.memory | quote }}
{{- end }}
env:
- name: ANSIBLE_LIBRARY
value: /usr/share/ansible/
Expand Down
9 changes: 9 additions & 0 deletions glance/templates/job-db-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ spec:
- name: glance-db-sync
image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.jobs.db.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.db.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.db.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.db.requests.memory | quote }}
{{- end }}
command:
- glance-manage
- db_sync
Expand Down
9 changes: 9 additions & 0 deletions glance/templates/job-post.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ spec:
- name: glance-post
image: {{ .Values.images.post }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.jobs.post.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.post.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.post.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.post.requests.memory | quote }}
{{- end }}
command:
- bash
- /tmp/post.sh
Expand Down
41 changes: 40 additions & 1 deletion glance/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for keystone.
# Default values for glance.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
Expand Down Expand Up @@ -72,6 +72,45 @@ misc:
workers: 8
debug: false

resources:
enabled: false
api:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
registry:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
jobs:
db:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
init:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
post:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"

dependencies:
api:
jobs:
Expand Down
9 changes: 9 additions & 0 deletions horizon/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ spec:
- name: horizon
image: {{ .Values.images.horizon }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.dashboard.limits.cpu | quote }}
memory: {{ .Values.resources.dashboard.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.dashboard.requests.cpu | quote }}
memory: {{ .Values.resources.dashboard.requests.memory | quote }}
{{- end }}
command:
- bash
- /tmp/start.sh
Expand Down
14 changes: 12 additions & 2 deletions horizon/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for memcached.
# Default values for horizon.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
Expand Down Expand Up @@ -36,7 +36,17 @@ dependencies:
- memcached
- keystone-api

# typically overriden by environmental
resources:
enabled: false
dashboard:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"

# mits:typically overriden by environmental
# values, but should include all endpoints
# required by this chart
endpoints:
Expand Down
9 changes: 9 additions & 0 deletions keystone/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ spec:
- name: keystone-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command:
- bash
- /tmp/start.sh
Expand Down
9 changes: 9 additions & 0 deletions keystone/templates/job-db-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ spec:
- name: keystone-db-init
image: {{ .Values.images.db_init }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.jobs.init.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.init.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.init.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.init.requests.memory | quote }}
{{- end }}
command:
- bash
- /tmp/init.sh
Expand Down
9 changes: 9 additions & 0 deletions keystone/templates/job-db-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ spec:
- name: keystone-db-sync
image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.jobs.db_sync.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.db_sync.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.db_sync.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.db_sync.requests.memory | quote }}
{{- end }}
command:
- bash
- /tmp/db-sync.sh
Expand Down
25 changes: 25 additions & 0 deletions keystone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,31 @@ dependencies:
service:
- mariadb

resources:
enabled: false
api:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
jobs:
db_sync:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
init:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"

# typically overriden by environmental
# values, but should include all endpoints
# required by this chart
Expand Down
11 changes: 10 additions & 1 deletion maas/templates/deploy-rack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ spec:
containers:
- name: maas-rack
image: {{ .Values.images.maas_rack }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.maas_rack_controller.limits.cpu | quote }}
memory: {{ .Values.resources.maas_rack_controller.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.maas_rack_controller.requests.cpu | quote }}
memory: {{ .Values.resources.maas_rack_controller.requests.memory | quote }}
{{- end }}
securityContext:
privileged: true
11 changes: 10 additions & 1 deletion maas/templates/deploy-region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ spec:
containers:
- name: maas-region
image: {{ .Values.images.maas_region }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.maas_region.limits.cpu | quote }}
memory: {{ .Values.resources.maas_region.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.maas_region.requests.cpu | quote }}
memory: {{ .Values.resources.maas_region.requests.memory | quote}}
{{- end }}
ports:
- containerPort: {{ .Values.network.port.region_container }}
readinessProbe:
Expand Down
20 changes: 19 additions & 1 deletion maas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
images:
maas_region: quay.io/attcomdev/maas-region:2.1.2-1
maas_rack: quay.io/attcomdev/maas-rack:2.1.2-1
pull_policy: Always

labels:
node_selector_key: openstack-control-plane
Expand All @@ -18,4 +19,21 @@ network:
service_proxy: 8000
service_proxy_target: 8000

service_name: maas-region-ui
service_name: maas-region-ui

resources:
enabled: false
maas_rack_controller:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
maas_region:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
9 changes: 9 additions & 0 deletions mariadb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ spec:
- name: {{ .Values.service_name }}
image: {{ .Values.images.mariadb }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
env:
- name: INTERFACE_NAME
value: "eth0"
Expand Down
9 changes: 9 additions & 0 deletions mariadb/templates/job-seed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ spec:
- name: mariadb-init
image: {{ .Values.images.mariadb }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.job.seed.limits.cpu | quote }}
memory: {{ .Values.resources.job.seed.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.job.seed.requests.cpu | quote }}
memory: {{ .Values.resources.job.seed.requests.memory | quote }}
{{- end }}
env:
- name: INTERFACE_NAME
value: "eth0"
Expand Down
18 changes: 18 additions & 0 deletions mariadb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ development:
enabled: false
storage_path: /data/openstack-helm/mariadb

resources:
enabled: false
api:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"
job:
seed:
limits:
memory: "128Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "500m"

# this drives the service name, and statefulset name
service_name: mariadb

Expand Down
9 changes: 9 additions & 0 deletions memcached/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ spec:
- name: memcached
image: {{ .Values.images.memcached }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command: ["sh", "-xec"]
args:
- |
Expand Down
Loading