From 2dfccce221e597dbdc6a30026d5d21467abdb657 Mon Sep 17 00:00:00 2001 From: dengzhaosen Date: Thu, 30 Nov 2023 16:44:31 +0800 Subject: [PATCH] Add the conditional statement for log_config_append As the nova.DEFAULT.log_config_append is a aption for the configuration of nova, we should be add condtional statement here. Change-Id: Ib9c50c9ccc0c93226fffccc997c232b0259dff0c --- nova/Chart.yaml | 2 +- nova/templates/job-bootstrap.yaml | 7 ++++--- releasenotes/notes/nova.yaml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nova/Chart.yaml b/nova/Chart.yaml index 0b8954c7ee..027777d6af 100644 --- a/nova/Chart.yaml +++ b/nova/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Nova name: nova -version: 0.3.29 +version: 0.3.30 home: https://docs.openstack.org/nova/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png sources: diff --git a/nova/templates/job-bootstrap.yaml b/nova/templates/job-bootstrap.yaml index eb5e6029fa..de8812dd77 100644 --- a/nova/templates/job-bootstrap.yaml +++ b/nova/templates/job-bootstrap.yaml @@ -20,7 +20,6 @@ limitations under the License. {{- $configMapBin := printf "%s-%s" $serviceName "bin" -}} {{- $configMapEtc := printf "%s-%s" $serviceName "etc" -}} {{- $configFile := printf "/etc/%s/%s.conf" $serviceName $serviceName -}} -{{- $logConfigFile := $envAll.Values.conf.nova.DEFAULT.log_config_append -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} {{- $serviceAccountName := printf "%s-%s" $serviceName "bootstrap" -}} {{ tuple $envAll "bootstrap" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} @@ -97,10 +96,12 @@ spec: mountPath: {{ $configFile | quote }} subPath: {{ base $configFile | quote }} readOnly: true + {{- if .Values.conf.nova.DEFAULT.log_config_append }} - name: bootstrap-conf - mountPath: {{ $logConfigFile | quote }} - subPath: {{ base $logConfigFile | quote }} + mountPath: {{ .Values.conf.nova.DEFAULT.log_config_append | quote }} + subPath: {{ base .Values.conf.nova.DEFAULT.log_config_append | quote }} readOnly: true + {{- end }} {{- dict "enabled" (or .Values.manifests.certificates .Values.tls.identity) "name" .Values.secrets.tls.compute.osapi.internal | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} volumes: - name: pod-tmp diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index 8c94c40a1b..2d17742f62 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -98,4 +98,5 @@ nova: - 0.3.27 Add 2023.2 Ubuntu Jammy overrides - 0.3.28 Add ability to define extra command(s) for the nova cell setup job - 0.3.29 Add ability to define extra command(s) for the nova service cleaner job + - 0.3.30 Add the conditional statement for log_config_append ...