Use more standard configs for DBs.
This propose to changes some Barbican and Manila settings. To use more standard configs for Barbican DB connection and for DB drop job in Both Barbican and Manila wich you can reference same setting from cinder/templates/job-db-drop.yaml . Change-Id: I1be6fc2676363b1348b5bcf4c9433cdcd7ec8a63
This commit is contained in:
parent
79d4b68951
commit
b6f5515ea6
@ -33,7 +33,7 @@ class KekRewrap(object):
|
||||
|
||||
def __init__(self, conf, old_kek):
|
||||
self.dry_run = False
|
||||
self.db_engine = session.create_engine(conf.sql_connection)
|
||||
self.db_engine = session.create_engine(conf.database.connection or conf.sql_connection)
|
||||
self._session_creator = scoping.scoped_session(
|
||||
orm.sessionmaker(
|
||||
bind=self.db_engine,
|
||||
|
@ -49,12 +49,12 @@ limitations under the License.
|
||||
{{- $_ := set .Values.conf.barbican.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.barbican.DEFAULT.sql_connection -}}
|
||||
{{- if empty .Values.conf.barbican.database.connection -}}
|
||||
{{- $connection := tuple "oslo_db" "internal" "barbican" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}}
|
||||
{{- if .Values.manifests.certificates -}}
|
||||
{{- $_ := (printf "%s?charset=utf8&ssl_ca=/etc/mysql/certs/ca.crt&ssl_key=/etc/mysql/certs/tls.key&ssl_cert=/etc/mysql/certs/tls.crt&ssl_verify_cert" $connection ) | set .Values.conf.barbican.DEFAULT "sql_connection" -}}
|
||||
{{- $_ := (printf "%s?charset=utf8&ssl_ca=/etc/mysql/certs/ca.crt&ssl_key=/etc/mysql/certs/tls.key&ssl_cert=/etc/mysql/certs/tls.crt&ssl_verify_cert" $connection ) | set .Values.conf.barbican.database "connection" -}}
|
||||
{{- else -}}
|
||||
{{- $_ := set .Values.conf.barbican.DEFAULT "sql_connection" $connection -}}
|
||||
{{- $_ := set .Values.conf.barbican.database "connection" $connection -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -13,11 +13,9 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- if .Values.manifests.job_db_drop }}
|
||||
{{- $serviceName := "barbican" -}}
|
||||
{{- $dbToDrop := dict "adminSecret" .Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "DEFAULT" "configDbKey" "sql_connection" -}}
|
||||
{{- $dbDropJob := dict "envAll" . "serviceName" $serviceName "dbToDrop" $dbToDrop -}}
|
||||
{{- $dbDropJob := dict "envAll" . "serviceName" "barbican" -}}
|
||||
{{- if .Values.manifests.certificates -}}
|
||||
{{- $_ := set $dbToDrop "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}}
|
||||
{{- $_ := set $dbDropJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.pod.tolerations.barbican.enabled -}}
|
||||
{{- $_ := set $dbDropJob "tolerationsEnabled" true -}}
|
||||
|
@ -13,19 +13,18 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "metadata.annotations.job.db_init" }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "-5"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.job_db_init }}
|
||||
{{- $serviceName := "barbican" -}}
|
||||
{{- $dbToInit := dict "adminSecret" .Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "DEFAULT" "configDbKey" "sql_connection" -}}
|
||||
{{- $dbInitJob := dict "envAll" . "serviceName" $serviceName "dbToInit" $dbToInit "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) -}}
|
||||
{{- $dbInitJob := dict "envAll" . "serviceName" "barbican" -}}
|
||||
{{- if .Values.manifests.certificates -}}
|
||||
{{- $_ := set $dbInitJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.helm3_hook }}
|
||||
{{- $_ := set $dbInitJob "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) }}
|
||||
{{- end }}
|
||||
{{- if .Values.pod.tolerations.barbican.enabled -}}
|
||||
{{- $_ := set $dbInitJob "tolerationsEnabled" true -}}
|
||||
{{- end -}}
|
||||
|
@ -13,11 +13,9 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- if .Values.manifests.job_db_drop }}
|
||||
{{- $serviceName := "manila" -}}
|
||||
{{- $dbToDrop := dict "adminSecret" .Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "logConfigFile" (printf "/etc/%s/logging.conf" $serviceName ) "configDbSection" "DEFAULT" "configDbKey" "sql_connection" -}}
|
||||
{{- $dbDropJob := dict "envAll" . "serviceName" $serviceName "dbToDrop" $dbToDrop -}}
|
||||
{{- $dbDropJob := dict "envAll" . "serviceName" "manila" -}}
|
||||
{{- if .Values.manifests.certificates -}}
|
||||
{{- $_ := set $dbToDrop "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}}
|
||||
{{- $_ := set $dbDropJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.pod.tolerations.manila.enabled -}}
|
||||
{{- $_ := set $dbDropJob "tolerationsEnabled" true -}}
|
||||
|
4
releasenotes/notes/barbican-ead8061b2a6b1b1b.yaml
Normal file
4
releasenotes/notes/barbican-ead8061b2a6b1b1b.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
barbican:
|
||||
- Use more standard DB config setting
|
||||
...
|
4
releasenotes/notes/manila-7bf5ad7472dbf691.yaml
Normal file
4
releasenotes/notes/manila-7bf5ad7472dbf691.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
manila:
|
||||
- Use more standard DB config setting
|
||||
...
|
Loading…
x
Reference in New Issue
Block a user