Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,4 @@ node_modules/
# helm charts
**/charts/
**/Chart.lock
*.tgz
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="./docs/static/eo-catalogue-logo-1080.webp" align="center" width="200" alt="EO Catalog logo" />
<img src="./docs/static/eo-catalog-logo-1080.webp" align="center" width="200" alt="EO Catalog logo" />

---
EO Catalog, a eoAPI customization.
Expand Down
15 changes: 8 additions & 7 deletions deploy/helm/eocatalog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
apiVersion: v2
type: application
dependencies:
- condition: postgresql.enabled
name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 15.x.x
version: 16.7.4
- condition: redis.enabled
name: redis
repository: oci://registry-1.docker.io/bitnamicharts
Expand All @@ -14,10 +15,10 @@ dependencies:
- bitnami-common
version: 2.x
description: A CS Group Earth Observation solution.
home: https://github.com/csgroup-oss/eo-catalogue
icon: https://github.com/csgroup-oss/eo-catalogue/-/blob/main/docs/static/eo-catalogue-logo-1080.webp
name: eo-catalogue
home: https://github.com/csgroup-oss/eo-catalog
icon: https://github.com/csgroup-oss/eo-catalog/-/blob/main/docs/static/eo-catalog-logo-1080.webp
name: eo-catalog
sources:
- https://github.com/csgroup-oss/eo-catalogue
type: application
version: 0.10.0
- https://github.com/csgroup-oss/eo-catalog
version: 0.3.4
appVersion: 0.2.2
4 changes: 2 additions & 2 deletions deploy/helm/eocatalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ All components are removed except the PrivateVolumeClaim if you use a persistent
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------- |
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
| `postgresql.auth.postgresPassword` | Password for the "postgres" admin user. Ignored if `auth.existingSecret` with key `postgres-password` is provided | `""` |
| `postgresql.auth.username` | Name for a custom user to create | `eo-catalogue` |
| `postgresql.auth.username` | Name for a custom user to create | `eo-catalog` |
| `postgresql.auth.password` | Password for the custom user to create | `""` |
| `postgresql.auth.database` | Name for a custom database to create | `postgis` |
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
Expand All @@ -220,7 +220,7 @@ All components are removed except the PrivateVolumeClaim if you use a persistent
| `externalDatabase.host` | Database host | `""` |
| `externalDatabase.hostWriter` | Database host for write operations. Default to externalDatabase.host. Needed when externalDatabase.host is readonly | `""` |
| `externalDatabase.port` | Database port number | `5432` |
| `externalDatabase.user` | Non-root username for EO Catalog STAC API | `eo-catalogue` |
| `externalDatabase.user` | Non-root username for EO Catalog STAC API | `eo-catalog` |
| `externalDatabase.password` | Password for the non-root username for EO Catalog STAC API | `""` |
| `externalDatabase.postgresPassword` | Password for the root username for EO Catalog STAC API | `""` |
| `externalDatabase.database` | EO Catalog STAC API database name | `postgis` |
Expand Down
80 changes: 40 additions & 40 deletions deploy/helm/eocatalog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Create the name of the service account to use for the STAC API
*/}}
{{- define "eocatalogue.stac.serviceAccountName" -}}
{{- define "eocatalog.stac.serviceAccountName" -}}
{{- if .Values.stac.serviceAccount.create -}}
{{ default (printf "%s-stac-api" (include "common.names.fullname" .)) .Values.stac.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
Expand All @@ -12,59 +12,59 @@ Create the name of the service account to use for the STAC API
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "eocatalogue.imagePullSecrets" -}}
{{- define "eocatalog.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.stac.image) "global" .Values.global) -}}
{{- end -}}

{{/*
Return the proper service name for EO Catalogue STAC API
Return the proper service name for EO catalog STAC API
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "eocatalogue.stac" -}}
{{- define "eocatalog.stac" -}}
{{- printf "%s-stac-api" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name for PostgreSQL
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "eocatalogue.postgresql.fullname" -}}
{{- define "eocatalog.postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the Database hostname
*/}}
{{- define "eocatalogue.databaseHost" -}}
{{- define "eocatalog.databaseHost" -}}
{{- if eq .Values.postgresql.architecture "replication" -}}
{{- ternary (include "eocatalogue.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}-primary
{{- ternary (include "eocatalog.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}-primary
{{- else -}}
{{- ternary (include "eocatalogue.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}
{{- ternary (include "eocatalog.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled -}}
{{- end -}}
{{- end -}}

{{/*
Return the Database hostname
*/}}
{{- define "eocatalogue.databaseHostWriter" -}}
{{- define "eocatalog.databaseHostWriter" -}}
{{- if and (not .Values.postgresql.enabled) .Values.externalDatabase.hostWriter -}}
{{ .Values.externalDatabase.hostWriter }}
{{- else -}}
{{ (include "eocatalogue.databaseHost" .)}}
{{ (include "eocatalog.databaseHost" .)}}
{{- end -}}
{{- end -}}

{{/*
Return the Database port
*/}}
{{- define "eocatalogue.databasePort" -}}
{{- define "eocatalog.databasePort" -}}
{{- ternary "5432" .Values.externalDatabase.port .Values.postgresql.enabled | quote -}}
{{- end -}}

{{/*
Return the Database database name
*/}}
{{- define "eocatalogue.databaseName" -}}
{{- define "eocatalog.databaseName" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.global.postgresql -}}
{{- if .Values.global.postgresql.auth -}}
Expand All @@ -83,7 +83,7 @@ Return the Database database name
{{/*
Return the Database user
*/}}
{{- define "eocatalogue.databaseUser" -}}
{{- define "eocatalog.databaseUser" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.global.postgresql -}}
{{- if .Values.global.postgresql.auth -}}
Expand All @@ -102,20 +102,20 @@ Return the Database user
{{/*
Return the Database encrypted password
*/}}
{{- define "eocatalogue.databaseSecretName" -}}
{{- define "eocatalog.databaseSecretName" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.global.postgresql -}}
{{- if .Values.global.postgresql.auth -}}
{{- if .Values.global.postgresql.auth.existingSecret -}}
{{- tpl .Values.global.postgresql.auth.existingSecret $ -}}
{{- else -}}
{{- default (include "eocatalogue.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- default (include "eocatalog.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (include "eocatalogue.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- default (include "eocatalog.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (include "eocatalogue.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- default (include "eocatalog.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (printf "%s-externaldb" .Release.Name) (tpl .Values.externalDatabase.existingSecret $) -}}
Expand All @@ -125,7 +125,7 @@ Return the Database encrypted password
{{/*
Add environment variables to configure database values
*/}}
{{- define "eocatalogue.databaseSecretKey" -}}
{{- define "eocatalog.databaseSecretKey" -}}
{{- if .Values.postgresql.enabled -}}
{{- print "password" -}}
{{- else -}}
Expand All @@ -141,7 +141,7 @@ Add environment variables to configure database values
{{- end -}}
{{- end -}}

{{- define "eocatalogue.databaseSecretPostgresKey" -}}
{{- define "eocatalog.databaseSecretPostgresKey" -}}
{{- if .Values.postgresql.enabled -}}
{{- print "postgres-password" -}}
{{- else -}}
Expand All @@ -161,31 +161,31 @@ Add environment variables to configure database values
Create a default fully qualified redis name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "eocatalogue.redis.fullname" -}}
{{- define "eocatalog.redis.fullname" -}}
{{- include "common.names.dependency.fullname" (dict "chartName" "redis" "chartValues" .Values.redis "context" $) -}}
{{- end -}}

{{/*
Return the Redis&reg; secret name
*/}}
{{- define "eocatalogue.redis.secretName" -}}
{{- define "eocatalog.redis.secretName" -}}
{{- if .Values.redis.enabled }}
{{- if .Values.redis.auth.existingSecret }}
{{- printf "%s" .Values.redis.auth.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "eocatalogue.redis.fullname" .) }}
{{- printf "%s" (include "eocatalog.redis.fullname" .) }}
{{- end -}}
{{- else if .Values.externalRedis.existingSecret }}
{{- printf "%s" .Values.externalRedis.existingSecret -}}
{{- else -}}
{{- printf "%s-redis" (include "eocatalogue.redis.fullname" .) -}}
{{- printf "%s-redis" (include "eocatalog.redis.fullname" .) -}}
{{- end -}}
{{- end -}}

{{/*
Return the Redis&reg; secret key
*/}}
{{- define "eocatalogue.redis.secretPasswordKey" -}}
{{- define "eocatalog.redis.secretPasswordKey" -}}
{{- if and .Values.redis.enabled .Values.redis.auth.existingSecret }}
{{- .Values.redis.auth.existingSecretPasswordKey | printf "%s" }}
{{- else if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret }}
Expand All @@ -198,7 +198,7 @@ Return the Redis&reg; secret key
{{/*
Return whether Redis&reg; uses password authentication or not
*/}}
{{- define "eocatalogue.redis.auth.enabled" -}}
{{- define "eocatalog.redis.auth.enabled" -}}
{{- if or (and .Values.redis.enabled .Values.redis.auth.enabled) (and (not .Values.redis.enabled) (or .Values.externalRedis.password .Values.externalRedis.existingSecret)) }}
{{- true -}}
{{- end -}}
Expand All @@ -207,7 +207,7 @@ Return whether Redis&reg; uses password authentication or not
{{/*
Return whether Redis&reg; uses password authentication or not
*/}}
{{- define "eocatalogue.redis.tlsEnabled" -}}
{{- define "eocatalog.redis.tlsEnabled" -}}
{{- if or (and .Values.redis.enabled .Values.redis.tls.enabled) (and (not .Values.redis.enabled) (or .Values.externalRedis.tlsEnabled)) }}
{{- "true" | quote -}}
{{- else -}}
Expand All @@ -218,9 +218,9 @@ Return whether Redis&reg; uses password authentication or not
{{/*
Return the Redis&reg; hostname
*/}}
{{- define "eocatalogue.redisHost" -}}
{{- define "eocatalog.redisHost" -}}
{{- if .Values.redis.enabled }}
{{- printf "%s-master" (include "eocatalogue.redis.fullname" .) -}}
{{- printf "%s-master" (include "eocatalog.redis.fullname" .) -}}
{{- else -}}
{{- required "If the redis dependency is disabled you need to add an external redis host" .Values.externalRedis.host -}}
{{- end -}}
Expand All @@ -229,7 +229,7 @@ Return the Redis&reg; hostname
{{/*
Return the Redis&reg; port
*/}}
{{- define "eocatalogue.redisPort" -}}
{{- define "eocatalog.redisPort" -}}
{{- if .Values.redis.enabled }}
{{- .Values.redis.service.port -}}
{{- else -}}
Expand All @@ -240,18 +240,18 @@ Return the Redis&reg; port
{{/*
Get the client secret for the STAC API OpenID Connect authentication.
*/}}
{{- define "eocatalogue.stac.clientSecretName" -}}
{{- define "eocatalog.stac.clientSecretName" -}}
{{- if .Values.stac.oidc.existingSecret.name }}
{{- printf "%s" (tpl .Values.stac.oidc.existingSecret.name $) -}}
{{- else -}}
{{- printf "%s-oidc" (include "eocatalogue.stac" .) -}}
{{- printf "%s-oidc" (include "eocatalog.stac" .) -}}
{{- end -}}
{{- end -}}

{{/*
Get the client secret key for the STAC API OpenID Connect authentication.
*/}}
{{- define "eocatalogue.stac.clientSecretKey" -}}
{{- define "eocatalog.stac.clientSecretKey" -}}
{{- if .Values.stac.oidc.existingSecret.key }}
{{- printf "%s" (tpl .Values.stac.oidc.existingSecret.key $) -}}
{{- else -}}
Expand All @@ -261,9 +261,9 @@ Get the client secret key for the STAC API OpenID Connect authentication.


{{/* Validate values of EO API - database */}}
{{- define "eocatalogue.validateValues.database" -}}
{{- define "eocatalog.validateValues.database" -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.host) (and (not .Values.externalDatabase.password) (not .Values.externalDatabase.existingSecret)) -}}
eocatalogue: database
eocatalog: database
You disabled the PostgreSQL sub-chart but did not specify an external PostgreSQL host.
Either deploy the PostgreSQL sub-chart (--set postgresql.enabled=true),
or set a value for the external database host (--set externalDatabase.host=FOO)
Expand All @@ -275,7 +275,7 @@ eocatalogue: database
{{/*
Validate Redis config
*/}}
{{- define "eocatalogue.validateValues.redis" -}}
{{- define "eocatalog.validateValues.redis" -}}
{{- if and .Values.redis.enabled .Values.redis.auth.existingSecret }}
{{- if not .Values.redis.auth.existingSecretPasswordKey -}}
EO Catalog: You need to provide existingSecretPasswordKey when an existingSecret is specified in redis dependency
Expand All @@ -290,7 +290,7 @@ EO Catalog: You need to provide existingSecretPasswordKey when an existingSecret
{{/*
Validate external Redis config
*/}}
{{- define "eocatalogue.validateValues.externalRedis" -}}
{{- define "eocatalog.validateValues.externalRedis" -}}
{{- if not .Values.redis.enabled -}}
EO Catalog: If the redis dependency is disabled you need to add an external redis port
{{- end -}}
Expand All @@ -299,11 +299,11 @@ EO Catalog: If the redis dependency is disabled you need to add an external redi
{{/*
Compile all warnings into a single message.
*/}}
{{- define "eocatalogue.validateValues" -}}
{{- define "eocatalog.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "eocatalogue.validateValues.database" .) -}}
{{- $messages := append $messages (include "eocatalogue.validateValues.externalRedis" .) -}}
{{- $messages := append $messages (include "eocatalogue.validateValues.redis" .) -}}
{{- $messages := append $messages (include "eocatalog.validateValues.database" .) -}}
{{- $messages := append $messages (include "eocatalog.validateValues.externalRedis" .) -}}
{{- $messages := append $messages (include "eocatalog.validateValues.redis" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- end -}}
Loading
Loading