diff --git a/nova/templates/bin/_bootstrap.sh.tpl b/nova/templates/bin/_bootstrap.sh.tpl index 0d31fb312d..8f1c8872ca 100644 --- a/nova/templates/bin/_bootstrap.sh.tpl +++ b/nova/templates/bin/_bootstrap.sh.tpl @@ -17,9 +17,8 @@ set -ex export HOME=/tmp -{{ if .Values.bootstrap.enabled }} - -{{ range .Values.bootstrap.flavors }} +{{ if .Values.bootstrap.flavors.enabled }} +{{ range .Values.bootstrap.flavors.options }} openstack flavor show {{ .name }} || \ openstack flavor create {{ .name }} \ --id {{ .id }} \ @@ -27,7 +26,7 @@ openstack flavor show {{ .name }} || \ --disk {{ .disk }} \ --vcpus {{ .vcpus }} {{ end }} - {{ end }} +{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }} exit 0 diff --git a/nova/templates/job-bootstrap.yaml b/nova/templates/job-bootstrap.yaml index 194d270c63..780d5730a0 100644 --- a/nova/templates/job-bootstrap.yaml +++ b/nova/templates/job-bootstrap.yaml @@ -13,6 +13,7 @@ # limitations under the License. {{- $envAll := . }} +{{- if .Values.bootstrap.enabled }} {{- $dependencies := .Values.dependencies.bootstrap }} {{- $mounts_nova_bootstrap := .Values.pod.mounts.nova_bootstrap.nova_bootstrap }} {{- $mounts_nova_bootstrap_init := .Values.pod.mounts.nova_bootstrap.init_container }} @@ -60,3 +61,4 @@ spec: name: nova-bin defaultMode: 0555 {{- if $mounts_nova_bootstrap.volumes }}{{ toYaml $mounts_nova_bootstrap.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/nova/values.yaml b/nova/values.yaml index 1cbd58b3b2..76bc7d57cc 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -67,13 +67,40 @@ images: bootstrap: enabled: true + script: null flavors: - m1_tiny: - name: "m1.tiny" - id: "auto" - ram: 512 - disk: 20 - vcpus: 1 + enabled: true + options: + m1_tiny: + name: "m1.tiny" + id: "auto" + ram: 512 + disk: 1 + vcpus: 1 + m1_small: + name: "m1.small" + id: "auto" + ram: 2048 + disk: 20 + vcpus: 1 + m1_medium: + name: "m1.medium" + id: "auto" + ram: 4096 + disk: 40 + vcpus: 2 + m1_large: + name: "m1.large" + id: "auto" + ram: 8192 + disk: 80 + vcpus: 4 + m1_xlarge: + name: "m1.xlarge" + id: "auto" + ram: 16384 + disk: 160 + vcpus: 8 network: dns: