Skip to content

Commit

Permalink
add required values for secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c committed Sep 19, 2024
1 parent 509ff70 commit e33e465
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
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 }}

0 comments on commit e33e465

Please sign in to comment.