Merge "heat-engine as Deployment or StatefulSet"
This commit is contained in:
commit
5eb51cf118
@ -17,5 +17,15 @@ limitations under the License.
|
|||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
exec heat-engine \
|
COMMAND="${@:-start}"
|
||||||
--config-file /etc/heat/heat.conf
|
|
||||||
|
function start () {
|
||||||
|
exec heat-engine \
|
||||||
|
--config-file /etc/heat/heat.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop () {
|
||||||
|
kill -TERM 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$COMMAND
|
||||||
|
@ -66,8 +66,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
mountPath: /etc/heat
|
mountPath: /etc/heat
|
||||||
- name: pod-var-cache-heat
|
|
||||||
mountPath: /var/cache/heat
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
mountPath: /tmp/heat-api.sh
|
mountPath: /tmp/heat-api.sh
|
||||||
subPath: heat-api.sh
|
subPath: heat-api.sh
|
||||||
@ -88,8 +86,6 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-heat
|
|
||||||
emptyDir: {}
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
configMap:
|
configMap:
|
||||||
name: heat-bin
|
name: heat-bin
|
||||||
|
@ -66,8 +66,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
mountPath: /etc/heat
|
mountPath: /etc/heat
|
||||||
- name: pod-var-cache-heat
|
|
||||||
mountPath: /var/cache/heat
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
mountPath: /tmp/heat-cfn.sh
|
mountPath: /tmp/heat-cfn.sh
|
||||||
subPath: heat-cfn.sh
|
subPath: heat-cfn.sh
|
||||||
@ -88,8 +86,6 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-heat
|
|
||||||
emptyDir: {}
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
configMap:
|
configMap:
|
||||||
name: heat-bin
|
name: heat-bin
|
||||||
|
@ -66,8 +66,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
mountPath: /etc/heat
|
mountPath: /etc/heat
|
||||||
- name: pod-var-cache-heat
|
|
||||||
mountPath: /var/cache/heat
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
mountPath: /tmp/heat-cloudwatch.sh
|
mountPath: /tmp/heat-cloudwatch.sh
|
||||||
subPath: heat-cloudwatch.sh
|
subPath: heat-cloudwatch.sh
|
||||||
@ -88,8 +86,6 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-heat
|
|
||||||
emptyDir: {}
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
configMap:
|
configMap:
|
||||||
name: heat-bin
|
name: heat-bin
|
||||||
|
@ -14,28 +14,40 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if .Values.manifests.statefulset_engine }}
|
{{- if or ( .Values.manifests.deployment_engine ) ( .Values.manifests.statefulset_engine ) }}
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
{{- $dependencies := .Values.dependencies.engine }}
|
{{- $dependencies := .Values.dependencies.engine }}
|
||||||
{{- $mounts_heat_engine := .Values.pod.mounts.heat_engine.heat_engine }}
|
{{- $mounts_heat_engine := .Values.pod.mounts.heat_engine.heat_engine }}
|
||||||
{{- $mounts_heat_engine_init := .Values.pod.mounts.heat_engine.init_container }}
|
{{- $mounts_heat_engine_init := .Values.pod.mounts.heat_engine.init_container }}
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1beta1
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
metadata:
|
||||||
name: heat-engine
|
name: heat-engine
|
||||||
|
{{- if .Values.manifests.deployment_engine }}
|
||||||
|
kind: Deployment
|
||||||
|
spec:
|
||||||
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||||
|
{{- else if .Values.manifests.statefulset_engine }}
|
||||||
|
kind: StatefulSet
|
||||||
spec:
|
spec:
|
||||||
serviceName: heat-engine
|
serviceName: heat-engine
|
||||||
|
{{- end }}
|
||||||
replicas: {{ .Values.pod.replicas.engine }}
|
replicas: {{ .Values.pod.replicas.engine }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
{{- if .Values.manifests.deployment_engine }}
|
||||||
|
annotations:
|
||||||
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
affinity:
|
affinity:
|
||||||
{{ tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
{{- tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.engine.timeout | default "30" }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll $dependencies $mounts_heat_engine_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll $dependencies $mounts_heat_engine_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
containers:
|
containers:
|
||||||
@ -47,11 +59,16 @@ spec:
|
|||||||
runAsUser: {{ .Values.pod.user.heat.uid }}
|
runAsUser: {{ .Values.pod.user.heat.uid }}
|
||||||
command:
|
command:
|
||||||
- /tmp/heat-engine.sh
|
- /tmp/heat-engine.sh
|
||||||
|
- start
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /tmp/heat-engine.sh
|
||||||
|
- stop
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
mountPath: /etc/heat
|
mountPath: /etc/heat
|
||||||
- name: pod-var-cache-heat
|
|
||||||
mountPath: /var/cache/heat
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
mountPath: /tmp/heat-engine.sh
|
mountPath: /tmp/heat-engine.sh
|
||||||
subPath: heat-engine.sh
|
subPath: heat-engine.sh
|
||||||
@ -68,8 +85,6 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: pod-etc-heat
|
- name: pod-etc-heat
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-heat
|
|
||||||
emptyDir: {}
|
|
||||||
- name: heat-bin
|
- name: heat-bin
|
||||||
configMap:
|
configMap:
|
||||||
name: heat-bin
|
name: heat-bin
|
@ -525,6 +525,8 @@ pod:
|
|||||||
timeout: 30
|
timeout: 30
|
||||||
cloudwatch:
|
cloudwatch:
|
||||||
timeout: 30
|
timeout: 30
|
||||||
|
engine:
|
||||||
|
timeout: 30
|
||||||
resources:
|
resources:
|
||||||
enabled: false
|
enabled: false
|
||||||
api:
|
api:
|
||||||
@ -626,6 +628,7 @@ manifests:
|
|||||||
deployment_api: true
|
deployment_api: true
|
||||||
deployment_cfn: true
|
deployment_cfn: true
|
||||||
deployment_cloudwatch: true
|
deployment_cloudwatch: true
|
||||||
|
deployment_engine: true
|
||||||
ingress_api: true
|
ingress_api: true
|
||||||
ingress_cfn: true
|
ingress_cfn: true
|
||||||
ingress_cloudwatch: true
|
ingress_cloudwatch: true
|
||||||
@ -647,4 +650,4 @@ manifests:
|
|||||||
service_ingress_api: true
|
service_ingress_api: true
|
||||||
service_ingress_cfn: true
|
service_ingress_cfn: true
|
||||||
service_ingress_cloudwatch: true
|
service_ingress_cloudwatch: true
|
||||||
statefulset_engine: true
|
statefulset_engine: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user