openstack-helm/heat/templates/statefulset-engine.yaml
maris-accenture 1e7203a523 #106 CPU and memory resources (#106)
* resource requests and limits for cinder, heat, nova
2017-01-30 16:22:51 -08:00

62 lines
1.9 KiB
YAML

{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.engine }}
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: heat-engine
spec:
serviceName: heat-engine
replicas: {{ .Values.replicas.engine }}
template:
metadata:
labels:
app: heat-engine
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- 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
- /etc/heat/conf
volumeMounts:
- name: pod-etc-heat
mountPath: /etc/heat
- name: pod-var-cache-heat
mountPath: /var/cache/heat
- name: heatconf
mountPath: /etc/heat/conf/heat.conf
subPath: heat.conf
readOnly: true
- name: heatpolicy
mountPath: /etc/heat/policy.json
subPath: policy.json
readOnly: true
volumes:
- name: pod-etc-heat
emptyDir: {}
- name: pod-var-cache-heat
emptyDir: {}
- name: heatconf
configMap:
name: heat-etc
- name: heatpolicy
configMap:
name: heat-etc