Skip to content

Commit 6b3fc85

Browse files
committed
Nest auth related values
1 parent 026b7bd commit 6b3fc85

File tree

7 files changed

+48
-43
lines changed

7 files changed

+48
-43
lines changed

charts/s3proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.0.3
18+
version: 0.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/s3proxy/README.md.gotmpl

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ The following section lists the configurable parameters of the {{ template "char
5353
```yaml
5454
# values-filesystem.yaml
5555
config:
56-
authorization: "aws-v4"
57-
identity: "myaccesskey"
58-
credential: "mysecretkey"
56+
auth:
57+
type: "aws-v4"
58+
identity: "myaccesskey"
59+
secret: "mysecretkey"
5960
backend:
6061
provider: "filesystem-nio2"
6162
filesystem:
@@ -76,9 +77,10 @@ helm install s3proxy-fs ./{{ template "chart.name" . }} -f values-filesystem.yam
7677
```yaml
7778
# values-aws-s3.yaml
7879
config:
79-
authorization: "aws-v4"
80-
identity: "proxy-access-key" # For clients connecting to s3proxy
81-
credential: "proxy-secret-key"
80+
auth:
81+
type: "aws-v4"
82+
identity: "proxy-access-key" # For clients connecting to s3proxy
83+
secret: "proxy-secret-key"
8284
backend:
8385
provider: "aws-s3"
8486
awsS3:
@@ -100,9 +102,10 @@ helm install s3proxy-s3 ./{{ template "chart.name" . }} -f values-aws-s3.yaml
100102
```yaml
101103
# values-azure.yaml
102104
config:
103-
authorization: "aws-v4"
104-
identity: "myaccesskey"
105-
credential: "mysecretkey"
105+
auth:
106+
type: "aws-v4"
107+
identity: "myaccesskey"
108+
secret: "mysecretkey"
106109
backend:
107110
provider: "azureblob"
108111
azureblob:
@@ -123,9 +126,10 @@ helm install s3proxy-azure ./{{ template "chart.name" . }} -f values-azure.yaml
123126
```yaml
124127
# values-gcs.yaml
125128
config:
126-
authorization: "aws-v4"
127-
identity: "myaccesskey"
128-
credential: "mysecretkey"
129+
auth:
130+
type: "aws-v4"
131+
identity: "myaccesskey"
132+
secret: "mysecretkey"
129133
backend:
130134
provider: "google-cloud-storage"
131135
googleCloudStorage:
@@ -145,7 +149,8 @@ persistence:
145149
```yaml
146150
# values-anonymous.yaml
147151
config:
148-
authorization: "none"
152+
auth:
153+
type: "none"
149154
backend:
150155
provider: "transient-nio2" # In-memory storage
151156
@@ -263,7 +268,7 @@ This will remove all resources created by the chart. If using persistence, the P
263268

264269
### Common Issues
265270

266-
1. **Authentication failures**: Ensure `config.identity` and `config.credential` are set correctly for client authentication.
271+
1. **Authentication failures**: Ensure `config.auth.identity` and `config.auth.secret` are set correctly for client authentication.
267272

268273
2. **Backend connection issues**: Verify backend credentials are correctly configured in the appropriate section (e.g., `config.backend.awsS3.*`).
269274

charts/s3proxy/override-values.example.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
# S3Proxy configuration
55
config:
6-
# Authentication type for clients connecting to S3Proxy
7-
# Options: none, aws-v2, aws-v4, aws-v2-or-v4
8-
authorization: "aws-v4"
9-
10-
# Credentials for clients to authenticate to S3Proxy
11-
# These should be changed to secure values
12-
identity: "admin"
13-
credential: "changeme123"
6+
auth:
7+
# Authentication type for clients connecting to S3Proxy
8+
# Options: none, aws-v2, aws-v4, aws-v2-or-v4
9+
type: "aws-v4"
10+
# Credentials for clients to authenticate to S3Proxy
11+
# These should be changed to secure values
12+
identity: "admin"
13+
secret: "changeme123"
1414

1515
# Enable CORS for web applications
1616
cors:

charts/s3proxy/templates/NOTES.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
2. S3Proxy Configuration:
2525
- Backend Provider: {{ .Values.config.backend.provider }}
26-
- Authorization: {{ .Values.config.authorization }}
26+
- Authorization: {{ .Values.config.auth.type }}
2727
{{- if .Values.config.cors.enabled }}
2828
- CORS: Enabled
2929
{{- end }}
@@ -34,13 +34,13 @@
3434
3. Testing S3Proxy:
3535
Once the service is available, you can test it using AWS CLI or curl:
3636

37-
{{- if eq .Values.config.authorization "none" }}
37+
{{- if eq .Values.config.auth.type "none" }}
3838
# Anonymous access (no authentication required)
3939
curl -X GET http://<SERVICE_URL>/
4040
{{- else }}
4141
# Set up AWS CLI credentials (if authentication is enabled)
4242
export AWS_ACCESS_KEY_ID=<your-s3proxy-identity>
43-
export AWS_SECRET_ACCESS_KEY=<your-s3proxy-credential>
43+
export AWS_SECRET_ACCESS_KEY=<your-s3proxy-secret>
4444

4545
# List buckets
4646
aws --endpoint-url http://<SERVICE_URL> s3 ls
@@ -53,7 +53,7 @@
5353

5454

5555
# You can also use other AWS S3 API compatible clients like MinIO's mc.
56-
mc alias set s3proxy http://<SERVICE_URL> <your-s3proxy-identity> <your-s3proxy-credential>
56+
mc alias set s3proxy http://<SERVICE_URL> <your-s3proxy-identity> <your-s3proxy-secret>
5757

5858
# List buckets
5959
mc ls s3proxy
@@ -73,8 +73,8 @@
7373
{{- if or (eq .Values.config.backend.provider "filesystem") (eq .Values.config.backend.provider "filesystem-nio2") }}
7474
- Using filesystem backend at: {{ .Values.config.backend.filesystem.basedir }}
7575
{{- end }}
76-
{{- if not .Values.config.identity }}
77-
- WARNING: S3Proxy identity not configured. Remember to set s3proxy.identity and s3proxy.credential for authentication.
76+
{{- if not .Values.config.auth.identity }}
77+
- WARNING: S3Proxy identity not configured. Remember to set config.auth.identity and config.auth.secret for authentication.
7878
{{- end }}
7979
{{- if and (ne .Values.config.backend.provider "filesystem") (ne .Values.config.backend.provider "filesystem-nio2") (ne .Values.config.backend.provider "transient") (ne .Values.config.backend.provider "transient-nio2") }}
8080
- Make sure to configure backend credentials for {{ .Values.config.backend.provider }}

charts/s3proxy/templates/configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ data:
88
s3proxy.properties: |
99
# S3Proxy configuration
1010
s3proxy.endpoint=http://0.0.0.0:{{ .Values.service.targetPort }}
11-
s3proxy.authorization={{ .Values.config.authorization }}
11+
s3proxy.authorization={{ .Values.config.auth.type }}
1212
{{- if .Values.config.virtualHost }}
1313
s3proxy.virtual-host={{ .Values.config.virtualHost }}
1414
{{- end }}
1515

16-
{{- if ne .Values.config.authorization "none" }}
16+
{{- if ne .Values.config.auth.type "none" }}
1717
# These will be overridden by environment variables from the secret
1818
s3proxy.identity=${S3PROXY_IDENTITY}
1919
s3proxy.credential=${S3PROXY_CREDENTIAL}

charts/s3proxy/templates/secret.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ metadata:
66
{{- include "s3proxy.labels" . | nindent 4 }}
77
type: Opaque
88
data:
9-
{{- if and .Values.config.identity .Values.config.credential }}
9+
{{- if and .Values.config.auth.identity .Values.config.auth.secret }}
1010
# S3Proxy authentication credentials (for clients connecting to s3proxy)
1111
# Using uppercase names to match environment variable conventions
12-
S3PROXY_IDENTITY: {{ .Values.config.identity | b64enc | quote }}
13-
S3PROXY_CREDENTIAL: {{ .Values.config.credential | b64enc | quote }}
12+
S3PROXY_IDENTITY: {{ .Values.config.auth.identity | b64enc | quote }}
13+
S3PROXY_CREDENTIAL: {{ .Values.config.auth.secret | b64enc | quote }}
1414
{{- end }}
1515

1616
{{- if or (eq .Values.config.backend.provider "aws-s3") (eq .Values.config.backend.provider "s3") }}

charts/s3proxy/values.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ service:
4141
# -- Kubernetes service type
4242
type: ClusterIP
4343
# -- Service port
44-
port: 8080
44+
port: 9000
4545
# -- Target port (controls both the container port and S3Proxy bind port)
46-
targetPort: 8080
46+
targetPort: 9000
4747
# -- Service annotations
4848
annotations: {}
4949

@@ -102,13 +102,13 @@ tolerations: []
102102
affinity: {}
103103

104104
config:
105-
# -- Authorization type (none, aws-v2, aws-v4, aws-v2-or-v4)
106-
authorization: "aws-v4"
107-
108-
# -- S3 Access Key ID for client authentication
109-
identity: ""
110-
# -- S3 Secret Access Key for client authentication
111-
credential: ""
105+
auth:
106+
# -- Authorization type (none, aws-v2, aws-v4, aws-v2-or-v4)
107+
type: "aws-v4"
108+
# -- S3 Access Key ID for client authentication
109+
identity: ""
110+
# -- S3 Secret Access Key for client authentication
111+
secret: ""
112112

113113
# -- Virtual Host configuration
114114
virtualHost: ""

0 commit comments

Comments
 (0)