diff --git a/hosting/k8s/helm/Chart.yaml b/hosting/k8s/helm/Chart.yaml index 064d59c1f..0aa94db61 100644 --- a/hosting/k8s/helm/Chart.yaml +++ b/hosting/k8s/helm/Chart.yaml @@ -33,4 +33,5 @@ dependencies: - name: minio version: "17.0.9" repository: "oci://registry-1.docker.io/bitnamicharts" - condition: minio.deploy + condition: s3.deploy + alias: s3 diff --git a/hosting/k8s/helm/README.md b/hosting/k8s/helm/README.md index ac10bfc55..9b37730e1 100644 --- a/hosting/k8s/helm/README.md +++ b/hosting/k8s/helm/README.md @@ -245,11 +245,11 @@ clickhouse: size: 10Gi storageClass: "analytics-hdd" # Optional: override for ClickHouse -minio: +s3: persistence: enabled: true size: 10Gi - storageClass: "objectstore-ssd" # Optional: override for MinIO + storageClass: "objectstore-ssd" # Optional: override for S3 registry: persistence: @@ -530,7 +530,7 @@ helm upgrade --install trigger . \ persistence: size: 100Gi - minio: + s3: persistence: size: 200Gi diff --git a/hosting/k8s/helm/templates/NOTES.txt b/hosting/k8s/helm/templates/NOTES.txt index 1de6a5003..659000a81 100644 --- a/hosting/k8s/helm/templates/NOTES.txt +++ b/hosting/k8s/helm/templates/NOTES.txt @@ -78,10 +78,10 @@ Configuration: {{- else }} - Using external ClickHouse at {{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }} {{- end }} -{{- if .Values.minio.deploy }} -- Using internal MinIO object storage +{{- if .Values.s3.deploy }} +- Using internal S3-compatible object storage (MinIO) {{- else }} -- Using external MinIO object storage at {{ .Values.minio.external.endpoint }} +- Using external S3-compatible object storage at {{ .Values.s3.external.endpoint }} {{- end }} {{- if .Values.registry.deploy }} - Using internal Docker registry diff --git a/hosting/k8s/helm/templates/_helpers.tpl b/hosting/k8s/helm/templates/_helpers.tpl index 6113dcd93..e6376a2c2 100644 --- a/hosting/k8s/helm/templates/_helpers.tpl +++ b/hosting/k8s/helm/templates/_helpers.tpl @@ -177,21 +177,32 @@ http://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.passwor {{- end }} {{/* -MinIO hostname +S3 hostname */}} -{{- define "trigger-v4.minio.hostname" -}} -{{- if .Values.minio.endpoint }} -{{- .Values.minio.endpoint }} -{{- else if .Values.minio.deploy }} +{{- define "trigger-v4.s3.hostname" -}} +{{- if .Values.s3.external.endpoint }} +{{- .Values.s3.external.endpoint }} +{{- else if .Values.s3.deploy }} {{- printf "http://%s-minio:9000" .Release.Name }} {{- end }} {{- end }} {{/* -MinIO connection details +S3 connection details */}} +{{- define "trigger-v4.s3.url" -}} +{{- include "trigger-v4.s3.hostname" . }} +{{- end }} + +{{/* +Backward compatibility - MinIO helpers (deprecated) +*/}} +{{- define "trigger-v4.minio.hostname" -}} +{{- include "trigger-v4.s3.hostname" . }} +{{- end }} + {{- define "trigger-v4.minio.url" -}} -{{- include "trigger-v4.minio.hostname" . }} +{{- include "trigger-v4.s3.url" . }} {{- end }} {{/* diff --git a/hosting/k8s/helm/templates/tests/test-minio.yaml b/hosting/k8s/helm/templates/tests/test-s3.yaml similarity index 55% rename from hosting/k8s/helm/templates/tests/test-minio.yaml rename to hosting/k8s/helm/templates/tests/test-s3.yaml index 2916819d7..a4cfeafed 100644 --- a/hosting/k8s/helm/templates/tests/test-minio.yaml +++ b/hosting/k8s/helm/templates/tests/test-s3.yaml @@ -1,8 +1,8 @@ -{{- if .Values.minio.deploy }} +{{- if .Values.s3.deploy }} apiVersion: v1 kind: Pod metadata: - name: "{{ include "trigger-v4.fullname" . }}-test-minio" + name: "{{ include "trigger-v4.fullname" . }}-test-s3" labels: {{- include "trigger-v4.labels" . | nindent 4 }} annotations: @@ -10,12 +10,12 @@ metadata: spec: restartPolicy: Never containers: - - name: test-minio + - name: test-s3 image: curlimages/curl:8.14.1 command: ['sh', '-c'] args: - | - echo "Testing MinIO health endpoint..." - curl -f http://{{ include "trigger-v4.fullname" . }}-minio:{{ .Values.minio.service.ports.api }}/minio/health/live - echo "MinIO test completed successfully" + echo "Testing S3 (MinIO) health endpoint..." + curl -f http://{{ include "trigger-v4.fullname" . }}-minio:9000/minio/health/live + echo "S3 test completed successfully" {{- end }} \ No newline at end of file diff --git a/hosting/k8s/helm/templates/validate-external-config.yaml b/hosting/k8s/helm/templates/validate-external-config.yaml index 55bcc4f56..c3bd1e075 100644 --- a/hosting/k8s/helm/templates/validate-external-config.yaml +++ b/hosting/k8s/helm/templates/validate-external-config.yaml @@ -20,9 +20,9 @@ This template will fail the Helm deployment if external config is missing for re {{- end }} {{- end }} -{{- if not .Values.minio.deploy }} -{{- if or (not .Values.minio.external.endpoint) (not .Values.minio.external.accessKeyId) }} -{{- fail "MinIO external configuration is required when minio.deploy=false. Please provide minio.external.endpoint and minio.external.accessKeyId" }} +{{- if not .Values.s3.deploy }} +{{- if or (not .Values.s3.external.endpoint) (not .Values.s3.external.accessKeyId) }} +{{- fail "S3 external configuration is required when s3.deploy=false. Please provide s3.external.endpoint and s3.external.accessKeyId" }} {{- end }} {{- end }} diff --git a/hosting/k8s/helm/templates/webapp.yaml b/hosting/k8s/helm/templates/webapp.yaml index 578e949bc..2b7af1898 100644 --- a/hosting/k8s/helm/templates/webapp.yaml +++ b/hosting/k8s/helm/templates/webapp.yaml @@ -97,7 +97,7 @@ spec: - name: DEPLOY_REGISTRY_NAMESPACE value: {{ .Values.registry.repositoryNamespace | quote }} - name: OBJECT_STORE_BASE_URL - value: {{ include "trigger-v4.minio.url" . | quote }} + value: {{ include "trigger-v4.s3.url" . | quote }} - name: GRACEFUL_SHUTDOWN_TIMEOUT value: {{ .Values.webapp.gracefulShutdownTimeout | quote }} {{- if .Values.webapp.bootstrap.enabled }} diff --git a/hosting/k8s/helm/values-production-example.yaml b/hosting/k8s/helm/values-production-example.yaml index ba64d8656..612b4aa5e 100644 --- a/hosting/k8s/helm/values-production-example.yaml +++ b/hosting/k8s/helm/values-production-example.yaml @@ -91,11 +91,11 @@ clickhouse: cpu: 500m memory: 1Gi -# Production MinIO (or use external S3) -minio: +# Production S3-compatible object storage +s3: auth: rootUser: "admin" - rootPassword: "your-strong-minio-password" + rootPassword: "your-strong-s3-password" persistence: enabled: true size: 500Gi diff --git a/hosting/k8s/helm/values.yaml b/hosting/k8s/helm/values.yaml index c0d548b60..1da077570 100644 --- a/hosting/k8s/helm/values.yaml +++ b/hosting/k8s/helm/values.yaml @@ -391,14 +391,14 @@ clickhouse: -# MinIO configuration -minio: - deploy: true # Set to false to use external S3-compatible storage +# S3-compatible object storage configuration +s3: + # Set to false to use external S3-compatible storage + # Set to true to deploy internal MinIO (default) + deploy: true # Bitnami MinIO chart configuration (when deploy: true) - # WARNING: This sets the root user and password on first startup and MUST be changed via the dashboard. - # - Don't forget to update secrets.objectStore if you intend to use the root credentials. - # - You should instead create a new non-root user and update the secrets.objectStore with the new credentials. + # MinIO provides S3-compatible storage when deployed internally auth: rootUser: "admin" rootPassword: "very-safe-password" @@ -408,7 +408,7 @@ minio: size: 10Gi resources: {} - # External MinIO/S3 connection (when deploy: false) + # External S3 connection (when deploy: false) external: endpoint: "" # e.g., "https://s3.amazonaws.com" or "https://your-minio.com:9000" accessKeyId: ""