Skip to content
Draft
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
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: 1.0.0
version: 1.1.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: "4.1.1"
appVersion: "4.1.2"

# 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
51 changes: 48 additions & 3 deletions charts/s3proxy/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ S3Proxy `4.0.0` removed Apache jclouds and, with it, the Atmos and B2 backends a
- **`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.
- **`googleCloudStorage`** — the Google SDK; authenticates with a service-account JSON key (`serviceAccountKey.value` / `.existingSecret`) or, with no key, application default credentials such as GKE Workload Identity; see "Example 4b". Keyless needs S3Proxy `4.1.2` or later, since earlier releases send requests without credentials; the chart fails at render time if keyless GCS meets an older `image.tag`.
- **`openstackSwift`** — the openstack4j SDK (Keystone v3); set `projectName` and, if non-default, `projectDomainName` / `userDomainName`.

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.
Expand Down Expand Up @@ -214,8 +214,13 @@ 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).
The GCS SDK reads the credential as a full service-account JSON key. For no key,
see Example 4b.

Either way, the identity needs `storage.buckets.get` on the bucket as well as
object access, because S3Proxy reads the bucket's metadata on a GET: grant
`roles/storage.legacyBucketReader` alongside `roles/storage.objectAdmin`. With
object access alone, listing works but GETs fail with `AccessDenied`.

```yaml
# values-gcs.yaml
Expand Down Expand Up @@ -244,6 +249,46 @@ persistence:
enabled: false # Not needed for GCS backend
```

### Example 4b: Google Cloud Storage with Workload Identity (no key)

Leave `serviceAccountKey` empty and the GCS SDK uses application default
credentials, which on GKE with Workload Identity come from the metadata server.
This needs S3Proxy `4.1.2` or later.

Grant the bucket roles to the Kubernetes service account as a Workload Identity
principal:

```bash
PROJECT_NUMBER=$(gcloud projects describe my-project --format='value(projectNumber)')
for role in roles/storage.objectAdmin roles/storage.legacyBucketReader
do
gcloud storage buckets add-iam-policy-binding gs://my-bucket --role "$role" \
--member "principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/my-project.svc.id.goog/subject/ns/my-namespace/sa/s3proxy"
done
```

```yaml
# values-gcs-wi.yaml
config:
backends:
filesystem:
enabled: false
googleCloudStorage:
enabled: true
projectID: "my-project" # no key to take it from

serviceAccount:
create: true
name: s3proxy # the name the IAM binding above refers to
# Or link a Google service account instead, after granting this Kubernetes
# service account roles/iam.workloadIdentityUser on it:
# annotations:
# iam.gke.io/gcp-service-account: "s3proxy@my-project.iam.gserviceaccount.com"

persistence:
enabled: false
```

### Example 5: Anonymous Access (No Authentication)

```yaml
Expand Down
6 changes: 3 additions & 3 deletions charts/s3proxy/override-values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ config:
# leave key/sasToken empty (see README "Example 3b").
# managedIdentity: true

# 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).
# Google Cloud Storage backend (Google SDK). A service-account JSON key, or no key
# for Workload Identity (S3Proxy >= 4.1.2; see README "Example 4b").
googleCloudStorage:
enabled: false # Set to true to use GCS backend
projectID: "my-project" # Optional; otherwise taken from the key
projectID: "my-project" # Optional with a key; set it for Workload Identity
serviceAccountKey:
# Option 1: the full service-account JSON key inline
# value: |
Expand Down
2 changes: 1 addition & 1 deletion charts/s3proxy/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
{{- else if .Values.config.backends.azureblob.enabled }}
- Make sure to configure Azure Blob backend credentials (or set azureblob.managedIdentity: true)
{{- else if .Values.config.backends.googleCloudStorage.enabled }}
- Make sure to configure Google Cloud Storage backend credentials
- Make sure to configure Google Cloud Storage backend credentials (or leave serviceAccountKey empty for Workload Identity)
{{- else if .Values.config.backends.openstackSwift.enabled }}
- Make sure to configure OpenStack Swift backend credentials
{{- end }}
13 changes: 11 additions & 2 deletions charts/s3proxy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ s3proxy.large-object-mocking=true
{{- fail "config.backends.s3.keyless conflicts with a static credential; a non-empty accessKeyID/secretAccessKey.* disables the AWS default credential chain. Unset them." }}
{{- end }}
{{- end }}
{{- /* Keyless GCS: before 4.1.2 S3Proxy sends Google's endpoint unauthenticated
requests instead of using application default credentials, so a Workload
Identity setup would otherwise fail only at runtime, as AccessDenied. */}}
{{- $gcs := .Values.config.backends.googleCloudStorage }}
{{- if and $gcs.enabled (not $gcs.endpoint) (not $gcs.serviceAccountKey.value) (not $gcs.serviceAccountKey.existingSecret) (regexMatch "^v?[0-9]+\\.[0-9]+\\.[0-9]+" $s3pVersion) }}
{{- if semverCompare "< 4.1.2" (trimPrefix "v" $s3pVersion) }}
{{- fail (printf "config.backends.googleCloudStorage has no serviceAccountKey, so it relies on Workload Identity/ADC, which needs S3Proxy >= 4.1.2; the effective S3Proxy version is %s. Bump image.tag, or set serviceAccountKey." $s3pVersion) }}
{{- end }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -217,8 +226,8 @@ data:
# jclouds.credential (the full service-account JSON key) is merged in by the
# merge-configs initContainer from the mounted key file, so the multi-line JSON
# is escaped to a single properties value and kept out of the ConfigMap. With no
# key the SDK uses an unauthenticated client (emulator only) — S3Proxy 4.x does
# NOT support keyless GCS (Workload Identity/ADC); real GCS needs a static key.
# key the SDK uses application default credentials (Workload Identity) against
# Google's endpoints, and none against an emulator.
{{- range $index, $bucket := .Values.config.backends.googleCloudStorage.bucketLocators }}
s3proxy.bucket-locator.{{ add $index 1 }}={{ $bucket }}
{{- end }}
Expand Down
6 changes: 3 additions & 3 deletions charts/s3proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ config:
googleCloudStorage:
# -- Enable Google Cloud Storage backend (provider `google-cloud-storage`, Google SDK)
enabled: false
# -- GCP project ID, emitted as `jclouds.identity` (the GCS SDK store reads it as the project id). Optional: when empty the project is taken from the service-account key.
# -- GCP project ID, emitted as `jclouds.identity` (the GCS SDK store reads it as the project id). Optional with a service-account key, which carries the project; set it for Workload Identity, where there is no key to take it from.
projectID: ""
# -- Custom GCS endpoint (`jclouds.endpoint`), e.g. a fake-gcs-server emulator. Empty uses `https://storage.googleapis.com`. An emulator needs no `serviceAccountKey`: with no key the SDK sends unauthenticated requests.
# -- Custom GCS endpoint (`jclouds.endpoint`). Empty uses `https://storage.googleapis.com`. Without a key, an endpoint that is not HTTPS under `googleapis.com` (e.g. a fake-gcs-server emulator) gets unauthenticated requests, while Google's regional and Private Service Connect endpoints under `googleapis.com` get application default credentials.
endpoint: ""
# -- Service-account key configuration. The full JSON key is passed to the GCS SDK as `jclouds.credential` (`ServiceAccountCredentials.fromStream`). NOTE: S3Proxy 4.x does NOT support keyless GCS (Workload Identity/ADC) — an empty credential selects an unauthenticated (emulator-only) client, not ADC — so a static key is required against real GCS.
# -- Service-account key configuration. The full JSON key is passed to the GCS SDK as `jclouds.credential` (`ServiceAccountCredentials.fromStream`). Leave it empty for keyless auth: from S3Proxy 4.1.2 the SDK then uses application default credentials, such as GKE Workload Identity (see README "Example 4b").
serviceAccountKey:
# -- (string) Inline service-account JSON key content, stored in the chart-owned Secret and mounted as a file the initContainer merges into the backend properties (kept out of the ConfigMap). Used only when `existingSecret` is empty.
value: ""
Expand Down
Loading