Skip to content

Commit

Permalink
chart: populate secrets and env when Minio is used
Browse files Browse the repository at this point in the history
  • Loading branch information
tamsin johnson authored and tamsin johnson committed Apr 20, 2021
1 parent 075bdb0 commit b034218
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/hyrax/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: hyrax
description: An open-source, Samvera-powered digital repository system
type: application
version: 0.14.0
version: 0.15.0
appVersion: 3.0.1
dependencies:
- name: fcrepo
Expand Down
4 changes: 4 additions & 0 deletions chart/hyrax/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s" .Release.Name "memcached" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "hyrax.minio.fullname" -}}
{{- printf "%s-%s" .Release.Name "minio" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "hyrax.postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand Down
3 changes: 3 additions & 0 deletions chart/hyrax/templates/configmap-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ data:
FCREPO_REST_PATH: {{ .Values.fcrepo.restPath | default "rest" }}
{{- end }}
REDIS_PROVIDER: SIDEKIQ_REDIS_URL
{{- if .Values.minio.enabled }}
MINIO_ENDPOINT: {{ template "hyrax.minio.fullname" . }}
{{- end }}
SKIP_HYRAX_ENGINE_SEED: {{ .Values.skipHyraxEngineSeed | default 0 | quote }}
SOLR_ADMIN_USER: {{ template "hyrax.solr.username" . }}
SOLR_COLLECTION_NAME: {{ template "hyrax.solr.collectionName" . }}
Expand Down
4 changes: 4 additions & 0 deletions chart/hyrax/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ data:
SECRET_KEY_BASE: {{ randAlphaNum 20 | b64enc | quote }}
DB_PASSWORD: {{ include "hyrax.postgresql.password" . | b64enc }}
DATABASE_URL: {{ printf "postgresql://%s:%s@%s/%s?pool=5" ( include "hyrax.postgresql.username" . ) ( include "hyrax.postgresql.password" . ) ( include "hyrax.postgresql.host" . ) ( include "hyrax.postgresql.database" . ) | b64enc }}
{{- if .Values.minio.enabled }}
MINIO_ACCESS_KEY: {{ .Values.minio.accessKey.password | b64enc}}
MINIO_SECRET_KEY: {{ .Values.minio.secretKey.password | b64enc}}
{{- end }}
{{- if not .Values.solrExistingSecret }}
SOLR_ADMIN_PASSWORD: {{ include "hyrax.solr.password" . | b64enc }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/hyrax/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ minio:
password: hyrax-secret-key
persistence:
enabled: false
# defaultBuckets: bucketOne;bucketTwo

postgresql:
enabled: true
Expand Down

0 comments on commit b034218

Please sign in to comment.