From 9abc5f27e52ee0134ed07e329301610cf1be61bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Espa=C3=B1a?= Date: Tue, 28 Feb 2023 16:10:20 -0600 Subject: [PATCH] Adding some comments (#52) * Adding some comments --- README.md | 55 ++++++++++++--------- charts/terrakube/Chart.yaml | 2 +- charts/terrakube/templates/secrets-api.yaml | 2 + charts/terrakube/templates/secrets-ui.yaml | 1 + charts/terrakube/values.schema.json | 30 +---------- 5 files changed, 37 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 437f1fa..7d02182 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,34 @@ # Terrakube Helm Chart -## Requirements +## Helm Repository + +## Usage + +[Helm](https://helm.sh) must be installed to use the charts. Please refer to +Helm's [documentation](https://helm.sh/docs) to get started. + +Once Helm has been set up correctly, add the repo as follows: + + helm repo add terrakube-repo https://AzBuilder.github.io/terrakube-helm-chart + +If you had already added this repo earlier, run `helm repo update` to retrieve +the latest versions of the packages. You can then run `helm search repo +terrakube-repo` to see the charts. + +To install the chart: + + kubectl create namespace terrakube + helm install terrakube terrakube-repo/terrakube -n terrakube + +To uninstall the chart: + + helm delete terrakube -n terrrakube + +## Minikube + +To quickly test Terrakube in Minikube please follow [this](https://docs.terrakube.org/getting-started/deployment/minikube) + +## Advance Installation To install Terrakube in a Kubernetes cluster you will need the following: @@ -457,34 +485,13 @@ kubectl create namespace terrakube ``` Test the helm chart before installing: ```bash -helm install --dry-run --debug --values ./values.yaml terrakube ./terrakube-helm-chart/ -n terrakube +helm install --debug --dry-run --values ./values.yaml terrakube ./terrakube-helm-chart/charts/terrakube/ -n terrakube ``` Running the helm chart. ```bash -helm install --debug --values ./values.yaml terrakube ./terrakube-helm-chart/ -n terrakube +helm install --debug --values ./values.yaml terrakube ./terrakube-helm-chart/charts/terrakube/ -n terrakube ``` After installing you should be able to view the app using ui domain inside the values.yaml. -### 7. Helm Repository - -## Usage - -[Helm](https://helm.sh) must be installed to use the charts. Please refer to -Helm's [documentation](https://helm.sh/docs) to get started. - -Once Helm has been set up correctly, add the repo as follows: - - helm repo add terrakube-repo https://AzBuilder.github.io/terrakube-helm-chart - -If you had already added this repo earlier, run `helm repo update` to retrieve -the latest versions of the packages. You can then run `helm search repo -terrakube-repo` to see the charts. - -To install the chart: - - helm install my- terrakube-repo/terrakube - -To uninstall the chart: - helm delete my- diff --git a/charts/terrakube/Chart.yaml b/charts/terrakube/Chart.yaml index 48d8d92..60ca7a5 100644 --- a/charts/terrakube/Chart.yaml +++ b/charts/terrakube/Chart.yaml @@ -15,7 +15,7 @@ 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: 3.0.1 +version: 3.0.2 # 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 diff --git a/charts/terrakube/templates/secrets-api.yaml b/charts/terrakube/templates/secrets-api.yaml index 4bbeb46..9ba4db1 100644 --- a/charts/terrakube/templates/secrets-api.yaml +++ b/charts/terrakube/templates/secrets-api.yaml @@ -67,6 +67,7 @@ stringData: {{- end }} {{- if .Values.api.defaultDatabase -}} + #Checking default database options DatasourceHostname: '{{ .Release.Name }}-postgresql' DatasourceDatabase: '{{ .Values.postgresql.auth.database }}' DatasourceUser: '{{ .Values.postgresql.auth.username}}' @@ -82,6 +83,7 @@ stringData: {{- if .Values.api.loadSampleData -}} + #Checking if we need to load the default data for testing spring_profiles_active: 'demo' {{- end }} diff --git a/charts/terrakube/templates/secrets-ui.yaml b/charts/terrakube/templates/secrets-ui.yaml index 3a67980..aa858d3 100644 --- a/charts/terrakube/templates/secrets-ui.yaml +++ b/charts/terrakube/templates/secrets-ui.yaml @@ -5,6 +5,7 @@ metadata: name: terrakube-ui-secrets type: Opaque stringData: + # This UI configuration file is loaded in /app/env-config.js env-config.js: | window._env_ = { REACT_APP_TERRAKUBE_API_URL: "{{- if .Values.ingress.useTls }}https{{else}}http{{ end }}://{{ .Values.ingress.api.domain }}/api/v1/", diff --git a/charts/terrakube/values.schema.json b/charts/terrakube/values.schema.json index 0754eeb..cdbd351 100644 --- a/charts/terrakube/values.schema.json +++ b/charts/terrakube/values.schema.json @@ -52,8 +52,8 @@ "storage": { "type": "object", "properties": { - "enabled": { - "description": "Enable Dex", + "defaultStorage": { + "description": "Enable Default Storage", "type": "boolean" }, "azure": { @@ -137,32 +137,6 @@ } } }, - "minio": { - "type": "object", - "required": ["accessKey", "secretKey", "bucketName", "region"], - "properties": { - "accessKey": { - "description": "AWS Access Key", - "type": "string" - }, - "secretKey": { - "description": "AWS Secret Key", - "type": "string" - }, - "bucketName": { - "description": "AWS Bucket name", - "type": "string" - }, - "region": { - "description": "AWS Region", - "type": "string" - }, - "endpoint": { - "description": "Custom S3 Endpoint", - "type": "string" - } - } - }, "default": { "type": "object", "required": ["bucketName", "region"],