From 9f014af170b00e1b45a0572bc48ea43ba23450a9 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 25 Jun 2018 06:43:24 -0500 Subject: [PATCH] Helm-toolkit: Updates manifests to support openstack logging.conf This modifies the manifest files to include volume mounts for the logging configuration file, which is required for the jobs in the charts to function This also makes the keystone-webhook job nonvting, as the htk changes will break the osh-charts required for the keystone webhook job. The change to add the required fixes can be found here: https://review.openstack.org/#/c/576001/. Needed-By: https://review.openstack.org/576001 Change-Id: I543c01c5560570fd67c42fe2f9a060e888532935 Signed-off-by: Steve Wilkerson --- .zuul.yaml | 16 +++++++++++----- .../templates/manifests/_job-bootstrap.yaml | 5 +++++ .../manifests/_job-db-drop-mysql.yaml.tpl | 6 +++++- .../manifests/_job-db-init-mysql.yaml.tpl | 6 +++++- .../templates/manifests/_job-db-sync.yaml.tpl | 6 +++++- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index c40de931f0..ba40992b7d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -32,6 +32,7 @@ - ^doc/.*$ - ^releasenotes/.*$ - openstack-helm-infra-kubernetes-keystone-auth: + voting: false irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -54,11 +55,16 @@ - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ - - openstack-helm-infra-kubernetes-keystone-auth: - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^releasenotes/.*$ + #NOTE(srwilkers): Changing this job to nonvoting until the htk changes + # in this patchset are merged, as these changes will cause the + # keystone-auth check to fail. This fails due to the openstack-helm + # charts that are checked out as part of the job not having the updates + # to the jobs that consume the manifests changed. + # - openstack-helm-infra-kubernetes-keystone-auth: + # irrelevant-files: + # - ^.*\.rst$ + # - ^doc/.*$ + # - ^releasenotes/.*$ experimental: jobs: #NOTE(srwilkers): Make fedora job experimental until issues resolved diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.yaml b/helm-toolkit/templates/manifests/_job-bootstrap.yaml index f9b6453d5c..07df800db5 100644 --- a/helm-toolkit/templates/manifests/_job-bootstrap.yaml +++ b/helm-toolkit/templates/manifests/_job-bootstrap.yaml @@ -28,6 +28,7 @@ limitations under the License. {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} {{- $configFile := index . "configFile" | default (printf "/etc/%s/%s.conf" $serviceName $serviceName ) -}} +{{- $logConfigFile := index . "logConfigFile" | default (printf "/etc/%s/logging.conf" $serviceName ) -}} {{- $keystoneUser := index . "keystoneUser" | default $serviceName -}} {{- $openrc := index . "openrc" | default "true" -}} @@ -76,6 +77,10 @@ spec: mountPath: {{ $configFile | quote }} subPath: {{ base $configFile | quote }} readOnly: true + - name: bootstrap-conf + mountPath: {{ $logConfigFile | quote }} + subPath: {{ base $logConfigFile | quote }} + readOnly: true {{- if $podVolMounts }} {{ $podVolMounts | toYaml | indent 12 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl index 43cae950be..27b347a60a 100644 --- a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl @@ -30,7 +30,7 @@ limitations under the License. {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} -{{- $dbToDrop := index . "dbToDrop" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} +{{- $dbToDrop := index . "dbToDrop" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} {{- $dbsToDrop := default (list $dbToDrop) (index . "dbsToDrop") }} {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} @@ -99,6 +99,10 @@ spec: mountPath: {{ $dbToDrop.configFile | quote }} subPath: {{ base $dbToDrop.configFile | quote }} readOnly: true + - name: db-drop-conf + mountPath: {{ $dbToDrop.logConfigFile | quote }} + subPath: {{ base $dbToDrop.logConfigFile | quote }} + readOnly: true {{- end }} {{- end }} volumes: diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl index 1656729cf6..8e7e436f81 100644 --- a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl @@ -30,7 +30,7 @@ limitations under the License. {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} -{{- $dbToInit := index . "dbToInit" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} +{{- $dbToInit := index . "dbToInit" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} {{- $dbsToInit := default (list $dbToInit) (index . "dbsToInit") }} {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} @@ -96,6 +96,10 @@ spec: mountPath: {{ $dbToInit.configFile | quote }} subPath: {{ base $dbToInit.configFile | quote }} readOnly: true + - name: db-init-conf + mountPath: {{ $dbToInit.logConfigFile | quote }} + subPath: {{ base $dbToInit.logConfigFile | quote }} + readOnly: true {{- end }} {{- end }} volumes: diff --git a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl index 9ce6aafd36..df64ecf215 100644 --- a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl @@ -28,7 +28,7 @@ limitations under the License. {{- $podVolMounts := index . "podVolMounts" | default false -}} {{- $podVols := index . "podVols" | default false -}} {{- $podEnvVars := index . "podEnvVars" | default false -}} -{{- $dbToSync := index . "dbToSync" | default ( dict "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "image" ( index $envAll.Values.images.tags ( printf "%s_db_sync" $serviceName )) ) -}} +{{- $dbToSync := index . "dbToSync" | default ( dict "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "image" ( index $envAll.Values.images.tags ( printf "%s_db_sync" $serviceName )) ) -}} {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} @@ -73,6 +73,10 @@ spec: mountPath: {{ $dbToSync.configFile | quote }} subPath: {{ base $dbToSync.configFile | quote }} readOnly: true + - name: db-sync-conf + mountPath: {{ $dbToSync.logConfigFile | quote }} + subPath: {{ base $dbToSync.logConfigFile | quote }} + readOnly: true {{- if $podVolMounts }} {{ $podVolMounts | toYaml | indent 12 }} {{- end }}