Update osm helm chart to use version 8.0.34 of mysql server 45/13945/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 10 Oct 2023 09:45:57 +0000 (11:45 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 19 Oct 2023 09:36:41 +0000 (11:36 +0200)
Change-Id: I4804d7da812c50283dd0cd3f5398fb4bbb9b93c2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
docker/Keystone/scripts/start.sh
installers/helm/osm/templates/mysql/mysql-statefulset.yaml

index d7fa2ab..dde1b5a 100755 (executable)
@@ -109,8 +109,10 @@ else
 fi
 
 if [ -z $USER_DB_EXISTS ]; then
-    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$KEYSTONE_DB_PASSWORD'"
-    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$KEYSTONE_DB_PASSWORD'"
+    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "CREATE USER 'keystone'@'localhost' IDENTIFIED BY '$KEYSTONE_DB_PASSWORD'"
+    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost'"
+    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "CREATE USER 'keystone'@'%' IDENTIFIED BY '$KEYSTONE_DB_PASSWORD'"
+    mysql -h"$DB_HOST" -P"$DB_PORT" -u"$ROOT_DB_USER" -p"$ROOT_DB_PASSWORD" --default_character_set utf8 -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%'"
 fi
 
 # Setting Keystone database connection
index c9b2d16..1a18f4a 100644 (file)
@@ -49,7 +49,7 @@ spec:
             # readOnlyRootFilesystem: true
             allowPrivilegeEscalation: false
             # runAsNonRoot: true
-          image: mysql:5
+          image: mysql:8.0.34
           imagePullPolicy: {{ .Values.global.image.pullPolicy }}
           ports:
             - containerPort: 3306