From 0ca47f1aee321ffd02ef774832aaf17e4f3efc8c Mon Sep 17 00:00:00 2001 From: Tunahan Cicek Date: Mon, 22 Jan 2024 13:10:04 +0100 Subject: [PATCH] Adjust to implement autogenerate Password if not set --- charts/semantic-hub/Chart.yaml | 2 +- charts/semantic-hub/templates/hub/hub-secret.yaml | 11 ++++++++++- charts/semantic-hub/values.yaml | 10 +++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/charts/semantic-hub/Chart.yaml b/charts/semantic-hub/Chart.yaml index 3f1b4e1c..126c331a 100644 --- a/charts/semantic-hub/Chart.yaml +++ b/charts/semantic-hub/Chart.yaml @@ -26,7 +26,7 @@ sources: - https://github.com/eclipse-tractusx/sldt-semantic-hub type: application -version: 0.1.34 +version: 0.1.35 appVersion: 0.2.16 dependencies: - repository: https://charts.bitnami.com/bitnami diff --git a/charts/semantic-hub/templates/hub/hub-secret.yaml b/charts/semantic-hub/templates/hub/hub-secret.yaml index baa9c723..82f36228 100644 --- a/charts/semantic-hub/templates/hub/hub-secret.yaml +++ b/charts/semantic-hub/templates/hub/hub-secret.yaml @@ -37,4 +37,13 @@ data: # the fuseki instance does not require authentication yet # this variables need to be provided because they are mandatory in the application HUB_TRIPLE_STORE_USERNAME: {{ .Values.graphdb.username | b64enc }} - HUB_TRIPLE_STORE_PASSWORD: {{ .Values.graphdb.password | b64enc }} + {{ if .Values.graphdb.password -}} + HUB_TRIPLE_STORE_PASSWORD: {{ ( .Values.graphdb.password | b64enc) }} + {{ else }} + {{- $secret := (lookup "v1" "Secret" .Release.Namespace $sec_name) }} + {{ if $secret -}} + HUB_TRIPLE_STORE_PASSWORD: {{ index $secret.data "HUB_TRIPLE_STORE_PASSWORD" | quote }} + {{- else -}} + HUB_TRIPLE_STORE_PASSWORD: {{ randAlphaNum 32 | b64enc }} + {{- end }} + {{- end -}} \ No newline at end of file diff --git a/charts/semantic-hub/values.yaml b/charts/semantic-hub/values.yaml index bff4f57d..4539291e 100644 --- a/charts/semantic-hub/values.yaml +++ b/charts/semantic-hub/values.yaml @@ -20,7 +20,7 @@ # enables the default keycloak identity provider -enableKeycloak: true +enableKeycloak: false hub: image: @@ -77,7 +77,7 @@ graphdb: queryEndpoint: query updateEndpoint: update username: admin - password: admin + password: javaOptions: "-Xmx1048m -Xms1048m" args: ["--tdb2", "--update", "--loc", "databases/", "/ds"] storageClassName: default @@ -94,10 +94,10 @@ graphdb: keycloak: postgresql: - enabled: true + enabled: false auth: - adminUser: admin - adminPassword: "admin" + adminUser: + adminPassword: service: type: ClusterIP extraVolumes: