diff --git a/contrib/helm/README.md b/contrib/helm/README.md index 87e797d6c..5b3b13189 100644 --- a/contrib/helm/README.md +++ b/contrib/helm/README.md @@ -29,7 +29,7 @@ export PASSWORD_PEPPER=$(openssl rand -base64 32) export TRUST_TOKEN_SECRET=$(openssl rand -base64 32) ``` -#### Download remote dependencies +#### Download remote dependencies ```bash helm dependency update ./charts/probo @@ -225,7 +225,7 @@ helm install my-probo ././charts/probo \ - Storage: Azure Blob Storage (with S3 compatibility) - Kubernetes: Azure Kubernetes Service (AKS) -#### Exemple +#### Example ```bash @@ -242,9 +242,12 @@ helm install my-probo ././charts/probo \ --set s3.endpoint="https://.blob.core.windows.net" \ --set s3.bucket="my-probo-bucket" \ --set s3.accessKeyId="" \ - --set s3.secretAccessKey="" + --set s3.secretAccessKey="" \ + --set s3.usePathStyle=true ``` +> **Note:** Azure Blob Storage requires `s3.usePathStyle=true` to construct URLs correctly (path-style: `https://account.blob.core.windows.net/container/...` instead of virtual-hosted style: `https://bucket.account.blob.core.windows.net/...`). + ### DigitalOcean - PostgreSQL: Managed PostgreSQL Database - Storage: DigitalOcean Spaces diff --git a/contrib/helm/charts/probo/README.md b/contrib/helm/charts/probo/README.md index e0b2ccfac..992f4f973 100644 --- a/contrib/helm/charts/probo/README.md +++ b/contrib/helm/charts/probo/README.md @@ -160,6 +160,7 @@ The following parameters **must** be configured: | `s3.bucket` | S3 bucket name | `probod` | | `s3.region` | AWS region | `us-east-1` | | `s3.endpoint` | S3 endpoint (for S3-compatible) | `""` | +| `s3.usePathStyle` | Use path-style URLs (required for Azure Blob Storage) | `false` | | `chrome.enabled` | Deploy Chrome | `true` | | `chrome.external.addr` | External Chrome (if disabled) | `""` | | `ingress.enabled` | Enable ingress | `false` | diff --git a/contrib/helm/charts/probo/templates/deployment.yaml b/contrib/helm/charts/probo/templates/deployment.yaml index a66755c1e..778395f41 100644 --- a/contrib/helm/charts/probo/templates/deployment.yaml +++ b/contrib/helm/charts/probo/templates/deployment.yaml @@ -179,6 +179,10 @@ spec: - name: AWS_ENDPOINT value: {{ $s3Endpoint | quote }} {{- end }} + {{- if .Values.s3.usePathStyle }} + - name: AWS_USE_PATH_STYLE + value: "true" + {{- end }} # Email (SMTP) - name: MAILER_SENDER_NAME value: {{ .Values.probo.mailer.senderName | quote }} diff --git a/contrib/helm/charts/probo/values-production.yaml.example b/contrib/helm/charts/probo/values-production.yaml.example index da657b31c..c2b45560d 100644 --- a/contrib/helm/charts/probo/values-production.yaml.example +++ b/contrib/helm/charts/probo/values-production.yaml.example @@ -244,6 +244,14 @@ s3: # accessKeyId: "..." # Spaces access key # secretAccessKey: "..." # Spaces secret + # Azure Blob Storage example (uncomment and adjust): + # region: "eastus" + # bucket: "probo-container" + # endpoint: "https://mystorageaccount.blob.core.windows.net" + # accessKeyId: "mystorageaccount" # Storage account name + # secretAccessKey: "..." # Storage account access key + # usePathStyle: true # Required for Azure Blob Storage + # Chrome for PDF generation chrome: enabled: true diff --git a/contrib/helm/charts/probo/values.yaml b/contrib/helm/charts/probo/values.yaml index 8c9e77006..c496e51a7 100644 --- a/contrib/helm/charts/probo/values.yaml +++ b/contrib/helm/charts/probo/values.yaml @@ -317,6 +317,10 @@ s3: endpoint: "" accessKeyId: "" # REQUIRED when minio.enabled=false: S3 access key secretAccessKey: "" # REQUIRED when minio.enabled=false: S3 secret key + # Use path-style URLs (required for Azure Blob Storage and some S3-compatible services) + # When true: https://endpoint/bucket/key + # When false (default): https://bucket.endpoint/key + usePathStyle: false # MinIO configuration # Enable included MinIO for testing/development (NOT for production) diff --git a/pkg/probod/aws_config.go b/pkg/probod/aws_config.go index 2ae3de991..a4095fba0 100644 --- a/pkg/probod/aws_config.go +++ b/pkg/probod/aws_config.go @@ -21,5 +21,6 @@ type ( AccessKeyID string `json:"access-key-id"` SecretAccessKey string `json:"secret-access-key"` Endpoint string `json:"endpoint"` + UsePathStyle bool `json:"use-path-style"` } ) diff --git a/pkg/probod/probod.go b/pkg/probod/probod.go index 9a2b14f3b..e7946386d 100644 --- a/pkg/probod/probod.go +++ b/pkg/probod/probod.go @@ -239,7 +239,9 @@ func (impl *Implm) Run( html2pdf.WithTracerProvider(tp), ) - s3Client := s3.NewFromConfig(awsConfig) + s3Client := s3.NewFromConfig(awsConfig, func(o *s3.Options) { + o.UsePathStyle = impl.cfg.AWS.UsePathStyle + }) err = migrator.NewMigrator(pgClient, coredata.Migrations, l.Named("migrations")).Run(ctx, "migrations") if err != nil {