Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add required values for database secrets #113

Merged
merged 1 commit into from
Sep 19, 2024
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
10 changes: 5 additions & 5 deletions templates/database/database-datafeeder-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
{{- include "georchestra.labels" . | nindent 4 }}
type: Opaque
data:
dbname: {{ $database.auth.database | b64enc | quote }}
host: {{ $database.auth.host | b64enc | quote }}
password: {{ $database.auth.password | b64enc | quote }}
port: {{ $database.auth.port | b64enc | quote }}
user: {{ $database.auth.username | b64enc | quote }}
dbname: {{ required ".Values.datafeeder.auth.dbname is required." $database.auth.database | b64enc | quote }}
host: {{ required ".Values.datafeeder.auth.host is required." $database.auth.host | b64enc | quote }}
password: {{ required ".Values.datafeeder.auth.password is required." $database.auth.password | b64enc | quote }}
port: {{ required ".Values.datafeeder.auth.port is required." $database.auth.port | b64enc | quote }}
user: {{ required ".Values.datafeeder.auth.username is required." $database.auth.username | b64enc | quote }}
{{- end }}
10 changes: 5 additions & 5 deletions templates/database/database-geodata-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
{{- include "georchestra.labels" . | nindent 4 }}
type: Opaque
data:
dbname: {{ $database.auth.database | b64enc | quote }}
host: {{ $database.auth.host | b64enc | quote }}
password: {{ $database.auth.password | b64enc | quote }}
port: {{ $database.auth.port | b64enc | quote }}
user: {{ $database.auth.username | b64enc | quote }}
dbname: {{ required ".Values.geodata.auth.dbname is required." $database.auth.database | b64enc | quote }}
host: {{ required ".Values.geodata.auth.host is required." $database.auth.host | b64enc | quote }}
password: {{ required ".Values.geodata.auth.password is required." $database.auth.password | b64enc | quote }}
port: {{ required ".Values.geodata.auth.port is required." $database.auth.port | b64enc | quote }}
user: {{ required ".Values.geodata.auth.username is required." $database.auth.username | b64enc | quote }}
{{- end }}
12 changes: 5 additions & 7 deletions templates/database/database-georchestra-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if and (.Values.database.geodata) (not .Values.database.geodata.auth.existingSecret ) }}
{{- $database := .Values.database -}}
{{- if not $database.auth.existingSecret -}}
apiVersion: v1
Expand All @@ -9,14 +8,13 @@ metadata:
{{- include "georchestra.labels" . | nindent 4 }}
type: Opaque
data:
dbname: {{ $database.auth.database | b64enc | quote }}
dbname: {{ required ".Values.database.auth.dbname is required." $database.auth.database | b64enc | quote }}
{{- if $database.builtin }}
host: {{ printf "%s-database" .Release.Name | b64enc | quote }}
{{- else }}
host: {{ $database.auth.host | b64enc | quote }}
host: {{ required ".Values.database.auth.host is required." $database.auth.host | b64enc | quote }}
{{- end }}
password: {{ $database.auth.password | b64enc | quote }}
port: {{ $database.auth.port | b64enc | quote }}
user: {{ $database.auth.username | b64enc | quote }}
{{- end }}
password: {{ required ".Values.database.auth.password is required." $database.auth.password | b64enc | quote | }}
port: {{ required ".Values.database.auth.port is required." $database.auth.port | b64enc | quote }}
user: {{ required ".Values.database.auth.username is required." $database.auth.username | b64enc | quote }}
{{- end }}
Loading