From 2ab58ed9cb66e1923f731a046059428eea784351 Mon Sep 17 00:00:00 2001 From: aesoft <43991222+aeppling@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:04:31 +0200 Subject: [PATCH 1/2] fix: add readme --- README.md | 15 +++++++++++++++ kexa-chart/templates/NOTES.txt | 3 --- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f96b260..e224967 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # helm-charts Helm charts to install & run Kexa with postgres/mariaDB and Grafana + + +### Create your secrets + +```bash +kubectl create secret generic kexa-environment-secret --from-file=.env=.env +``` + +### Install the chart + +```bash +helm install kexa-helm .\kexa-chart\ +``` + +### Read the instructions in your console ! \ No newline at end of file diff --git a/kexa-chart/templates/NOTES.txt b/kexa-chart/templates/NOTES.txt index de33791..9985c35 100644 --- a/kexa-chart/templates/NOTES.txt +++ b/kexa-chart/templates/NOTES.txt @@ -19,7 +19,4 @@ kubectl get secret --namespace default kexa-helm-grafana -o jsonpath="{.data.adm # Follow logs from job kubectl logs job/kexa-helm-job -f - -kubectl create secret generic kexa-environment-secret --from-file=.env=.env - --------------------- \ No newline at end of file From fb67c1d79b2c3fb13edc0acd07b6c664c9f4f7b2 Mon Sep 17 00:00:00 2001 From: aesoft <43991222+aeppling@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:53:57 +0200 Subject: [PATCH 2/2] fix: Kubernetes & Workspace secrets ok --- .gitignore | 1 + README.md | 11 +++++++++++ kexa-chart/templates/kexa-job.yaml | 13 ++++++++++++- kexa-chart/values.yaml | 10 ++++------ 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 9da3688..8339d3e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ kexa-chart/files/environment/* kexa-chart/files/config/* node_modules/* ./*.yaml +*.yaml .env \ No newline at end of file diff --git a/README.md b/README.md index e224967..e69e52c 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,21 @@ Helm charts to install & run Kexa with postgres/mariaDB and Grafana ### Create your secrets +*For most addons credentials* ```bash kubectl create secret generic kexa-environment-secret --from-file=.env=.env ``` +*For Kubernetes credentials* +```bash +kubectl create secret generic kubeconfig-secret --from-file=kubeconfig.yaml=kubeconfig.yaml +``` + +*For Google Workspace credentials* +```bash +kubectl create secret generic workspace-secret --from-file=workspace_credentials.json=/path/to/your/credentials.json +``` + ### Install the chart ```bash diff --git a/kexa-chart/templates/kexa-job.yaml b/kexa-chart/templates/kexa-job.yaml index d27c9f2..0a000a4 100644 --- a/kexa-chart/templates/kexa-job.yaml +++ b/kexa-chart/templates/kexa-job.yaml @@ -40,6 +40,12 @@ spec: readOnly: false - name: writable-app-volume mountPath: /app/config +{{- if .Values.kubernetesAddon.enabled }} + - name: kubeconfig-volume + mountPath: /app/kubeconfig.yaml + subPath: kubeconfig.yaml + readOnly: false +{{- end }} restartPolicy: Never volumes: - name: kexa-config-volume @@ -49,4 +55,9 @@ spec: secret: secretName: kexa-environment-secret - name: writable-app-volume - emptyDir: {} \ No newline at end of file + emptyDir: {} +{{- if .Values.kubernetesAddon.enabled }} + - name: kubeconfig-volume + secret: + secretName: kubeconfig-secret +{{- end }} \ No newline at end of file diff --git a/kexa-chart/values.yaml b/kexa-chart/values.yaml index dbdb17d..67b3bc0 100644 --- a/kexa-chart/values.yaml +++ b/kexa-chart/values.yaml @@ -2,6 +2,9 @@ appname: kexa-helm namespace: default +kubernetesAddon: + enabled: true + postgresql: host: postgresql.default.svc.cluster.local database: your_database_name @@ -52,12 +55,7 @@ kexaScript: volumeMounts: - name: configuration-files mountPath: /app/config - - name: environment-files - mountPath: /app/Kexa volumes: - name: configuration-files configMap: - name: kexa-configuration-files - - name: environment-files - configMap: - name: kexa-environment-files \ No newline at end of file + name: kexa-configuration-files \ No newline at end of file