diff --git a/charts/curator/templates/_env.tpl b/charts/curator/templates/_env.tpl index 15704e3..c6f55fa 100644 --- a/charts/curator/templates/_env.tpl +++ b/charts/curator/templates/_env.tpl @@ -1,4 +1,44 @@ {{ define "env.environment" }} +# app.php +{{ if .Values.curator.app.debug }} +- name: APP_DEBUG + value: {{ .Values.curator.app.debug }} +{{ end }} +{{ with (first .Values.ingress.hosts) -}} +- name: APP_URL + value: {{ .host }} +{{ end -}} +# TODO account for old value location +- name: APP_KEY + valueFrom: + secretKeyRef: + name: {{ .Values.curator.app.appKeySecret.name | default (printf "%s-admin" .Release.Name) }} + value: {{ .Values.curator.app.appKeySecret.key | default "app-key"}} +# cache.php +- name: CACHE_DRIVER + value: {{ .Values.curator.cache.type | default "memcached" }} +- name: CACHE_HOST + value: {{ .Values.curator.cache.host | default "memcached"}} +- name: CACHE_PORT + value: {{ .Values.curator.cache.port | default "11211" }} +- name: CACHE_PREFIX + value: {{ .Values.curator.cache.prefix | default .Values.environment }} +# cms.php +- name: ROUTES_CACHE + value: {{ .Values.curator.cms.routesCache | default true }} +- name: ASSET_CACHE + value: {{ .Values.curator.cms.assetCache | default true }} +- name: ASSET_MINIFY + value: {{ .Values.curator.cms.assetMinify | default true }} +- name: FILESYSTEM_DRIVER + value: {{ .Values.curator.cms.filesystemDriver | default "s3" }} +- name: FILESYSTEM_UPLOADS_PATH + value: {{ .Values.curator.cms.uploadsPath | default "s3" }} +- name: FILESYSTEM_MEDIA_PATH + value: {{ .Values.curator.cms.mediaPath | default "s3" }} +- name: ENABLE_CSRF + value: {{ .Values.curator.cms.enableCSRF | default true }} +# database.php - name: DB_HOST value: {{ .Values.mariadbOperator.mariadbEndpoint | default .Values.mariadbOperator.mariaDbName }} - name: DB_DATABASE @@ -10,16 +50,6 @@ secretKeyRef: name: {{ .Values.mariadbOperator.user.userPasswordSecretKeyRef.name | default (printf "%s-mariadb" .Values.environment) }} key: {{ .Values.mariadbOperator.user.userPasswordSecretKeyRef.key | default "password" }} -- name: CACHE_HOST - value: "memcached" -- name: CACHE_PORT - value: "11211" -- name: CACHE_PREFIX - value: {{ .Values.curator.cache.prefix | default .Values.environment }} -{{ with (first .Values.ingress.hosts) -}} -- name: APP_URL - value: {{ .host }} -{{ end -}} {{ if .Values.persistence.s3.enabled -}} - name: S3_BUCKET value: {{ .Values.persistence.s3.bucket | default .Values.environment }} diff --git a/charts/curator/values.yaml b/charts/curator/values.yaml index ecda858..383a52d 100644 --- a/charts/curator/values.yaml +++ b/charts/curator/values.yaml @@ -186,9 +186,30 @@ curator: # -- environment variables to set in the container env: {} # KEY: VALUE + # -- environment variables to pass into app.php + app: + debug: ~ + appKeySecret: + name: ~ + key: ~ + # -- environment variables to pass into cache.php cache: + # -- cache type, possible values apc, array, database, file, memcached, redis + type: ~ + # -- cache host + host: ~ + # -- cache port + port: ~ # -- cache prefix - prefix: "" + prefix: ~ + # -- environment variables to pass into cms.php + cms: + routesCache: ~ + assetCache: ~ + assetMinify: ~ + appKeySecret: + name: ~ + key: ~ ## Initial Admin parameters auth: # -- secret to use for initial admin user @@ -212,6 +233,7 @@ curator: # -- Timeout for probe timeoutSeconds: 15 # -- These are used to override default php config files present in the containers. The files are mounted in the config directory and will append .php to the ends of the keys + # -- If one of these is defined the above config section will no longer be applicable if the new config doesn't utilze environment variables config: {} # app: "" # auth: ""