Add presigned URL support for direct S3 downloads (#48)
This commit is contained in:
@@ -97,10 +97,27 @@ password
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
MinIO host
|
||||
MinIO internal host (for server-side operations)
|
||||
*/}}
|
||||
{{- define "orchard.minio.internalHost" -}}
|
||||
{{- if .Values.minio.enabled }}
|
||||
{{- printf "http://%s-minio:9000" .Release.Name }}
|
||||
{{- else }}
|
||||
{{- .Values.orchard.s3.endpoint }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
MinIO host (uses external URL if ingress enabled, for presigned URLs)
|
||||
*/}}
|
||||
{{- define "orchard.minio.host" -}}
|
||||
{{- if .Values.minio.enabled }}
|
||||
{{- if and .Values.minio.enabled .Values.minio.ingress.enabled .Values.minio.ingress.host }}
|
||||
{{- if .Values.minio.ingress.tls.enabled }}
|
||||
{{- printf "https://%s" .Values.minio.ingress.host }}
|
||||
{{- else }}
|
||||
{{- printf "http://%s" .Values.minio.ingress.host }}
|
||||
{{- end }}
|
||||
{{- else if .Values.minio.enabled }}
|
||||
{{- printf "http://%s-minio:9000" .Release.Name }}
|
||||
{{- else }}
|
||||
{{- .Values.orchard.s3.endpoint }}
|
||||
|
||||
@@ -92,6 +92,10 @@ spec:
|
||||
secretKeyRef:
|
||||
name: {{ include "orchard.minio.secretName" . }}
|
||||
key: {{ if .Values.minio.enabled }}root-password{{ else }}{{ .Values.orchard.s3.existingSecretSecretKeyKey }}{{ end }}
|
||||
- name: ORCHARD_DOWNLOAD_MODE
|
||||
value: {{ .Values.orchard.download.mode | quote }}
|
||||
- name: ORCHARD_PRESIGNED_URL_EXPIRY
|
||||
value: {{ .Values.orchard.download.presignedUrlExpiry | quote }}
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||
readinessProbe:
|
||||
|
||||
34
helm/orchard/templates/minio-ingress.yaml
Normal file
34
helm/orchard/templates/minio-ingress.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
{{- if and .Values.minio.enabled .Values.minio.ingress.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "orchard.fullname" . }}-minio
|
||||
labels:
|
||||
{{- include "orchard.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: minio
|
||||
{{- with .Values.minio.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.minio.ingress.className }}
|
||||
ingressClassName: {{ .Values.minio.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.minio.ingress.tls.enabled }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.minio.ingress.host | quote }}
|
||||
secretName: {{ .Values.minio.ingress.tls.secretName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.minio.ingress.host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ .Release.Name }}-minio
|
||||
port:
|
||||
number: 9000
|
||||
{{- end }}
|
||||
@@ -115,6 +115,11 @@ orchard:
|
||||
existingSecretAccessKeyKey: "access-key-id"
|
||||
existingSecretSecretKeyKey: "secret-access-key"
|
||||
|
||||
# Download configuration
|
||||
download:
|
||||
mode: "presigned" # presigned, redirect, or proxy
|
||||
presignedUrlExpiry: 3600 # Presigned URL expiry in seconds
|
||||
|
||||
# PostgreSQL subchart configuration
|
||||
postgresql:
|
||||
enabled: true
|
||||
@@ -147,6 +152,17 @@ minio:
|
||||
persistence:
|
||||
enabled: false
|
||||
size: 50Gi
|
||||
# MinIO ingress for presigned URL access
|
||||
ingress:
|
||||
enabled: false
|
||||
className: "nginx"
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "0" # Disable body size limit for uploads
|
||||
host: "" # e.g., minio.your-domain.com
|
||||
tls:
|
||||
enabled: true
|
||||
secretName: minio-tls
|
||||
|
||||
# Redis subchart configuration (for future caching)
|
||||
redis:
|
||||
|
||||
Reference in New Issue
Block a user