diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index cc3c3f6b19..74b0c59b7a 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -31,6 +31,15 @@ spec: - name: cinder-api image: {{ .Values.images.api }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_api.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_api.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_api.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_api.limits.cpu | quote }} + {{- end }} command: - cinder-api - --config-dir diff --git a/cinder/templates/deployment-scheduler.yaml b/cinder/templates/deployment-scheduler.yaml index 39663097ef..443cd7f9b2 100644 --- a/cinder/templates/deployment-scheduler.yaml +++ b/cinder/templates/deployment-scheduler.yaml @@ -31,6 +31,15 @@ spec: - name: cinder-scheduler image: {{ .Values.images.scheduler }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_scheduler.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_scheduler.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_scheduler.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_scheduler.limits.cpu | quote }} + {{- end }} command: - cinder-scheduler - --config-dir diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index cb6c958ccc..4c064029ab 100644 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -31,6 +31,15 @@ spec: - name: cinder-volume image: {{ .Values.images.volume }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_volume.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_volume.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_volume.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_volume.limits.cpu | quote }} + {{- end }} command: - cinder-volume - --config-dir diff --git a/cinder/templates/job-db-init.yaml b/cinder/templates/job-db-init.yaml index 8c8338b0cf..eb057e9af4 100644 --- a/cinder/templates/job-db-init.yaml +++ b/cinder/templates/job-db-init.yaml @@ -19,6 +19,15 @@ spec: - name: cinder-db-init image: {{ .Values.images.db_init | quote }} imagePullPolicy: {{ .Values.images.pull_policy | quote }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_db_init.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_db_init.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_db_init.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_db_init.limits.cpu | quote }} + {{- end }} env: - name: ANSIBLE_LIBRARY value: /usr/share/ansible/ diff --git a/cinder/templates/job-db-sync.yaml b/cinder/templates/job-db-sync.yaml index 045f46227f..97da3bc262 100644 --- a/cinder/templates/job-db-sync.yaml +++ b/cinder/templates/job-db-sync.yaml @@ -19,6 +19,15 @@ spec: - name: cinder-db-sync image: {{ .Values.images.db_sync }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_db_sync.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_db_sync.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_db_sync.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_db_sync.limits.cpu | quote }} + {{- end }} command: - cinder-manage args: diff --git a/cinder/templates/job-ks-endpoints.yaml.yaml b/cinder/templates/job-ks-endpoints.yaml.yaml index 455c0f3439..242ba42b4b 100644 --- a/cinder/templates/job-ks-endpoints.yaml.yaml +++ b/cinder/templates/job-ks-endpoints.yaml.yaml @@ -22,6 +22,15 @@ spec: - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} image: {{ $envAll.Values.images.ks_endpoints }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }} + {{- if $envAll.Values.resources.enabled }} + resources: + requests: + memory: {{ $envAll.Values.resources.cinder_ks_endpoints.requests.memory | quote }} + cpu: {{ $envAll.Values.resources.cinder_ks_endpoints.requests.cpu | quote }} + limits: + memory: {{ $envAll.Values.resources.cinder_ks_endpoints.limits.memory | quote }} + cpu: {{ $envAll.Values.resources.cinder_ks_endpoints.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-endpoints.sh diff --git a/cinder/templates/job-ks-service.yaml b/cinder/templates/job-ks-service.yaml index 73934938f2..c63c6103b9 100644 --- a/cinder/templates/job-ks-service.yaml +++ b/cinder/templates/job-ks-service.yaml @@ -21,6 +21,15 @@ spec: - name: {{ $osServiceType }}-ks-service-registration image: {{ $envAll.Values.images.ks_service }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }} + {{- if $envAll.Values.resources.enabled }} + resources: + requests: + memory: {{ $envAll.Values.resources.cinder_ks_service.requests.memory | quote }} + cpu: {{ $envAll.Values.resources.cinder_ks_service.requests.cpu | quote }} + limits: + memory: {{ $envAll.Values.resources.cinder_ks_service.limits.memory | quote }} + cpu: {{ $envAll.Values.resources.cinder_ks_service.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-service.sh diff --git a/cinder/templates/job-ks-user.yaml b/cinder/templates/job-ks-user.yaml index 49bc179a89..cc383e6f0c 100644 --- a/cinder/templates/job-ks-user.yaml +++ b/cinder/templates/job-ks-user.yaml @@ -21,6 +21,15 @@ spec: - name: cinder-ks-user image: {{ .Values.images.ks_user }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.cinder_ks_user.requests.memory | quote }} + cpu: {{ .Values.resources.cinder_ks_user.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.cinder_ks_user.limits.memory | quote }} + cpu: {{ .Values.resources.cinder_ks_user.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-user.sh diff --git a/cinder/values.yaml b/cinder/values.yaml index 120d4d484f..4f6ebeb5b2 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -183,3 +183,63 @@ endpoints: scheme: 'http' port: api: 8776 + +resources: + enabled: false + cinder_api: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_scheduler: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_volume: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_db_init: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_db_sync: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_ks_endpoints: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_ks_service: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + cinder_ks_user: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + diff --git a/heat/templates/deployment-api.yaml b/heat/templates/deployment-api.yaml index 25197f76ef..dafbba9cda 100755 --- a/heat/templates/deployment-api.yaml +++ b/heat/templates/deployment-api.yaml @@ -21,6 +21,15 @@ spec: - name: heat-api image: {{ .Values.images.api }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_api.requests.memory | quote }} + cpu: {{ .Values.resources.heat_api.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_api.limits.memory | quote }} + cpu: {{ .Values.resources.heat_api.limits.cpu | quote }} + {{- end }} command: - heat-api - --config-dir diff --git a/heat/templates/deployment-cfn.yaml b/heat/templates/deployment-cfn.yaml index 0cce31b80e..11d25b745a 100644 --- a/heat/templates/deployment-cfn.yaml +++ b/heat/templates/deployment-cfn.yaml @@ -21,6 +21,15 @@ spec: - name: heat-cfn image: {{ .Values.images.cfn }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_cfn.requests.memory | quote }} + cpu: {{ .Values.resources.heat_cfn.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_cfn.limits.memory | quote }} + cpu: {{ .Values.resources.heat_cfn.limits.cpu | quote }} + {{- end }} command: - heat-api-cfn - --config-dir diff --git a/heat/templates/deployment-cloudwatch.yaml b/heat/templates/deployment-cloudwatch.yaml index 6f624a65f4..17b17fecd0 100644 --- a/heat/templates/deployment-cloudwatch.yaml +++ b/heat/templates/deployment-cloudwatch.yaml @@ -21,6 +21,15 @@ spec: - name: heat-cloudwatch image: {{ .Values.images.cloudwatch }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_cloudwatch.requests.memory | quote }} + cpu: {{ .Values.resources.heat_cloudwatch.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_cloudwatch.limits.memory | quote }} + cpu: {{ .Values.resources.heat_cloudwatch.limits.cpu | quote }} + {{- end }} command: - heat-api-cloudwatch - --config-dir diff --git a/heat/templates/job-db-init.yaml b/heat/templates/job-db-init.yaml index a98c571d95..4633c7af9c 100644 --- a/heat/templates/job-db-init.yaml +++ b/heat/templates/job-db-init.yaml @@ -19,6 +19,15 @@ spec: - name: heat-db-init image: {{ .Values.images.db_init | quote }} imagePullPolicy: {{ .Values.images.pull_policy | quote }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_db_init.requests.memory | quote }} + cpu: {{ .Values.resources.heat_db_init.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_db_init.limits.memory | quote }} + cpu: {{ .Values.resources.heat_db_init.limits.cpu | quote }} + {{- end }} env: - name: ANSIBLE_LIBRARY value: /usr/share/ansible/ diff --git a/heat/templates/job-db-sync.yaml b/heat/templates/job-db-sync.yaml index 5f962a9d3e..0ee761c201 100644 --- a/heat/templates/job-db-sync.yaml +++ b/heat/templates/job-db-sync.yaml @@ -19,6 +19,15 @@ spec: - name: heat-db-sync image: {{ .Values.images.db_sync }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_db_sync.requests.memory | quote }} + cpu: {{ .Values.resources.heat_db_sync.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_db_sync.limits.memory | quote }} + cpu: {{ .Values.resources.heat_db_sync.limits.cpu | quote }} + {{- end }} command: - heat-manage args: diff --git a/heat/templates/job-ks-endpoints.yaml.yaml b/heat/templates/job-ks-endpoints.yaml.yaml index 6bfcfb7018..c5dfd3aaa1 100644 --- a/heat/templates/job-ks-endpoints.yaml.yaml +++ b/heat/templates/job-ks-endpoints.yaml.yaml @@ -22,6 +22,15 @@ spec: - name: {{ $osServiceName }}-ks-endpoints-{{ $osServiceEndPoint }} image: {{ $envAll.Values.images.ks_endpoints }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }} + {{- if $envAll.Values.resources.enabled }} + resources: + requests: + memory: {{ $envAll.Values.resources.heat_ks_endpoints.requests.memory | quote }} + cpu: {{ $envAll.Values.resources.heat_ks_endpoints.requests.cpu | quote }} + limits: + memory: {{ $envAll.Values.resources.heat_ks_endpoints.limits.memory | quote }} + cpu: {{ $envAll.Values.resources.heat_ks_endpoints.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-endpoints.sh diff --git a/heat/templates/job-ks-service.yaml b/heat/templates/job-ks-service.yaml index 8dba89f883..dd3295a5ec 100644 --- a/heat/templates/job-ks-service.yaml +++ b/heat/templates/job-ks-service.yaml @@ -21,6 +21,15 @@ spec: - name: {{ $osServiceName }}-ks-service-registration image: {{ $envAll.Values.images.ks_service }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }} + {{- if $envAll.Values.resources.enabled }} + resources: + requests: + memory: {{ $envAll.Values.resources.heat_ks_service.requests.memory | quote }} + cpu: {{ $envAll.Values.resources.heat_ks_service.requests.cpu | quote }} + limits: + memory: {{ $envAll.Values.resources.heat_ks_service.limits.memory | quote }} + cpu: {{ $envAll.Values.resources.heat_ks_service.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-service.sh @@ -38,6 +47,7 @@ spec: - name: OS_SERVICE_TYPE value: {{ tuple $osServiceName $envAll | include "endpoint_type_lookup" }} {{- end }} + volumes: - name: ks-service-sh configMap: diff --git a/heat/templates/job-ks-user.yaml b/heat/templates/job-ks-user.yaml index 7fd8f6d2f2..a55743ef02 100644 --- a/heat/templates/job-ks-user.yaml +++ b/heat/templates/job-ks-user.yaml @@ -24,6 +24,15 @@ spec: - name: heat-ks-user image: {{ .Values.images.ks_user }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_ks_user.requests.memory | quote }} + cpu: {{ .Values.resources.heat_ks_user.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_ks_user.limits.memory | quote }} + cpu: {{ .Values.resources.heat_ks_user.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/ks-user.sh diff --git a/heat/templates/statefulset-engine.yaml b/heat/templates/statefulset-engine.yaml index 0c5c8f007b..d27bf99665 100644 --- a/heat/templates/statefulset-engine.yaml +++ b/heat/templates/statefulset-engine.yaml @@ -22,6 +22,15 @@ spec: - name: heat-engine image: {{ .Values.images.engine }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.heat_engine.requests.memory | quote }} + cpu: {{ .Values.resources.heat_engine.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.heat_engine.limits.memory | quote }} + cpu: {{ .Values.resources.heat_engine.limits.cpu | quote }} + {{- end }} command: - heat-engine - --config-dir diff --git a/heat/values.yaml b/heat/values.yaml index ecd9c02ccf..9da0dc95f6 100644 --- a/heat/values.yaml +++ b/heat/values.yaml @@ -97,16 +97,6 @@ memcached: host: memcached port: 11211 -resources: - api: - workers: 8 - cfn: - workers: 8 - cloudwatch: - workers: 8 - engine: - workers: 8 - misc: debug: true @@ -206,3 +196,77 @@ endpoints: scheme: 'http' port: api: 8003 + +resources: + enabled: false + heat_api: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_cfn: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_cloudwatch: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_db_init: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_db_sync: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_ks_endpoints: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_ks_service: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_ks_user: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + heat_engine: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + api: + workers: 8 + cfn: + workers: 8 + cloudwatch: + workers: 8 + engine: + workers: 8 diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 896739cfba..2553c79406 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -27,6 +27,15 @@ spec: - name: nova-compute image: {{ .Values.images.compute }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_compute.requests.memory | quote }} + cpu: {{ .Values.resources.nova_compute.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_compute.limits.memory | quote }} + cpu: {{ .Values.resources.nova_compute.limits.cpu | quote }} + {{- end }} securityContext: privileged: true command: diff --git a/nova/templates/daemonset-libvirt.yaml b/nova/templates/daemonset-libvirt.yaml index bb461bc4da..bc104e7144 100644 --- a/nova/templates/daemonset-libvirt.yaml +++ b/nova/templates/daemonset-libvirt.yaml @@ -26,6 +26,15 @@ spec: - name: nova-libvirt image: {{ .Values.images.libvirt }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_libvirt.requests.memory | quote }} + cpu: {{ .Values.resources.nova_libvirt.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_libvirt.limits.memory | quote }} + cpu: {{ .Values.resources.nova_libvirt.limits.cpu | quote }} + {{- end }} securityContext: privileged: true command: diff --git a/nova/templates/deployment-api-metadata.yaml b/nova/templates/deployment-api-metadata.yaml index 5ca429e8ca..1b93605837 100644 --- a/nova/templates/deployment-api-metadata.yaml +++ b/nova/templates/deployment-api-metadata.yaml @@ -32,6 +32,15 @@ spec: image: {{ .Values.images.api }} imagePullPolicy: {{ .Values.images.pull_policy }} # https://bugs.launchpad.net/kolla-mesos/+bug/1546007 + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_api_metadata.requests.memory | quote }} + cpu: {{ .Values.resources.nova_api_metadata.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_api_metadata.limits.memory | quote }} + cpu: {{ .Values.resources.nova_api_metadata.limits.cpu | quote }} + {{- end }} securityContext: capabilities: add: diff --git a/nova/templates/deployment-api-osapi.yaml b/nova/templates/deployment-api-osapi.yaml index f0940a524c..52b6a13ec2 100644 --- a/nova/templates/deployment-api-osapi.yaml +++ b/nova/templates/deployment-api-osapi.yaml @@ -35,6 +35,15 @@ spec: capabilities: add: - NET_ADMIN + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_osapi.requests.memory | quote }} + cpu: {{ .Values.resources.nova_osapi.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_osapi.limits.memory | quote }} + cpu: {{ .Values.resources.nova_osapi.limits.cpu | quote }} + {{- end }} command: - nova-api - --config-file=/etc/nova/nova.conf diff --git a/nova/templates/deployment-conductor.yaml b/nova/templates/deployment-conductor.yaml index 8879851371..7e9fe02b6e 100644 --- a/nova/templates/deployment-conductor.yaml +++ b/nova/templates/deployment-conductor.yaml @@ -31,6 +31,15 @@ spec: - name: nova-conductor image: {{ .Values.images.conductor }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_conductor.requests.memory | quote }} + cpu: {{ .Values.resources.nova_conductor.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_conductor.limits.memory | quote }} + cpu: {{ .Values.resources.nova_conductor.limits.cpu | quote }} + {{- end }} command: - nova-conductor - --config-file diff --git a/nova/templates/deployment-consoleauth.yaml b/nova/templates/deployment-consoleauth.yaml index c62de2559d..fa96113129 100644 --- a/nova/templates/deployment-consoleauth.yaml +++ b/nova/templates/deployment-consoleauth.yaml @@ -31,6 +31,15 @@ spec: - name: nova-consoleauth image: {{ .Values.images.consoleauth }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_consoleauth.requests.memory | quote }} + cpu: {{ .Values.resources.nova_consoleauth.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_consoleauth.limits.memory | quote }} + cpu: {{ .Values.resources.nova_consoleauth.limits.cpu | quote }} + {{- end }} command: - nova-consoleauth - --config-file diff --git a/nova/templates/deployment-scheduler.yaml b/nova/templates/deployment-scheduler.yaml index 14f12e2c29..9ace4262bf 100644 --- a/nova/templates/deployment-scheduler.yaml +++ b/nova/templates/deployment-scheduler.yaml @@ -31,6 +31,15 @@ spec: - name: nova-scheduler image: {{ .Values.images.scheduler }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_scheduler.requests.memory | quote }} + cpu: {{ .Values.resources.nova_scheduler.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_scheduler.limits.memory | quote }} + cpu: {{ .Values.resources.nova_scheduler.limits.cpu | quote }} + {{- end }} command: - nova-scheduler - --config-file diff --git a/nova/templates/job-db-init.yaml b/nova/templates/job-db-init.yaml index dce9a652a7..e43982359a 100644 --- a/nova/templates/job-db-init.yaml +++ b/nova/templates/job-db-init.yaml @@ -19,6 +19,15 @@ spec: - name: nova-db-init image: {{ .Values.images.db_init }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_init.requests.memory | quote }} + cpu: {{ .Values.resources.nova_init.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_init.limits.memory | quote }} + cpu: {{ .Values.resources.nova_init.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/init.sh diff --git a/nova/templates/job-db-sync.yaml b/nova/templates/job-db-sync.yaml index 94befb39e2..81bff35b94 100644 --- a/nova/templates/job-db-sync.yaml +++ b/nova/templates/job-db-sync.yaml @@ -19,6 +19,15 @@ spec: - name: nova-db-sync image: {{ .Values.images.db_sync }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_db_sync.requests.memory | quote }} + cpu: {{ .Values.resources.nova_db_sync.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_db_sync.limits.memory | quote }} + cpu: {{ .Values.resources.nova_db_sync.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/db-sync.sh diff --git a/nova/templates/job-post.yaml b/nova/templates/job-post.yaml index c91e752117..7fddbaf6a7 100644 --- a/nova/templates/job-post.yaml +++ b/nova/templates/job-post.yaml @@ -19,6 +19,15 @@ spec: - name: nova-post image: {{ .Values.images.post }} imagePullPolicy: {{ .Values.images.pull_policy }} + {{- if .Values.resources.enabled }} + resources: + requests: + memory: {{ .Values.resources.nova_post.requests.memory | quote }} + cpu: {{ .Values.resources.nova_post.requests.cpu | quote }} + limits: + memory: {{ .Values.resources.nova_post.limits.memory | quote }} + cpu: {{ .Values.resources.nova_post.limits.cpu | quote }} + {{- end }} command: - bash - /tmp/post.sh diff --git a/nova/values.yaml b/nova/values.yaml index 6cc3baa28f..7edba952ba 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -217,3 +217,76 @@ endpoints: scheme: 'http' port: api: 9696 + +resources: + enabled: false + nova_compute: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_libvirt: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_api_metadata: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_osapi: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_conductor: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_consoleauth: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_scheduler: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_db_sync: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_init: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + nova_post: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m"