From cf4b852a3dc1b6f1f0a8c94409c1ef705afba365 Mon Sep 17 00:00:00 2001 From: Gor Poghosyan Date: Mon, 12 Apr 2021 13:04:40 +0400 Subject: [PATCH] netris-controller: mongodb and mariadb init scripts fixes --- charts/netris-controller/Chart.yaml | 4 ++-- .../templates/netris-controller-initdb-mongodb.yaml | 3 ++- .../netris-controller/templates/netris-controller-initdb.yaml | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/charts/netris-controller/Chart.yaml b/charts/netris-controller/Chart.yaml index dc7861f..176efbc 100644 --- a/charts/netris-controller/Chart.yaml +++ b/charts/netris-controller/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: v2.9.0-1 +appVersion: v2.9.0-2 home: https://netris.ai icon: https://www.netris.ai/wp-content/uploads/2020/05/logo-600.png # [todo] Change url to permalink keywords: diff --git a/charts/netris-controller/templates/netris-controller-initdb-mongodb.yaml b/charts/netris-controller/templates/netris-controller-initdb-mongodb.yaml index 1bfa9c1..f10a603 100644 --- a/charts/netris-controller/templates/netris-controller-initdb-mongodb.yaml +++ b/charts/netris-controller/templates/netris-controller-initdb-mongodb.yaml @@ -1,6 +1,7 @@ apiVersion: v1 data: - init: |- + init.js: |- + use {{ .Values.mongodb.auth.database }} db.createCollection("audit_log", {capped: true, size: 1073741824}); db.audit_log.createIndex({"updatedAt":-1}); db.audit_log.createIndex({"createdAt":-1}); diff --git a/charts/netris-controller/templates/netris-controller-initdb.yaml b/charts/netris-controller/templates/netris-controller-initdb.yaml index bc74d7d..165b70b 100644 --- a/charts/netris-controller/templates/netris-controller-initdb.yaml +++ b/charts/netris-controller/templates/netris-controller-initdb.yaml @@ -1652,10 +1652,10 @@ data: users.sql: |- USE {{ .Values.mariadb.auth.database }}; - INSERT INTO `users` VALUES (1,'{{ .Values.netris.webLogin }}','{{ .Values.netris.webPassword | sha1sum }}','','info@netris.ai','',NULL,0,'','','Netris',NULL,0,1,'enabled','','', NULL, NULL); + INSERT INTO `users` VALUES (1,'{{ .Values.netris.webLogin }}','{{ .Values.netris.webPassword | sha1sum }}','Netris','info@netris.local','',NULL,0,'','','Netris',NULL,0,1,'enabled','','', NULL, NULL); INSERT INTO `user_to_tenant` VALUES (1,1,0,'w'); - INSERT INTO `users` VALUES (2,'k8swatcher','{{ .Values.netris.authKey | sha1sum }}','K8SWatcher Agent','k8swatcher@netris.ai','',NULL,0,'','','Netris',NULL,0,1,'disabled','','', NULL, NULL); + INSERT INTO `users` VALUES (2,'k8swatcher','{{ .Values.netris.authKey | sha1sum }}','K8SWatcher Agent','k8swatcher@netris.local','',NULL,0,'','','Netris',NULL,0,1,'disabled','','', NULL, NULL); INSERT INTO `user_to_tenant` VALUES (2,2,0,'w'); vpn_scores.sql: | USE {{ .Values.mariadb.auth.database }};