From c8c3a44f0f0481ab79d83392eca61f88a92da83e Mon Sep 17 00:00:00 2001 From: okozachenko1203 Date: Thu, 18 Jul 2024 11:49:04 +1000 Subject: [PATCH] feat: support SQLAlchemy 2.0 --- .charts.yml | 4 +- .../barbican/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/barbican/requirements.lock | 4 +- charts/barbican/requirements.yaml | 2 +- .../charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/ceph-provisioners/requirements.lock | 4 +- charts/ceph-provisioners/requirements.yaml | 2 +- charts/cinder/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/cinder/requirements.lock | 4 +- charts/cinder/requirements.yaml | 2 +- .../designate/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/designate/requirements.lock | 4 +- charts/designate/requirements.yaml | 2 +- charts/glance/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/glance/requirements.lock | 4 +- charts/glance/requirements.yaml | 2 +- charts/heat/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/heat/requirements.lock | 4 +- charts/heat/requirements.yaml | 2 +- charts/horizon/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/horizon/requirements.lock | 4 +- charts/horizon/requirements.yaml | 2 +- charts/keystone/Chart.yaml | 2 +- .../keystone/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/keystone/requirements.lock | 4 +- charts/keystone/requirements.yaml | 2 +- .../keystone/templates/bin/_cred-clean.py.tpl | 7 +++- .../templates/bin/_endpoint-update.py.tpl | 42 ++++++++++++++----- charts/keystone/templates/deployment-api.yaml | 27 ++++-------- .../templates/job-credential-cleanup.yaml | 1 + .../templates/job-credential-setup.yaml | 1 + .../keystone/templates/job-domain-manage.yaml | 1 + .../keystone/templates/job-fernet-setup.yaml | 3 +- .../keystone/templates/job-rabbit-init.yaml | 2 +- charts/keystone/templates/secret-db.yaml | 2 + .../keystone/templates/secret-keystone.yaml | 2 + .../keystone/templates/secret-ldap-tls.yaml | 2 + .../keystone/templates/secret-rabbitmq.yaml | 2 + charts/keystone/values.yaml | 28 ++++++------- charts/libvirt/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/libvirt/requirements.lock | 4 +- charts/libvirt/requirements.yaml | 2 +- charts/magnum/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/magnum/requirements.lock | 4 +- charts/magnum/requirements.yaml | 2 +- charts/manila/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/manila/requirements.lock | 4 +- charts/manila/requirements.yaml | 2 +- .../memcached/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/memcached/requirements.lock | 4 +- charts/memcached/requirements.yaml | 2 +- charts/neutron/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/neutron/requirements.lock | 4 +- charts/neutron/requirements.yaml | 2 +- charts/nova/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/nova/requirements.lock | 4 +- charts/nova/requirements.yaml | 2 +- charts/octavia/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/octavia/requirements.lock | 4 +- charts/octavia/requirements.yaml | 2 +- .../charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/openvswitch/requirements.lock | 4 +- charts/openvswitch/requirements.yaml | 2 +- charts/ovn/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/ovn/requirements.lock | 4 +- charts/ovn/requirements.yaml | 2 +- .../placement/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/placement/requirements.lock | 4 +- charts/placement/requirements.yaml | 2 +- charts/tempest/charts/helm-toolkit/Chart.yaml | 2 +- .../_authenticated_endpoint_uri_lookup.tpl | 2 +- ...nticated_transport_endpoint_uri_lookup.tpl | 2 +- .../templates/scripts/_db-drop.py.tpl | 14 ++++++- .../templates/scripts/_db-init.py.tpl | 22 +++++++--- .../templates/snippets/_image.tpl | 2 +- .../_kubernetes_entrypoint_init_container.tpl | 4 +- charts/tempest/requirements.lock | 4 +- charts/tempest/requirements.yaml | 2 +- 186 files changed, 781 insertions(+), 371 deletions(-) diff --git a/.charts.yml b/.charts.yml index c26935c06..4e2f49215 100644 --- a/.charts.yml +++ b/.charts.yml @@ -6,7 +6,7 @@ openstack_helm_dependencies: &openstack_helm_dependencies - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 charts: - name: barbican @@ -86,7 +86,7 @@ charts: repository: url: https://charts.bitnami.com/bitnami - name: keystone - version: 0.3.5 + version: 0.3.15 repository: *openstack_helm_repository dependencies: *openstack_helm_dependencies patches: diff --git a/charts/barbican/charts/helm-toolkit/Chart.yaml b/charts/barbican/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/barbican/charts/helm-toolkit/Chart.yaml +++ b/charts/barbican/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/barbican/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/barbican/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/barbican/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/barbican/requirements.lock b/charts/barbican/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/barbican/requirements.lock +++ b/charts/barbican/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/barbican/requirements.yaml b/charts/barbican/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/barbican/requirements.yaml +++ b/charts/barbican/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml b/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml +++ b/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/ceph-provisioners/requirements.lock b/charts/ceph-provisioners/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/ceph-provisioners/requirements.lock +++ b/charts/ceph-provisioners/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/ceph-provisioners/requirements.yaml b/charts/ceph-provisioners/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/ceph-provisioners/requirements.yaml +++ b/charts/ceph-provisioners/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/cinder/charts/helm-toolkit/Chart.yaml b/charts/cinder/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/cinder/charts/helm-toolkit/Chart.yaml +++ b/charts/cinder/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/cinder/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/cinder/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/cinder/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/cinder/requirements.lock b/charts/cinder/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/cinder/requirements.lock +++ b/charts/cinder/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/cinder/requirements.yaml b/charts/cinder/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/cinder/requirements.yaml +++ b/charts/cinder/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/designate/charts/helm-toolkit/Chart.yaml b/charts/designate/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/designate/charts/helm-toolkit/Chart.yaml +++ b/charts/designate/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/designate/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/designate/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/designate/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/designate/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/designate/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/designate/requirements.lock b/charts/designate/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/designate/requirements.lock +++ b/charts/designate/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/designate/requirements.yaml b/charts/designate/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/designate/requirements.yaml +++ b/charts/designate/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/glance/charts/helm-toolkit/Chart.yaml b/charts/glance/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/glance/charts/helm-toolkit/Chart.yaml +++ b/charts/glance/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/glance/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/glance/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/glance/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/glance/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/glance/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/glance/requirements.lock b/charts/glance/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/glance/requirements.lock +++ b/charts/glance/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/glance/requirements.yaml b/charts/glance/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/glance/requirements.yaml +++ b/charts/glance/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/heat/charts/helm-toolkit/Chart.yaml b/charts/heat/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/heat/charts/helm-toolkit/Chart.yaml +++ b/charts/heat/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/heat/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/heat/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/heat/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/heat/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/heat/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/heat/requirements.lock b/charts/heat/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/heat/requirements.lock +++ b/charts/heat/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/heat/requirements.yaml b/charts/heat/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/heat/requirements.yaml +++ b/charts/heat/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/horizon/charts/helm-toolkit/Chart.yaml b/charts/horizon/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/horizon/charts/helm-toolkit/Chart.yaml +++ b/charts/horizon/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/horizon/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/horizon/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/horizon/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/horizon/requirements.lock b/charts/horizon/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/horizon/requirements.lock +++ b/charts/horizon/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/horizon/requirements.yaml b/charts/horizon/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/horizon/requirements.yaml +++ b/charts/horizon/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/keystone/Chart.yaml b/charts/keystone/Chart.yaml index b1dbb1111..9205b40fe 100644 --- a/charts/keystone/Chart.yaml +++ b/charts/keystone/Chart.yaml @@ -9,4 +9,4 @@ name: keystone sources: - https://opendev.org/openstack/keystone - https://opendev.org/openstack/openstack-helm -version: 0.3.5 +version: 0.3.15 diff --git a/charts/keystone/charts/helm-toolkit/Chart.yaml b/charts/keystone/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/keystone/charts/helm-toolkit/Chart.yaml +++ b/charts/keystone/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/keystone/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/keystone/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/keystone/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/keystone/requirements.lock b/charts/keystone/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/keystone/requirements.lock +++ b/charts/keystone/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/keystone/requirements.yaml b/charts/keystone/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/keystone/requirements.yaml +++ b/charts/keystone/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/keystone/templates/bin/_cred-clean.py.tpl b/charts/keystone/templates/bin/_cred-clean.py.tpl index e01c3fc3b..d95ed2737 100644 --- a/charts/keystone/templates/bin/_cred-clean.py.tpl +++ b/charts/keystone/templates/bin/_cred-clean.py.tpl @@ -128,7 +128,12 @@ except: try: cmd = "DELETE FROM credential" - user_engine.execute(cmd) + with user_engine.connect() as connection: + connection.execute(cmd) + try: + connection.commit() + except AttributeError: + pass logger.info('Deleted all entries in credential table') except: logger.critical('Failed to clean up credential table in keystone db') diff --git a/charts/keystone/templates/bin/_endpoint-update.py.tpl b/charts/keystone/templates/bin/_endpoint-update.py.tpl index bb4d7b907..1433af21a 100644 --- a/charts/keystone/templates/bin/_endpoint-update.py.tpl +++ b/charts/keystone/templates/bin/_endpoint-update.py.tpl @@ -68,10 +68,17 @@ except: # Set Internal Endpoint try: endpoint_url = os.environ['OS_BOOTSTRAP_INTERNAL_URL'] + region_id = os.environ['OS_REGION_NAME'] cmd = ("update endpoint set url = %s where interface ='internal' and " "service_id = (select id from service where " - "service.type = 'identity')") - user_engine.execute(cmd, (endpoint_url,)) + "service.type = 'identity') and " + "region_id = %s") + with user_engine.connect() as connection: + connection.execute(cmd, (endpoint_url,region_id)) + try: + connection.commit() + except AttributeError: + pass except: logger.critical("Could not update internal endpoint") raise @@ -79,10 +86,17 @@ except: # Set Admin Endpoint try: endpoint_url = os.environ['OS_BOOTSTRAP_ADMIN_URL'] + region_id = os.environ['OS_REGION_NAME'] cmd = ("update endpoint set url = %s where interface ='admin' " "and service_id = (select id from service where " - "service.type = 'identity')") - user_engine.execute(cmd, (endpoint_url,)) + "service.type = 'identity') " + "and region_id = %s") + with user_engine.connect() as connection: + connection.execute(cmd, (endpoint_url,region_id)) + try: + connection.commit() + except AttributeError: + pass except: logger.critical("Could not update admin endpoint") raise @@ -90,20 +104,28 @@ except: # Set Public Endpoint try: endpoint_url = os.environ['OS_BOOTSTRAP_PUBLIC_URL'] + region_id = os.environ['OS_REGION_NAME'] cmd = ("update endpoint set url = %s where interface ='public' " "and service_id = (select id from service where " - "service.type = 'identity')") - user_engine.execute(cmd, (endpoint_url,)) + "service.type = 'identity') " + "and region_id = %s") + with user_engine.connect() as connection: + connection.execute(cmd, (endpoint_url,region_id)) + try: + connection.commit() + except AttributeError: + pass except: logger.critical("Could not update public endpoint") raise # Print endpoints try: - endpoints = user_engine.execute( - ("select interface, url from endpoint where service_id = " - "(select id from service where service.type = 'identity')") - ).fetchall() + with user_engine.connect() as connection: + endpoints = connection.execute( + ("select interface, url from endpoint where service_id = " + "(select id from service where service.type = 'identity')") + ).fetchall() for row in endpoints: logger.info("endpoint ({0}): {1}".format(row[0], row[1])) except: diff --git a/charts/keystone/templates/deployment-api.yaml b/charts/keystone/templates/deployment-api.yaml index 2187d729b..ee4e13c92 100644 --- a/charts/keystone/templates/deployment-api.yaml +++ b/charts/keystone/templates/deployment-api.yaml @@ -50,6 +50,7 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ tuple "keystone_api" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }} {{ dict "envAll" $envAll "podName" "keystone-api" "containerNames" (list "keystone-api") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "keystone" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} @@ -156,15 +157,10 @@ spec: {{- end }} - name: keystone-credential-keys mountPath: {{ .Values.conf.keystone.credential.key_repository }} -{{- if and $envAll.Values.manifests.certificates $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal }} -{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} -{{- end }} -{{- if and $envAll.Values.manifests.certificates .Values.secrets.tls.identity.api.internal }} -{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal "path" "/etc/keystone/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} -{{- end }} -{{- if and $envAll.Values.manifests.certificates $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal }} -{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal "path" "/etc/rabbitmq/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} -{{- end }} +{{- dict "enabled" .Values.tls.oslo_db "name" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} +{{- dict "enabled" .Values.tls.identity "name" .Values.secrets.tls.identity.api.internal "path" "/etc/keystone/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} +{{- dict "enabled" $envAll.Values.tls.oslo_messaging "name" $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal "path" "/etc/rabbitmq/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} + {{ if $mounts_keystone_api.volumeMounts }}{{ toYaml $mounts_keystone_api.volumeMounts | indent 12 }}{{ end }} volumes: - name: pod-tmp @@ -198,14 +194,9 @@ spec: - name: keystone-credential-keys secret: secretName: keystone-credential-keys -{{- if and $envAll.Values.manifests.certificates $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal }} -{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} -{{- end }} -{{- if and $envAll.Values.manifests.certificates .Values.secrets.tls.identity.api.internal }} -{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} -{{- end }} -{{- if and $envAll.Values.manifests.certificates $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal }} -{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} -{{- end }} +{{- dict "enabled" .Values.tls.oslo_db "name" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} +{{- dict "enabled" .Values.tls.identity "name" .Values.secrets.tls.identity.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} +{{- dict "enabled" $envAll.Values.tls.oslo_messaging "name" $envAll.Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} + {{ if $mounts_keystone_api.volumes }}{{ toYaml $mounts_keystone_api.volumes | indent 8 }}{{ end }} {{- end }} diff --git a/charts/keystone/templates/job-credential-cleanup.yaml b/charts/keystone/templates/job-credential-cleanup.yaml index fcd7f11f8..9f2680270 100644 --- a/charts/keystone/templates/job-credential-cleanup.yaml +++ b/charts/keystone/templates/job-credential-cleanup.yaml @@ -33,6 +33,7 @@ metadata: annotations: "helm.sh/hook": pre-delete "helm.sh/hook-delete-policy": hook-succeeded, hook-failed +{{ tuple "keystone_credential_cleanup" $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 }} spec: template: metadata: diff --git a/charts/keystone/templates/job-credential-setup.yaml b/charts/keystone/templates/job-credential-setup.yaml index 5e6edc6f5..38ff3c8ba 100644 --- a/charts/keystone/templates/job-credential-setup.yaml +++ b/charts/keystone/templates/job-credential-setup.yaml @@ -62,6 +62,7 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation {{- end }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} +{{ tuple "keystone_credential_setup" $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 }} spec: template: metadata: diff --git a/charts/keystone/templates/job-domain-manage.yaml b/charts/keystone/templates/job-domain-manage.yaml index 8aece3bdf..87c82ebdb 100644 --- a/charts/keystone/templates/job-domain-manage.yaml +++ b/charts/keystone/templates/job-domain-manage.yaml @@ -30,6 +30,7 @@ metadata: annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": before-hook-creation +{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 }} spec: template: metadata: diff --git a/charts/keystone/templates/job-fernet-setup.yaml b/charts/keystone/templates/job-fernet-setup.yaml index 1505ffad2..d52aa6ce4 100644 --- a/charts/keystone/templates/job-fernet-setup.yaml +++ b/charts/keystone/templates/job-fernet-setup.yaml @@ -56,12 +56,13 @@ metadata: name: keystone-fernet-setup labels: {{ tuple $envAll "keystone" "fernet-setup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} -{{- if .Values.helm3_hook }} annotations: +{{- if .Values.helm3_hook }} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-5" "helm.sh/hook-delete-policy": before-hook-creation {{- end }} +{{ tuple "keystone_fernet_setup" $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 }} spec: template: metadata: diff --git a/charts/keystone/templates/job-rabbit-init.yaml b/charts/keystone/templates/job-rabbit-init.yaml index 02390adf9..e07bd1e4b 100644 --- a/charts/keystone/templates/job-rabbit-init.yaml +++ b/charts/keystone/templates/job-rabbit-init.yaml @@ -19,7 +19,7 @@ helm.sh/hook-weight: "-4" {{- if .Values.manifests.job_rabbit_init }} {{- $rmqUserJob := dict "envAll" . "serviceName" "keystone" "jobAnnotations" (include "metadata.annotations.job.rabbit_init" . | fromYaml) -}} -{{- if and .Values.manifests.certificates .Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal -}} +{{- if and .Values.tls.oslo_messaging .Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal -}} {{- $_ := set $rmqUserJob "tlsSecret" .Values.endpoints.oslo_messaging.auth.admin.secret.tls.internal -}} {{- end -}} {{- if .Values.pod.tolerations.keystone.enabled -}} diff --git a/charts/keystone/templates/secret-db.yaml b/charts/keystone/templates/secret-db.yaml index 55ff59371..3a11383ab 100644 --- a/charts/keystone/templates/secret-db.yaml +++ b/charts/keystone/templates/secret-db.yaml @@ -22,6 +22,8 @@ apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} + annotations: +{{ tuple "oslo_db" $userClass $envAll | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }} type: Opaque data: {{- if $envAll.Values.manifests.certificates }} diff --git a/charts/keystone/templates/secret-keystone.yaml b/charts/keystone/templates/secret-keystone.yaml index 5aa87ab59..093a4b058 100644 --- a/charts/keystone/templates/secret-keystone.yaml +++ b/charts/keystone/templates/secret-keystone.yaml @@ -21,6 +21,8 @@ apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} + annotations: +{{ tuple "identity" $userClass $envAll | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }} type: Opaque data: {{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}} diff --git a/charts/keystone/templates/secret-ldap-tls.yaml b/charts/keystone/templates/secret-ldap-tls.yaml index 05ed7249f..261c3ca53 100644 --- a/charts/keystone/templates/secret-ldap-tls.yaml +++ b/charts/keystone/templates/secret-ldap-tls.yaml @@ -18,6 +18,8 @@ apiVersion: v1 kind: Secret metadata: name: {{ .Values.secrets.ldap.tls }} + annotations: +{{ tuple "ldap" "tls" . | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }} type: Opaque data: tls.ca: {{ .Values.endpoints.ldap.auth.client.tls.ca | default "" | b64enc }} diff --git a/charts/keystone/templates/secret-rabbitmq.yaml b/charts/keystone/templates/secret-rabbitmq.yaml index fb7c7041a..fe5cad4b3 100644 --- a/charts/keystone/templates/secret-rabbitmq.yaml +++ b/charts/keystone/templates/secret-rabbitmq.yaml @@ -25,6 +25,8 @@ apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} + annotations: +{{ tuple "oslo_messaging" $userClass $envAll | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }} type: Opaque data: RABBITMQ_CONNECTION: {{ tuple "oslo_messaging" "internal" $userClass $rabbitmqProtocol $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc }} diff --git a/charts/keystone/values.yaml b/charts/keystone/values.yaml index 2b5caaf70..ab2e1ed0d 100644 --- a/charts/keystone/values.yaml +++ b/charts/keystone/values.yaml @@ -35,21 +35,21 @@ helm3_hook: true images: tags: - bootstrap: docker.io/openstackhelm/heat:wallaby-ubuntu_focal + bootstrap: docker.io/openstackhelm/heat:2024.1-ubuntu_jammy test: docker.io/xrally/xrally-openstack:2.0.0 - db_init: docker.io/openstackhelm/heat:wallaby-ubuntu_focal - keystone_db_sync: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - db_drop: docker.io/openstackhelm/heat:wallaby-ubuntu_focal - ks_user: docker.io/openstackhelm/heat:wallaby-ubuntu_focal - rabbit_init: docker.io/rabbitmq:3.7-management - keystone_fernet_setup: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - keystone_fernet_rotate: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - keystone_credential_setup: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - keystone_credential_rotate: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - keystone_credential_cleanup: docker.io/openstackhelm/heat:wallaby-ubuntu_focal - keystone_api: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - keystone_domain_manage: docker.io/openstackhelm/keystone:wallaby-ubuntu_focal - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + db_init: docker.io/openstackhelm/heat:2024.1-ubuntu_jammy + keystone_db_sync: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + db_drop: docker.io/openstackhelm/heat:2024.1-ubuntu_jammy + ks_user: docker.io/openstackhelm/heat:2024.1-ubuntu_jammy + rabbit_init: docker.io/rabbitmq:3.13-management + keystone_fernet_setup: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + keystone_fernet_rotate: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + keystone_credential_setup: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + keystone_credential_rotate: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + keystone_credential_cleanup: docker.io/openstackhelm/heat:2024.1-ubuntu_jammy + keystone_api: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + keystone_domain_manage: docker.io/openstackhelm/keystone:2024.1-ubuntu_jammy + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal image_repo_sync: docker.io/docker:17.07.0 pull_policy: "IfNotPresent" local_registry: diff --git a/charts/libvirt/charts/helm-toolkit/Chart.yaml b/charts/libvirt/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/libvirt/charts/helm-toolkit/Chart.yaml +++ b/charts/libvirt/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/libvirt/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/libvirt/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/libvirt/requirements.lock b/charts/libvirt/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/libvirt/requirements.lock +++ b/charts/libvirt/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/libvirt/requirements.yaml b/charts/libvirt/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/libvirt/requirements.yaml +++ b/charts/libvirt/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/magnum/charts/helm-toolkit/Chart.yaml b/charts/magnum/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/magnum/charts/helm-toolkit/Chart.yaml +++ b/charts/magnum/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/magnum/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/magnum/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/magnum/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/magnum/requirements.lock b/charts/magnum/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/magnum/requirements.lock +++ b/charts/magnum/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/magnum/requirements.yaml b/charts/magnum/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/magnum/requirements.yaml +++ b/charts/magnum/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/manila/charts/helm-toolkit/Chart.yaml b/charts/manila/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/manila/charts/helm-toolkit/Chart.yaml +++ b/charts/manila/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/manila/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/manila/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/manila/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/manila/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/manila/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/manila/requirements.lock b/charts/manila/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/manila/requirements.lock +++ b/charts/manila/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/manila/requirements.yaml b/charts/manila/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/manila/requirements.yaml +++ b/charts/manila/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/memcached/charts/helm-toolkit/Chart.yaml b/charts/memcached/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/memcached/charts/helm-toolkit/Chart.yaml +++ b/charts/memcached/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/memcached/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/memcached/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/memcached/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/memcached/requirements.lock b/charts/memcached/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/memcached/requirements.lock +++ b/charts/memcached/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/memcached/requirements.yaml b/charts/memcached/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/memcached/requirements.yaml +++ b/charts/memcached/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/neutron/charts/helm-toolkit/Chart.yaml b/charts/neutron/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/neutron/charts/helm-toolkit/Chart.yaml +++ b/charts/neutron/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/neutron/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/neutron/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/neutron/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/neutron/requirements.lock b/charts/neutron/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/neutron/requirements.lock +++ b/charts/neutron/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/neutron/requirements.yaml b/charts/neutron/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/neutron/requirements.yaml +++ b/charts/neutron/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/nova/charts/helm-toolkit/Chart.yaml b/charts/nova/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/nova/charts/helm-toolkit/Chart.yaml +++ b/charts/nova/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/nova/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/nova/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/nova/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/nova/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/nova/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/nova/requirements.lock b/charts/nova/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/nova/requirements.lock +++ b/charts/nova/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/nova/requirements.yaml b/charts/nova/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/nova/requirements.yaml +++ b/charts/nova/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/octavia/charts/helm-toolkit/Chart.yaml b/charts/octavia/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/octavia/charts/helm-toolkit/Chart.yaml +++ b/charts/octavia/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/octavia/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/octavia/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/octavia/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/octavia/requirements.lock b/charts/octavia/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/octavia/requirements.lock +++ b/charts/octavia/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/octavia/requirements.yaml b/charts/octavia/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/octavia/requirements.yaml +++ b/charts/octavia/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/openvswitch/charts/helm-toolkit/Chart.yaml b/charts/openvswitch/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/openvswitch/charts/helm-toolkit/Chart.yaml +++ b/charts/openvswitch/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/openvswitch/requirements.lock b/charts/openvswitch/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/openvswitch/requirements.lock +++ b/charts/openvswitch/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/openvswitch/requirements.yaml b/charts/openvswitch/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/openvswitch/requirements.yaml +++ b/charts/openvswitch/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/ovn/charts/helm-toolkit/Chart.yaml b/charts/ovn/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/ovn/charts/helm-toolkit/Chart.yaml +++ b/charts/ovn/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/ovn/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/ovn/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/ovn/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/ovn/requirements.lock b/charts/ovn/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/ovn/requirements.lock +++ b/charts/ovn/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/ovn/requirements.yaml b/charts/ovn/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/ovn/requirements.yaml +++ b/charts/ovn/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/placement/charts/helm-toolkit/Chart.yaml b/charts/placement/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/placement/charts/helm-toolkit/Chart.yaml +++ b/charts/placement/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/placement/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/placement/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/placement/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/placement/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/placement/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/placement/requirements.lock b/charts/placement/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/placement/requirements.lock +++ b/charts/placement/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/placement/requirements.yaml b/charts/placement/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/placement/requirements.yaml +++ b/charts/placement/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69 diff --git a/charts/tempest/charts/helm-toolkit/Chart.yaml b/charts/tempest/charts/helm-toolkit/Chart.yaml index e827e99f5..d4c0ea20c 100644 --- a/charts/tempest/charts/helm-toolkit/Chart.yaml +++ b/charts/tempest/charts/helm-toolkit/Chart.yaml @@ -9,4 +9,4 @@ name: helm-toolkit sources: - https://opendev.org/openstack/openstack-helm-infra - https://opendev.org/openstack/openstack-helm -version: 0.2.64 +version: 0.2.69 diff --git a/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl index 12b84dec1..d7390d8be 100644 --- a/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl @@ -50,7 +50,7 @@ return: | {{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }} {{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} diff --git a/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl index b7cf28738..b9ac9d9ab 100644 --- a/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl @@ -100,7 +100,7 @@ examples: {{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}} {{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }} {{- $endpointUser := index $userMap "username" }} -{{- $endpointPass := index $userMap "password" }} +{{- $endpointPass := index $userMap "password" | urlquery }} {{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }} {{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- $local := dict "endpointCredsAndHosts" list -}} diff --git a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl index 03884fa18..1e28da9ca 100644 --- a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl @@ -124,7 +124,12 @@ except: # Delete DB try: - root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("DROP DATABASE IF EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted database {0}".format(database)) except: logger.critical("Could not drop database {0}".format(database)) @@ -132,7 +137,12 @@ except: # Delete DB User try: - root_engine.execute("DROP USER IF EXISTS {0}".format(user)) + with root_engine.connect() as connection: + connection.execute("DROP USER IF EXISTS {0}".format(user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Deleted user {0}".format(user)) except: logger.critical("Could not delete user {0}".format(user)) diff --git a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl index 6027b9515..110cd98eb 100644 --- a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl @@ -124,7 +124,12 @@ except: # Create DB try: - root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + with root_engine.connect() as connection: + connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created database {0}".format(database)) except: logger.critical("Could not create database {0}".format(database)) @@ -132,11 +137,16 @@ except: # Create DB User try: - root_engine.execute( - "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( - user, password, mysql_x509)) - root_engine.execute( - "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + with root_engine.connect() as connection: + connection.execute( + "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format( + user, password, mysql_x509)) + connection.execute( + "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)) + try: + connection.commit() + except AttributeError: + pass logger.info("Created user {0} for {1}".format(user, database)) except: logger.critical("Could not create user {0} for {1}".format(user, database)) diff --git a/charts/tempest/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/tempest/charts/helm-toolkit/templates/snippets/_image.tpl index 029c93de5..678b8447f 100644 --- a/charts/tempest/charts/helm-toolkit/templates/snippets/_image.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/snippets/_image.tpl @@ -19,7 +19,7 @@ values: | images: tags: test_image: docker.io/port/test:version-foo - image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true diff --git a/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl index bed712e59..ad628daca 100644 --- a/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl +++ b/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl @@ -19,7 +19,7 @@ abstract: | values: | images: tags: - dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 + dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal pull_policy: IfNotPresent local_registry: active: true @@ -76,7 +76,7 @@ usage: | {{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }} return: | - name: init - image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0" + image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/charts/tempest/requirements.lock b/charts/tempest/requirements.lock index 43aa382fd..7fc06bc3c 100644 --- a/charts/tempest/requirements.lock +++ b/charts/tempest/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 -digest: sha256:4c00b9bfa1d3dc0426a82ec22f51b440e838c55cbd1f81dbf7de5b28471f6141 + version: 0.2.69 +digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef generated: '0001-01-01T00:00:00Z' diff --git a/charts/tempest/requirements.yaml b/charts/tempest/requirements.yaml index ddafbfc88..b3d5dcfc9 100644 --- a/charts/tempest/requirements.yaml +++ b/charts/tempest/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: helm-toolkit repository: https://tarballs.openstack.org/openstack-helm-infra - version: 0.2.64 + version: 0.2.69