_postgres.tpl 1.0 KB

12345678910111213141516171819202122232425262728
  1. {{- define "postgres.imageName" -}}
  2. {{- print "postgres:14.5" -}}
  3. {{- end -}}
  4. {{- define "postgres.nameSuffix" -}}
  5. {{- print "postgres" -}}
  6. {{- end -}}
  7. {{- define "postgres.secretName" -}}
  8. {{- print "postgres-details" -}}
  9. {{- end -}}
  10. {{- define "postgres.dbName" -}}
  11. {{- print "logsearchapi" -}}
  12. {{- end -}}
  13. {{- define "postgres.dbUser" -}}
  14. {{- print "logsearchapi" -}}
  15. {{- end -}}
  16. {{- define "postgres.envVariableConfiguration" -}}
  17. {{- $envList := list -}}
  18. {{- $secretName := (include "postgres.secretName" .) -}}
  19. {{- $envList = mustAppend $envList (dict "name" "POSTGRES_USER" "valueFromSecret" true "secretName" $secretName "secretKey" "db_user") -}}
  20. {{- $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "valueFromSecret" true "secretName" $secretName "secretKey" "db_name") -}}
  21. {{- $envList = mustAppend $envList (dict "name" "POSTGRES_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "db_password") -}}
  22. {{- include "common.containers.environmentVariables" (dict "environmentVariables" $envList) -}}
  23. {{- end -}}