Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ name: Functional Test (kind)
# jclouds.endpoint (provider-agnostic).
# azureblob-existing-secret -> Azurite mock, account key delivered via a
# pre-created Secret (key.existingSecret path, GH #34).
# azureblob-managed-identity -> keyless Azure: managedIdentity renders empty
# identity/credential, so the Azure SDK's
# DefaultAzureCredential fetches a token from a stub
# managed-identity endpoint and S3Proxy presents it to
# Azurite (--oauth basic, HTTPS). Azurite rejects
# anonymous requests, so only the token path passes.
# gcs -> fake-gcs-server mock through googleCloudStorage.endpoint,
# full round-trip. No key: the emulator accepts the
# unauthenticated requests the GCS SDK sends without one.
# multi-backend -> s3 (MinIO) + azureblob (Azurite) + filesystem (PVC)
# in ONE release, with per-backend bucket-locator
# routing. assert-routing.sh writes one bucket per
Expand All @@ -25,9 +34,9 @@ name: Functional Test (kind)
# generated and stored in a Secret; s3proxy is installed
# with config.tls (existingSecret path) over filesystem,
# then the smoke test round-trips over HTTPS.
# gcs/b2/openstack-swift/rackspace are render-only (covered by lint-render + helm-diff):
# gcs has no jclouds.endpoint override in the chart, and the others have no
# lightweight in-cluster emulator.
# openstack-swift is render-only (lint-render + helm-diff); an openstackswift/saio leg
# is possible but not added yet. Auth paths no emulator verifies stay render-only too:
# the GCS service-account key, Azure SAS, and S3 keyless.

on:
pull_request:
Expand Down Expand Up @@ -68,6 +77,13 @@ jobs:
values: ci/functional/values/azureblob-existing-secret.yaml
mock: ci/functional/mocks/azurite.yaml
azureKeySecret: true
- backend: azureblob-managed-identity
values: ci/functional/values/azureblob-managed-identity.yaml
mock: ci/functional/mocks/azurite-oauth.yaml ci/functional/mocks/azure-token-stub.yaml
azuriteOAuth: true
- backend: gcs
values: ci/functional/values/gcs.yaml
mock: ci/functional/mocks/fake-gcs-server.yaml
- backend: multi-backend
values: ci/functional/values/multi-backend.yaml
mock: ci/functional/mocks/minio.yaml ci/functional/mocks/azurite.yaml
Expand Down Expand Up @@ -114,6 +130,23 @@ jobs:
--from-file=keystore.p12=/tmp/keystore.p12 \
--from-literal=keystore-password=changeit

- name: Generate Azurite TLS and S3Proxy truststore Secrets (managed-identity leg)
if: matrix.azuriteOAuth
# Azurite serves bearer-token auth over HTTPS only, and the Azure SDK sends
# tokens over HTTPS only, so Azurite gets a self-signed cert for its Service
# name and the S3Proxy JVM trusts it through a PKCS12 truststore.
run: |
openssl req -x509 -newkey rsa:2048 -nodes -days 1 \
-keyout /tmp/azurite.key -out /tmp/azurite.crt \
-subj "/CN=azurite" -addext "subjectAltName=DNS:azurite"
"${JAVA_HOME}/bin/keytool" -importcert -noprompt -alias azurite \
-file /tmp/azurite.crt -keystore /tmp/truststore \
-storetype PKCS12 -storepass changeit
kubectl -n "${NAMESPACE}" create secret tls azurite-tls \
--cert=/tmp/azurite.crt --key=/tmp/azurite.key
kubectl -n "${NAMESPACE}" create secret generic s3proxy-truststore \
--from-file=truststore=/tmp/truststore

- name: Create client auth Secret (auth existingSecret leg)
if: matrix.authSecret
# The identity/secret the smoke test signs with, in the Secret the chart
Expand Down Expand Up @@ -171,4 +204,5 @@ jobs:
kubectl -n "${NAMESPACE}" get all || true
kubectl -n "${NAMESPACE}" describe pods || true
kubectl -n "${NAMESPACE}" logs -l app.kubernetes.io/name=s3proxy --all-containers --tail=300 || true
kubectl -n "${NAMESPACE}" logs -l app --all-containers --prefix --tail=100 || true
kubectl -n "${NAMESPACE}" get events --sort-by=.lastTimestamp || true
2 changes: 0 additions & 2 deletions .github/workflows/lint-render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ jobs:
- test-values/auth-existing-secret.yaml
- test-values/azureblob-managed-identity.yaml
- test-values/gcs.yaml
- test-values/b2.yaml
- test-values/openstack-swift.yaml
- test-values/rackspace.yaml
- test-values/multi-backend.yaml
- test-values/ingress.yaml
- test-values/autoscaling.yaml
Expand Down
4 changes: 2 additions & 2 deletions charts/s3proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "3.3.0"
appVersion: "4.1.1"

# comet-common is a library chart of shared helpers (names, labels, images, ...)
# used across Comet charts. The resolved dependency (charts/*.tgz) is git-ignored,
Expand Down
83 changes: 53 additions & 30 deletions charts/s3proxy/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@

## S3Proxy version compatibility

The chart tracks S3Proxy (`andrewgaul/s3proxy`) through `appVersion` (currently `{{ template "chart.appVersion" . }}`); override it with `image.tag`. Minimum supported version is `2.7.0`.
Chart `1.x` targets **S3Proxy 4.x** (`appVersion` currently `{{ template "chart.appVersion" . }}`; override with `image.tag`). Minimum supported version is `4.0.0`.

S3Proxy `3.0.0` deprecated the Apache jclouds storage backends (`s3`, `aws-s3`, `azureblob`, `filesystem`, `transient`) in favor of SDK / NIO2 providers. Upstream has announced that `3.3.0` is the last release to bundle jclouds and that future releases "will lack its Atmos and B2 storage backends" (no jclouds-free release has shipped yet; `3.3.0` remains the latest). The jclouds providers still work on 3.x, but are deprecated:
S3Proxy `4.0.0` removed Apache jclouds and, with it, the Atmos and B2 backends and the `-sdk` / `-nio2` provider-name variants. Each backend now has a single native/SDK implementation selected by its plain name — `filesystem`, `transient`, `aws-s3`, `azureblob`, `google-cloud-storage`, `openstack-swift` — so the chart no longer exposes the `aws:` / `nio2:` / `azureblob.provider` toggles.

- `filesystem` / `transient`: already default to the non-deprecated `*-nio2` variants (`nio2: true`).
- `azureblob`: **defaults to `provider: azureblob-sdk`** (the Azure SDK provider, which signs correctly against custom endpoints such as Azurite). The legacy jclouds `azureblob` provider is deprecated and mis-signs against custom endpoints; set `provider: azureblob` only if you specifically need it. On real Azure, `azureblob-sdk` may require `config.backends.azureblob.regions` for bucket creation. For AKS Managed/Workload Identity (no static key), set `config.backends.azureblob.managedIdentity: true` — see "Example 3b" below.
- `s3`, `googleCloudStorage`, `openstackSwift`: SDK providers exist upstream (`aws-s3-sdk`, `google-cloud-storage-sdk`, `openstack-swift-sdk`). `rackspaceCloudfiles` is OpenStack-Swift-compatible and may be served by `openstack-swift-sdk`. Migrating the chart defaults to the SDK providers is tracked separately.
- `b2` (and Atmos, if ever added) are jclouds-only with **no SDK successor**. These are the backends upstream has said future releases will drop.
- **`filesystem` / `transient`** — the NIO2 implementations (no toggle).
- **`s3`** — the `aws-s3` AWS SDK provider; serves AWS or any S3-compatible endpoint (set `endpoint`). Supports **keyless** auth: leave `accessKeyID`/`secretAccessKey` empty and set `s3.keyless: true` to use the AWS default credential chain (IRSA / EKS Pod Identity / EC2 instance profile).
- **`azureblob`** — the Azure SDK; supports Managed/Workload Identity via `azureblob.managedIdentity: true` (no static key) — see "Example 3b".
- **`googleCloudStorage`** — the Google SDK; a static service-account JSON key is required (`serviceAccountKey.value` / `.existingSecret`). **Keyless GCS (Workload Identity/ADC) is not supported by S3Proxy 4.x** — an empty credential selects an unauthenticated (emulator-only) client, not ADC.
- **`openstackSwift`** — the openstack4j SDK (Keystone v3); set `projectName` and, if non-default, `projectDomainName` / `userDomainName`.

### Our compatibility plan
Removed in chart `1.x`: the `b2` and `rackspaceCloudfiles` backends (jclouds-only, dropped upstream). Rackspace Cloud Files is OpenStack-Swift-compatible — configure it via the `openstackSwift` backend.

- **Through S3Proxy `3.3.0` (chart `0.x`):** all current backends, including the jclouds-only `b2`, are supported. This is where the chart sits today.
- **Guardrail:** the chart **hard-fails at render time** if `b2` (or `atmos`) is enabled while the effective S3Proxy version (`image.tag`, else `appVersion`) is greater than `3.3.0`, so an upgrade past the jclouds sunset cannot silently ship a broken backend. Pin `image.tag` to `3.3.0` or earlier, or disable the backend.
- **When S3Proxy ships its first jclouds-free release:** the chart moves to `1.x.x` (major bump), migrates the remaining backends to their SDK providers, and drops `b2`/`atmos`. Tracked in the SDK-migration follow-up.
- **Guardrail:** the chart **hard-fails at render time** if the effective S3Proxy version (`image.tag`, else `appVersion`) parses as semver and is older than `4.0.0`, so it cannot render a 4.x-only config against a 3.x image. Use chart `0.x` for S3Proxy 3.x.

## Installation

Expand Down Expand Up @@ -100,8 +99,6 @@ config:
backends:
filesystem:
enabled: true
nio2: true
filesystem:
basedir: "/data/s3proxy"

persistence:
Expand All @@ -123,17 +120,33 @@ config:
type: "aws-v4"
identity: "proxy-access-key" # For clients connecting to s3proxy
secret: "proxy-secret-key"
backend:
provider: "aws-s3"
awsS3:
backends:
filesystem:
enabled: false
s3:
enabled: true
region: "us-west-2"
accessKeyID: "aws-access-key-id" # For s3proxy to connect to AWS
secretAccessKey: "aws-secret-access-key"
accessKeyID: "aws-access-key-id" # For s3proxy to connect to AWS
secretAccessKey:
value: "aws-secret-access-key"

persistence:
enabled: false # Not needed for S3 backend
```

For keyless auth on EKS (IRSA / Pod Identity) or EC2, drop the keys and set `keyless`:

```yaml
config:
backends:
filesystem:
enabled: false
s3:
enabled: true
region: "us-west-2"
keyless: true
```

Install:
```bash
helm install s3proxy-s3 ./{{ template "chart.name" . }} -f values-aws-s3.yaml
Expand All @@ -148,11 +161,14 @@ config:
type: "aws-v4"
identity: "myaccesskey"
secret: "mysecretkey"
backend:
provider: "azureblob"
backends:
filesystem:
enabled: false
azureblob:
enabled: true
account: "mystorageaccount"
key: "storageaccountkey"
key:
value: "storageaccountkey"

persistence:
enabled: false # Not needed for Azure backend
Expand Down Expand Up @@ -180,7 +196,6 @@ config:
enabled: false
azureblob:
enabled: true
provider: "azureblob-sdk" # required: the legacy jclouds provider can't do token auth
managedIdentity: true
account: "mystorageaccount" # used for the endpoint; NOT emitted as jclouds.identity
# endpoint: "https://mystorageaccount.blob.core.windows.net" # or set explicitly
Expand All @@ -199,22 +214,31 @@ persistence:

### Example 4: Google Cloud Storage Backend

The GCS SDK reads the credential as a full service-account JSON key. A static key
is required — S3Proxy 4.x does not support keyless GCS (Workload Identity/ADC).

```yaml
# values-gcs.yaml
config:
auth:
type: "aws-v4"
identity: "myaccesskey"
secret: "mysecretkey"
backend:
provider: "google-cloud-storage"
backends:
filesystem:
enabled: false
googleCloudStorage:
enabled: true
projectID: "my-project"
clientEmail: "service-account@my-project.iam.gserviceaccount.com"
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
serviceAccountKey:
# The full service-account JSON key (or use existingSecret / secretKey).
value: |
{
"type": "service_account",
"project_id": "my-project",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "service-account@my-project.iam.gserviceaccount.com"
}

persistence:
enabled: false # Not needed for GCS backend
Expand All @@ -229,8 +253,7 @@ config:
type: "none"
backends:
transient:
enabled: true
nio2: true # In-memory storage
enabled: true # In-memory storage

persistence:
enabled: false
Expand Down
77 changes: 30 additions & 47 deletions charts/s3proxy/override-values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,33 +70,32 @@ config:
# Properties files will be loaded in order: main properties first, then each backend's properties
# Later properties can override earlier ones if there are conflicts
backends:
# Filesystem backend for local storage
# Filesystem backend for local storage (NIO2-backed)
filesystem:
enabled: true # Set to true to use filesystem backend
nio2: true # Set to true for NIO2 implementation (filesystem-nio2), false for standard (filesystem)
basedir: "/data/s3proxy"

# Transient (in-memory) backend - useful for testing
transient:
enabled: false # Set to true to use transient backend
nio2: true # Set to true for NIO2 implementation (transient-nio2), false for standard (transient)

# S3 backend (AWS S3 or S3-compatible storage)
# S3 backend (aws-s3 AWS SDK provider; AWS S3 or any S3-compatible storage)
s3:
enabled: false # Set to true to use S3 backend
aws: true # Set to true for AWS S3 (aws-s3 provider), false for generic S3
region: "us-west-2"
# endpoint: "https://s3.amazonaws.com" # Optional custom endpoint (e.g., MinIO, Ceph)
accessKeyID: "AKIAIOSFODNN7EXAMPLE"
secretAccessKey:
value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
# existingSecret: "my-s3-secret"
# secretKey: "secretAccessKey"
# Or keyless: drop accessKeyID/secretAccessKey and set keyless: true to use the
# AWS default credential chain (IRSA / EKS Pod Identity / EC2 instance profile).
# keyless: true

# Azure Blob Storage backend
# Azure Blob Storage backend (Azure SDK)
azureblob:
enabled: false # Set to true to use Azure Blob backend
provider: "azureblob" # Can be "azureblob" or "azureblob-sdk"
account: "mystorageaccount"
key:
value: "base64encodedkey=="
Expand All @@ -107,58 +106,42 @@ config:
value: "" # Optional SAS token
# existingSecret: "my-azure-sas-secret"
# secretKey: "sasToken"
# Or Managed/Workload Identity (no static key): set managedIdentity: true and
# leave key/sasToken empty (see README "Example 3b").
# managedIdentity: true

# Google Cloud Storage backend
# Google Cloud Storage backend (Google SDK). A static service-account JSON key is
# required; S3Proxy 4.x does not support keyless GCS (Workload Identity/ADC).
googleCloudStorage:
enabled: false # Set to true to use GCS backend
projectID: "my-project"

# Service account email or user email
clientEmail: "service-account@my-project.iam.gserviceaccount.com"

# Private key configuration
privateKey:
# Option 1: Provide private key directly
# value: |-
# -----BEGIN RSA PRIVATE KEY-----
# ...
# -----END RSA PRIVATE KEY-----

# Option 2: Reference an existing secret containing the private key
# existingSecret: "my-gcs-privatekey-secret"
# secretKey: "privateKey"

# Backblaze B2 backend
b2:
enabled: false # Set to true to use B2 backend
account: "account-id"
applicationKey:
value: "application-key"
# existingSecret: "my-b2-secret"
# secretKey: "applicationKey"

# OpenStack Swift backend
projectID: "my-project" # Optional; otherwise taken from the key
serviceAccountKey:
# Option 1: the full service-account JSON key inline
# value: |
# {
# "type": "service_account",
# "project_id": "my-project",
# "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
# "client_email": "service-account@my-project.iam.gserviceaccount.com"
# }
# Option 2: reference an existing Secret holding the JSON key
# existingSecret: "my-gcs-key"
# secretKey: "key.json"

# OpenStack Swift backend (openstack4j SDK, Keystone v3)
openstackSwift:
enabled: false # Set to true to use Swift backend
authURL: "https://auth.cloud.com/v2.0"
tenantName: "my-tenant"
authURL: "https://auth.cloud.com/v3"
userName: "my-user"
password:
value: "my-password"
# existingSecret: "my-swift-secret"
# secretKey: "password"
projectName: "my-project" # Keystone project (required)
projectDomainName: "Default"
userDomainName: "Default"
region: "RegionOne"

# Rackspace Cloud Files backend
rackspaceCloudfiles:
enabled: false # Set to true to use Rackspace Cloud Files backend
region: "us" # Region: "us" or "uk"
userName: "my-user"
apiKey:
value: "my-api-key"
# existingSecret: "my-rackspace-secret"
# secretKey: "apiKey"

# Persistence settings for filesystem backend
persistence:
enabled: true
Expand Down
Loading
Loading