diff --git a/charts/cactus-backend/Chart.yaml b/charts/cactus-backend/Chart.yaml index 734170a..4afa503 100644 --- a/charts/cactus-backend/Chart.yaml +++ b/charts/cactus-backend/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cactus-backend description: A backend that exposes an API for the Cactus app to use. type: application -version: 0.5.9 +version: 0.5.10 appVersion: "0.2" maintainers: - name: dataviruset diff --git a/charts/cactus-parser/Chart.yaml b/charts/cactus-parser/Chart.yaml index 8a24ab8..f3aa512 100644 --- a/charts/cactus-parser/Chart.yaml +++ b/charts/cactus-parser/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cactus-parser description: Used to deploy parsers that load product data from a source when requested from cactus-backend type: application -version: 0.0.4 +version: 0.0.5 appVersion: "0.0" maintainers: - name: dataviruset diff --git a/charts/cactus-parser/README.md b/charts/cactus-parser/README.md index 11427b1..e4b8884 100644 --- a/charts/cactus-parser/README.md +++ b/charts/cactus-parser/README.md @@ -31,7 +31,11 @@ helm uninstall cactus-parser ## Configuration +The default parser is PIDB which requires PostgreSQL but other parsers can also be used as instructed by Auki Labs. + Refer to the [values.yaml](./values.yaml) file for a comprehensive list of configurable parameters and their default values. +If you're using a parser other than the default one, some environment variable may be irrelevant and can be deleted, +such as those for PostgreSQL. You can specify parameters with `--set key=value` or by providing a custom YAML file: diff --git a/charts/cactus-parser/scripts/pre-install.sh b/charts/cactus-parser/scripts/pre-install.sh index e140276..2db2fc8 100755 --- a/charts/cactus-parser/scripts/pre-install.sh +++ b/charts/cactus-parser/scripts/pre-install.sh @@ -17,7 +17,10 @@ yq -i '.imagePullSecrets[0].name = "matterless-common-ecr-credentials"' "$(dirna yq -i '.secrets."cactus-parser".as = "environment"' "$(dirname "$0")/../values.yaml" yq -i '.secrets."cactus-parser".items[0].key = "POSTGRES_PASSWORD"' "$(dirname "$0")/../values.yaml" yq -i '.secrets."cactus-parser".items[0].envVarName = "POSTGRES_PASSWORD"' "$(dirname "$0")/../values.yaml" -yq -i '.secrets."cactus-parser".as = "environment"' "$(dirname "$0")/../values.yaml" +yq -i '.secrets."cactus-parser".items[1].key = "AUTH_JWT_PROFILE"' "$(dirname "$0")/../values.yaml" +yq -i '.secrets."cactus-parser".items[1].envVarName = "AUTH_JWT_PROFILE"' "$(dirname "$0")/../values.yaml" +yq -i '.secrets."cactus-parser".items[2].key = "APP_SECRET"' "$(dirname "$0")/../values.yaml" +yq -i '.secrets."cactus-parser".items[2].envVarName = "APP_SECRET"' "$(dirname "$0")/../values.yaml" yq -i '.secretData.AUTH_JWT_PROFILE = strenv(AUTH_JWT_PROFILE)' "$(dirname "$0")/../values.yaml" yq -i '.secretData.APP_SECRET = strenv(APP_SECRET)' "$(dirname "$0")/../values.yaml" yq -i '.envVars.APP_KEY = strenv(APP_KEY)' "$(dirname "$0")/../values.yaml" diff --git a/charts/cactus-parser/templates/secret.yaml b/charts/cactus-parser/templates/secret.yaml index 7b3627b..0875089 100644 --- a/charts/cactus-parser/templates/secret.yaml +++ b/charts/cactus-parser/templates/secret.yaml @@ -7,7 +7,7 @@ metadata: {{- include "cactus-parser.labels" . | nindent 4 }} type: Opaque data: - POSTGRES_PASSWORD: {{ .Values.secretData.POSTGRES_PASSWORD | b64enc | quote }} - REDIS_PASSWORD: {{ .Values.secretData.REDIS_PASSWORD | b64enc | quote }} + {{- range $key, $value := .Values.secretData }} + {{ $key }}: {{ $value | b64enc | quote }} + {{- end }} {{- end }} - diff --git a/charts/cactus-parser/values.yaml b/charts/cactus-parser/values.yaml index 4deb1a6..9fa94d2 100644 --- a/charts/cactus-parser/values.yaml +++ b/charts/cactus-parser/values.yaml @@ -87,8 +87,8 @@ monitoring: useExistingSecret: false existingSecretName: "" secretData: - POSTGRES_PASSWORD: cactus-parser # This is the password for the postgres database. This should be a random string. - REDIS_PASSWORD: cactus-parser # This is the password for the redis database. This should be a random string. + POSTGRES_PASSWORD: cactus-parser # Can be commented out if you're not using the default PIDB parser. Otherwise make sure this matches the postgres.auth.password value. + REDIS_PASSWORD: cactus-parser # Can be commented out if you're not using the default PIDB parser. Otherwise make sure this matches the redis.auth.password value. secrets: # cactus-parser: # as: environment @@ -177,13 +177,14 @@ persistentVolume: # https://github.com/bitnami/charts/tree/postgresql/16.7.27/bitnami/postgresql#parameters postgresql: - # If true, the PostgreSQL dependency is enabled + # If true, the PostgreSQL dependency is enabled. + # You can disable it if you want to use an external database or if you are not using the default PIDB parser. enabled: true image: repository: bitnamilegacy/postgresql auth: username: cactus-parser - password: cactus-parser + password: cactus-parser # Make sure this matches the POSTGRES_PASSWORD in the secretData section. Also, don't use the default password in production! database: cactus-parser primary: # resources: @@ -201,7 +202,8 @@ postgresql: # https://github.com/bitnami/charts/tree/redis/22.0.7/bitnami/redis#parameters redis: - # If true, the Redis dependency is enabled + # If true, the Redis dependency is enabled. + # You can disable it if you want to use an external Redis instance or if you are not using the default PIDB parser. enabled: false image: repository: bitnamilegacy/redis @@ -244,7 +246,7 @@ redis: - FLUSHDB auth: enabled: true - password: cactus-parser + password: cactus-parser # Make sure this matches the REDIS_PASSWORD in the secretData section. Also, don't use the default password in production! fullnameOverride: redis postgresqlha: