From d74e93772684f99652dc6a8922f25c11d502f00e Mon Sep 17 00:00:00 2001 From: songgongjun Date: Fri, 14 Feb 2020 13:15:41 +0800 Subject: [PATCH] Make more sections in daemonset overridable. The work of enable dpdk in starlingx needs to achieve the overrides of parameters such as images, tags, labels, and pods. This function is being implemented through the support of ovs per-host overrides. In order to transfer the parameters such as images after overrides to the daemonset file to achieve the corresponding functions, the functions of overrides need to be upgraded. Move the $daemonset_yaml parameter in the daemonset file to the overrides file, so that daemonset file uses parameters after overrides.This patch and https://review.opendev.org/#/c/707775/ depend on each other. Change-Id: I210e54b28e32ba1b8e281659fee8e6eda38d79d0 Story: 2007291 Task: 38754 Depends-on: https://review.opendev.org/#/c/708894/ Signed-off-by: songgongjun --- helm-toolkit/templates/utils/_daemonset_overrides.tpl | 4 +++- libvirt/templates/daemonset-libvirt.yaml | 5 ++--- tools/deployment/keystone-auth/070-keystone.sh | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl index 10ab1660d..eb9bfc9aa 100644 --- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl +++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl @@ -16,10 +16,11 @@ limitations under the License. {{- define "helm-toolkit.utils.daemonset_overrides" }} {{- $daemonset := index . 0 }} - {{- $daemonset_yaml := index . 1 }} + {{- $daemonset_include := index . 1 }} {{- $configmap_include := index . 2 }} {{- $configmap_name := index . 3 }} {{- $context := index . 4 }} + {{- $serviceAccountName := index . 5 }} {{- $_ := unset $context ".Files" }} {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }} {{- $_ := set $context.Values "__daemonset_list" list }} @@ -201,6 +202,7 @@ limitations under the License. {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }} {{- $_ := set $current_dict "nodeData" $merged_dict }} {{/* Deep copy original daemonset_yaml */}} + {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $current_dict.nodeData | include $daemonset_include | toString | fromYaml }} {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }} {{/* name needs to be a DNS-1123 compliant name. Ensure lower case */}} diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index 2c38feb2b..33dc72716 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -271,8 +271,7 @@ spec: {{- $_ := include "helm-toolkit.utils.dependency_resolver" $dependencyOpts | toString | fromYaml }} {{ tuple $envAll "pod_dependency" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} -{{- $daemonset_yaml := list $daemonset $configMapName $serviceAccountName . | include "libvirt.daemonset" | toString | fromYaml }} +{{- $daemonset_include := "libvirt.daemonset" }} {{- $configmap_yaml := "libvirt.configmap.etc" }} -{{- list $daemonset $daemonset_yaml $configmap_yaml $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} - +{{- list $daemonset $daemonset_include $configmap_yaml $configMapName . $serviceAccountName | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/tools/deployment/keystone-auth/070-keystone.sh b/tools/deployment/keystone-auth/070-keystone.sh index 878a98c13..420f8ad3a 100755 --- a/tools/deployment/keystone-auth/070-keystone.sh +++ b/tools/deployment/keystone-auth/070-keystone.sh @@ -34,6 +34,9 @@ helm upgrade --install ldap ./ldap \ helm status ldap # Install Keystone +cd ${OSH_PATH} +make keystone +cd - helm upgrade --install keystone ${OSH_PATH}/keystone \ --namespace=openstack \ --values=${OSH_PATH}/keystone/values_overrides/ldap.yaml \