Skip to content

feat(finance-service): wire MinIO env so GetExportDownloadURL presigns against the public endpoint#84

Merged
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:feat/formula-master-infra
May 7, 2026
Merged

feat(finance-service): wire MinIO env so GetExportDownloadURL presigns against the public endpoint#84
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:feat/formula-master-infra

Conversation

@ilramdhan
Copy link
Copy Markdown
Member

Description

This pull request adds MinIO storage configuration to the finance-service deployment, enabling the service to generate presigned download URLs for export artifacts. The configuration is designed to be environment-specific, with overrides for staging and production environments handled via kustomize patches.

finance-service runs the GetExportDownloadURL gRPC method which presigns the download URL handed back to the BFF. Without explicit MinIO env vars the pod falls back to the localhost defaults from config.go and produces presigned URLs against http://localhost:9000 — browsers then either can't reach the host at all or hit a different MinIO and get NoSuchKey. (finance-worker already had these envs since the prior commit; this completes the picture.)

Base adds MINIO_ENDPOINT/USE_SSL/INSECURE_SKIP_VERIFY/PUBLIC_URL/BUCKET plus MINIO_ACCESS_KEY/SECRET_KEY from the existing minio-secret. Overlay patches override MINIO_BUCKET and MINIO_PUBLIC_URL per environment so presigned URLs hit staging-goapps.mutugading.com:30091 (or goapps.mutugading.com:30091 in production).

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing functionality)
  • 📚 Documentation update
  • 🔧 Chore (maintenance, dependencies, etc.)
  • 🚨 Hotfix (urgent production fix)

Changes Made

MinIO storage integration:

  • Added MinIO-related environment variables (MINIO_ENDPOINT, MINIO_BUCKET, MINIO_USE_SSL, MINIO_INSECURE_SKIP_VERIFY, MINIO_PUBLIC_URL, MINIO_ACCESS_KEY, MINIO_SECRET_KEY) to the base deployment in base/deployment.yaml to support artifact storage and secure access.

Environment-specific configuration:

  • Introduced new kustomize patches (env-storage.yaml) in both staging and production overlays to override the MINIO_BUCKET and MINIO_PUBLIC_URL variables per environment. [1] [2]
  • Updated kustomization.yaml files for both staging and production to include the new env-storage.yaml patch. [1] [2]

Pre-merge Checklist

  • I have read and followed RULES.md
  • I have read and followed CONTRIBUTING.md
  • No secrets are committed
  • PR description is complete and clear
  • CI checks are passing

…s against the public endpoint

finance-service runs the GetExportDownloadURL gRPC method which presigns the
download URL handed back to the BFF. Without explicit MinIO env vars the pod
falls back to the localhost defaults from config.go and produces presigned
URLs against http://localhost:9000 — browsers then either can't reach the
host at all or hit a different MinIO and get NoSuchKey. (finance-worker
already had these envs since the prior commit; this completes the picture.)

Base adds MINIO_ENDPOINT/USE_SSL/INSECURE_SKIP_VERIFY/PUBLIC_URL/BUCKET plus
MINIO_ACCESS_KEY/SECRET_KEY from the existing minio-secret. Overlay patches
override MINIO_BUCKET and MINIO_PUBLIC_URL per environment so presigned URLs
hit staging-goapps.mutugading.com:30091 (or goapps.mutugading.com:30091 in
production).
@ilramdhan ilramdhan requested a review from Copilot May 7, 2026 07:15
@ilramdhan ilramdhan self-assigned this May 7, 2026
@ilramdhan ilramdhan added enhancement New feature or request fix labels May 7, 2026
@ilramdhan ilramdhan merged commit d46e8b7 into mutugading:main May 7, 2026
5 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the finance-service Kubernetes manifests to explicitly configure MinIO connection/public URL settings so GetExportDownloadURL generates presigned URLs against the externally reachable MinIO endpoint (instead of defaulting to localhost).

Changes:

  • Add MinIO-related environment variables to finance-service base deployment (endpoint, SSL settings, public URL, bucket, and credentials from minio-secret).
  • Add per-environment kustomize patches in staging/production to override MINIO_BUCKET and MINIO_PUBLIC_URL.
  • Wire the new patches into staging and production kustomization.yaml.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
services/finance-service/base/deployment.yaml Adds MinIO env vars (endpoint/SSL/public URL/bucket/credentials) for presigning download URLs correctly.
services/finance-service/overlays/staging/patches/env-storage.yaml Staging overrides for MINIO_BUCKET and MINIO_PUBLIC_URL.
services/finance-service/overlays/staging/kustomization.yaml Includes the new staging storage env patch.
services/finance-service/overlays/production/patches/env-storage.yaml Production overrides for MINIO_BUCKET and MINIO_PUBLIC_URL.
services/finance-service/overlays/production/kustomization.yaml Includes the new production storage env patch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants