feat(helm): add configurable assets origin
Add a helper template to allow customizing the assets origin URL. This gives users the ability to override the default S3 endpoint construction when needed, while maintaining backward compatibility. This can be used when try to use proxy the bucket like cloudfront or some custom domain. Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
9d7c54554e
commit
28b580499f
4 changed files with 11 additions and 3 deletions
|
|
@ -89,7 +89,7 @@ spec:
|
|||
# 4. Using AWS itself.
|
||||
# AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object
|
||||
- name: ASSETS_ORIGIN
|
||||
value: "{{ include "openreplay.s3Endpoint" . }}/{{.Values.global.s3.assetsBucket}}"
|
||||
value: "{{ include "openreplay.assets_origin" . }}"
|
||||
{{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }}
|
||||
ports:
|
||||
{{- range $key, $val := .Values.service.ports }}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ spec:
|
|||
# 4. Using AWS itself.
|
||||
# AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object
|
||||
- name: ASSETS_ORIGIN
|
||||
value: "{{ include "openreplay.s3Endpoint" . }}/{{.Values.global.s3.assetsBucket}}"
|
||||
value: {{ include "openreplay.assets_origin" . }}
|
||||
{{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }}
|
||||
ports:
|
||||
{{- range $key, $val := .Values.service.ports }}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ spec:
|
|||
# 4. Using AWS itself.
|
||||
# AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object
|
||||
- name: ASSETS_ORIGIN
|
||||
value: "{{ include "openreplay.s3Endpoint" . }}/{{.Values.global.s3.assetsBucket}}"
|
||||
value: {{ include "openreplay.assets_origin" . }}
|
||||
ports:
|
||||
{{- range $key, $val := .Values.service.ports }}
|
||||
- name: {{ $key }}
|
||||
|
|
|
|||
|
|
@ -142,3 +142,11 @@ Create the volume mount config for redis TLS certificates
|
|||
subPath: {{ .tls.certCAFilename }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "openreplay.assets_origin"}}
|
||||
{{- if .Values.global.assetsOrigin }}
|
||||
{{- .Values.global.assetsOrigin }}
|
||||
{{- else }}
|
||||
{{- include "openreplay.s3Endpoint" . }}/{{.Values.global.s3.assetsBucket}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue