From 8b42b24a237a73aab1370230d71450298c807ac6 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 18 Apr 2017 09:53:30 -0500 Subject: [PATCH] Heat: Add volume over-rides This PS brings Heat inline with Nova, Neutron and Keystone providing a mechanism for appending additional volumes to the manifests as required. Change-Id: I17045d35ce5d3e7cfc654c1d962aabd8e6fc73f8 --- heat/templates/deployment-api.yaml | 6 +++++- heat/templates/deployment-cfn.yaml | 6 +++++- heat/templates/deployment-cloudwatch.yaml | 6 +++++- heat/templates/statefulset-engine.yaml | 6 +++++- heat/values.yaml | 14 ++++++++++++++ 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/heat/templates/deployment-api.yaml b/heat/templates/deployment-api.yaml index 518c5bb031..d414dfc506 100755 --- a/heat/templates/deployment-api.yaml +++ b/heat/templates/deployment-api.yaml @@ -14,6 +14,8 @@ {{- $envAll := . }} {{- $dependencies := .Values.dependencies.api }} +{{- $mounts_heat_api := .Values.mounts.heat_api.heat_api }} +{{- $mounts_heat_api_init := .Values.mounts.heat_api.init_container }} apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -26,7 +28,7 @@ spec: app: heat-api annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} +{{ tuple $envAll $dependencies $mounts_heat_api_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: @@ -70,6 +72,7 @@ spec: mountPath: /etc/heat/policy.json subPath: policy.json readOnly: true +{{ if $mounts_heat_api.volumeMounts }}{{ toYaml $mounts_heat_api.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-etc-heat emptyDir: {} @@ -84,3 +87,4 @@ spec: - name: heatpolicy configMap: name: heat-etc +{{ if $mounts_heat_api.volumes }}{{ toYaml $mounts_heat_api.volumes | indent 8 }}{{ end }} diff --git a/heat/templates/deployment-cfn.yaml b/heat/templates/deployment-cfn.yaml index 96aa3e93ed..1608174111 100644 --- a/heat/templates/deployment-cfn.yaml +++ b/heat/templates/deployment-cfn.yaml @@ -14,6 +14,8 @@ {{- $envAll := . }} {{- $dependencies := .Values.dependencies.cfn }} +{{- $mounts_heat_cfn := .Values.mounts.heat_cfn.heat_cfn }} +{{- $mounts_heat_cfn_init := .Values.mounts.heat_cfn.init_container }} apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -26,7 +28,7 @@ spec: app: heat-cfn annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} +{{ tuple $envAll $dependencies $mounts_heat_cfn_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: @@ -70,6 +72,7 @@ spec: mountPath: /etc/heat/policy.json subPath: policy.json readOnly: true +{{ if $mounts_heat_cfn.volumeMounts }}{{ toYaml $mounts_heat_cfn.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-etc-heat emptyDir: {} @@ -84,3 +87,4 @@ spec: - name: heatpolicy configMap: name: heat-etc +{{ if $mounts_heat_cfn.volumes }}{{ toYaml $mounts_heat_cfn.volumes | indent 8 }}{{ end }} diff --git a/heat/templates/deployment-cloudwatch.yaml b/heat/templates/deployment-cloudwatch.yaml index ec2e5b446c..f04bda3cf9 100644 --- a/heat/templates/deployment-cloudwatch.yaml +++ b/heat/templates/deployment-cloudwatch.yaml @@ -14,6 +14,8 @@ {{- $envAll := . }} {{- $dependencies := .Values.dependencies.cloudwatch }} +{{- $mounts_heat_cloudwatch := .Values.mounts.heat_cloudwatch.heat_cloudwatch }} +{{- $mounts_heat_cloudwatch_init := .Values.mounts.heat_cloudwatch.init_container }} apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -26,7 +28,7 @@ spec: app: heat-cloudwatch annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} +{{ tuple $envAll $dependencies $mounts_heat_cloudwatch_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: @@ -70,6 +72,7 @@ spec: mountPath: /etc/heat/policy.json subPath: policy.json readOnly: true +{{ if $mounts_heat_cloudwatch.volumeMounts }}{{ toYaml $mounts_heat_cloudwatch.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-etc-heat emptyDir: {} @@ -84,3 +87,4 @@ spec: - name: heatpolicy configMap: name: heat-etc +{{ if $mounts_heat_cloudwatch.volumes }}{{ toYaml $mounts_heat_cloudwatch.volumes | indent 8 }}{{ end }} diff --git a/heat/templates/statefulset-engine.yaml b/heat/templates/statefulset-engine.yaml index eb9d9a08d8..bcaead3137 100644 --- a/heat/templates/statefulset-engine.yaml +++ b/heat/templates/statefulset-engine.yaml @@ -14,6 +14,8 @@ {{- $envAll := . }} {{- $dependencies := .Values.dependencies.engine }} +{{- $mounts_heat_engine := .Values.mounts.heat_engine.heat_engine }} +{{- $mounts_heat_engine_init := .Values.mounts.heat_engine.init_container }} apiVersion: apps/v1beta1 kind: StatefulSet metadata: @@ -27,7 +29,7 @@ spec: app: heat-engine annotations: pod.beta.kubernetes.io/init-containers: '[ -{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} +{{ tuple $envAll $dependencies $mounts_heat_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }} ]' spec: nodeSelector: @@ -62,6 +64,7 @@ spec: mountPath: /etc/heat/policy.json subPath: policy.json readOnly: true +{{ if $mounts_heat_engine.volumeMounts }}{{ toYaml $mounts_heat_engine.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-etc-heat emptyDir: {} @@ -73,3 +76,4 @@ spec: - name: heatpolicy configMap: name: heat-etc +{{ if $mounts_heat_engine.volumes }}{{ toYaml $mounts_heat_engine.volumes | indent 8 }}{{ end }} diff --git a/heat/values.yaml b/heat/values.yaml index 7bcd59e06e..0bf401da38 100644 --- a/heat/values.yaml +++ b/heat/values.yaml @@ -349,3 +349,17 @@ resources: limits: memory: "1024Mi" cpu: "2000m" + +mounts: + heat_api: + init_container: null + heat_api: + heat_cfn: + init_container: null + heat_cfn: + heat_cloudwatch: + init_container: null + heat_cloudwatch: + heat_engine: + init_container: null + heat_engine: