You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.9 KiB

  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: {{ include "mastodon.fullname" . }}-env
  5. labels:
  6. {{- include "mastodon.labels" . | nindent 4 }}
  7. data:
  8. {{- if .Values.postgresql.enabled }}
  9. DB_HOST: {{ template "mastodon.postgresql.fullname" . }}
  10. {{- else }}
  11. DB_HOST: {{ .Values.postgresql.postgresqlHostname }}
  12. {{- end }}
  13. DB_NAME: {{ .Values.postgresql.postgresqlDatabase }}
  14. DB_POOL: {{ .Values.mastodon.sidekiq.concurrency | quote }}
  15. DB_PORT: "5432"
  16. DB_USER: {{ .Values.postgresql.postgresqlUsername }}
  17. DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
  18. {{- if .Values.elasticsearch.enabled }}
  19. ES_ENABLED: "true"
  20. ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master
  21. ES_PORT: "9200"
  22. {{- end }}
  23. LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }}
  24. # https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior
  25. MALLOC_ARENA_MAX: "2"
  26. NODE_ENV: "production"
  27. RAILS_ENV: "production"
  28. REDIS_HOST: {{ template "mastodon.redis.fullname" . }}-master
  29. REDIS_PORT: "6379"
  30. {{- if .Values.mastodon.s3.enabled }}
  31. S3_BUCKET: {{ .Values.mastodon.s3.bucket }}
  32. S3_ENABLED: "true"
  33. S3_ENDPOINT: {{ .Values.mastodon.s3.endpoint }}
  34. S3_HOSTNAME: {{ .Values.mastodon.s3.hostname }}
  35. S3_PROTOCOL: "https"
  36. {{- if .Values.mastodon.s3.region }}
  37. S3_REGION: {{ .Values.mastodon.s3.region }}
  38. {{- end }}
  39. {{- end }}
  40. {{- if .Values.mastodon.smtp.auth_method }}
  41. SMTP_AUTH_METHOD: {{ .Values.mastodon.smtp.auth_method }}
  42. {{- end }}
  43. {{- if .Values.mastodon.smtp.ca_file }}
  44. SMTP_CA_FILE: {{ .Values.mastodon.smtp.ca_file }}
  45. {{- end }}
  46. {{- if .Values.mastodon.smtp.delivery_method }}
  47. SMTP_DELIVERY_METHOD: {{ .Values.mastodon.smtp.delivery_method }}
  48. {{- end }}
  49. {{- if .Values.mastodon.smtp.domain }}
  50. SMTP_DOMAIN: {{ .Values.mastodon.smtp.domain }}
  51. {{- end }}
  52. {{- if .Values.mastodon.smtp.enable_starttls_auto }}
  53. SMTP_ENABLE_STARTTLS_AUTO: {{ .Values.mastodon.smtp.enable_starttls_auto | quote }}
  54. {{- end }}
  55. {{- if .Values.mastodon.smtp.from_address }}
  56. SMTP_FROM_ADDRESS: {{ .Values.mastodon.smtp.from_address }}
  57. {{- end }}
  58. {{- if .Values.mastodon.smtp.login }}
  59. SMTP_LOGIN: {{ .Values.mastodon.smtp.login }}
  60. {{- end }}
  61. {{- if .Values.mastodon.smtp.openssl_verify_mode }}
  62. SMTP_OPENSSL_VERIFY_MODE: {{ .Values.mastodon.smtp.openssl_verify_mode }}
  63. {{- end }}
  64. {{- if .Values.mastodon.smtp.password }}
  65. SMTP_PASSWORD: {{ .Values.mastodon.smtp.password }}
  66. {{- end }}
  67. {{- if .Values.mastodon.smtp.port }}
  68. SMTP_PORT: {{ .Values.mastodon.smtp.port | quote }}
  69. {{- end }}
  70. {{- if .Values.mastodon.smtp.reply_to }}
  71. SMTP_REPLY_TO: {{ .Values.mastodon.smtp.reply_to }}
  72. {{- end }}
  73. {{- if .Values.mastodon.smtp.server }}
  74. SMTP_SERVER: {{ .Values.mastodon.smtp.server }}
  75. {{- end }}
  76. {{- if .Values.mastodon.smtp.tls }}
  77. SMTP_TLS: {{ .Values.mastodon.smtp.tls | quote }}
  78. {{- end }}
  79. STREAMING_CLUSTER_NUM: {{ .Values.mastodon.streaming.workers | quote }}