Skip to content

Commit 3556147

Browse files
committed
Make other backend configs consistent with gcs
1 parent 6f629a6 commit 3556147

File tree

4 files changed

+121
-59
lines changed

4 files changed

+121
-59
lines changed

charts/s3proxy/override-values.example.yaml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,55 +67,76 @@ config:
6767
region: "us-west-2"
6868
# endpoint: "https://s3.amazonaws.com" # Optional custom endpoint (e.g., MinIO, Ceph)
6969
accessKeyID: "AKIAIOSFODNN7EXAMPLE"
70-
secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
70+
secretAccessKey:
71+
value: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
72+
# existingSecret: "my-s3-secret"
73+
# secretKey: "secretAccessKey"
7174

7275
# Azure Blob Storage backend
7376
azureblob:
7477
enabled: false # Set to true to use Azure Blob backend
7578
provider: "azureblob" # Can be "azureblob" or "azureblob-sdk"
7679
account: "mystorageaccount"
77-
key: "base64encodedkey=="
80+
key:
81+
value: "base64encodedkey=="
82+
# existingSecret: "my-azure-secret"
83+
# secretKey: "accountKey"
7884
# endpoint: "https://mystorageaccount.blob.core.windows.net" # Optional
79-
# sasToken: "" # Optional SAS token
85+
sasToken:
86+
value: "" # Optional SAS token
87+
# existingSecret: "my-azure-sas-secret"
88+
# secretKey: "sasToken"
8089

8190
# Google Cloud Storage backend
8291
googleCloudStorage:
8392
enabled: false # Set to true to use GCS backend
8493
projectID: "my-project"
8594

86-
# Service account email or user email (required for GCS authentication)
95+
# Service account email or user email
8796
clientEmail: "[email protected]"
8897

8998
# Private key configuration
9099
privateKey:
100+
# Option 1: Provide private key directly
91101
# value: |-
92-
# "-----BEGIN RSA PRIVATE KEY-----..."
102+
# -----BEGIN RSA PRIVATE KEY-----
103+
# ...
104+
# -----END RSA PRIVATE KEY-----
93105

94-
# Option 2: Reference an existing secret containing the private key (recommended)
106+
# Option 2: Reference an existing secret containing the private key
95107
# existingSecret: "my-gcs-privatekey-secret"
96-
# secretKey: "gcs-private.key" # Key in the secret containing the private key.
108+
# secretKey: "privateKey"
97109

98110
# Backblaze B2 backend
99111
b2:
100112
enabled: false # Set to true to use B2 backend
101113
account: "account-id"
102-
applicationKey: "application-key"
114+
applicationKey:
115+
value: "application-key"
116+
# existingSecret: "my-b2-secret"
117+
# secretKey: "applicationKey"
103118

104119
# OpenStack Swift backend
105120
openstackSwift:
106121
enabled: false # Set to true to use Swift backend
107122
authURL: "https://auth.cloud.com/v2.0"
108123
tenantName: "my-tenant"
109124
userName: "my-user"
110-
password: "my-password"
125+
password:
126+
value: "my-password"
127+
# existingSecret: "my-swift-secret"
128+
# secretKey: "password"
111129
region: "RegionOne"
112130

113131
# Rackspace Cloud Files backend
114132
rackspaceCloudfiles:
115133
enabled: false # Set to true to use Rackspace Cloud Files backend
116134
region: "us" # Region: "us" or "uk"
117135
userName: "my-user"
118-
apiKey: "my-api-key"
136+
apiKey:
137+
value: "my-api-key"
138+
# existingSecret: "my-rackspace-secret"
139+
# secretKey: "apiKey"
119140

120141
# Persistence settings for filesystem backend
121142
persistence:

charts/s3proxy/templates/configmap.yaml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,12 @@ data:
109109
{{- if .Values.config.backends.s3.endpoint }}
110110
jclouds.endpoint={{ .Values.config.backends.s3.endpoint }}
111111
{{- end }}
112-
# Credentials will be merged from the secret properties file
113-
# jclouds.identity and jclouds.credential will be provided by the secret
112+
{{- if .Values.config.backends.s3.accessKeyID }}
113+
jclouds.identity={{ .Values.config.backends.s3.accessKeyID }}
114+
{{- end }}
115+
{{- if .Values.config.backends.s3.secretAccessKey.value }}
116+
# Credential will be merged from the secret properties file
117+
{{- end }}
114118
{{- end }}
115119

116120
{{- if .Values.config.backends.azureblob.enabled }}
@@ -122,8 +126,12 @@ data:
122126
{{- if .Values.config.backends.azureblob.endpoint }}
123127
jclouds.azureblob.endpoint={{ .Values.config.backends.azureblob.endpoint }}
124128
{{- end }}
129+
{{- if .Values.config.backends.azureblob.account }}
130+
jclouds.identity={{ .Values.config.backends.azureblob.account }}
131+
{{- end }}
132+
{{- if or .Values.config.backends.azureblob.key.value .Values.config.backends.azureblob.sasToken.value }}
125133
# Credentials will be merged from the secret properties file
126-
# jclouds.identity, jclouds.credential, and jclouds.azureblob.sas will be provided by the secret
134+
{{- end }}
127135
{{- end }}
128136

129137
{{- if .Values.config.backends.googleCloudStorage.enabled }}
@@ -153,8 +161,12 @@ data:
153161

154162
# Backblaze B2 backend configuration
155163
jclouds.provider=b2
156-
# Credentials will be merged from the secret properties file
157-
# jclouds.identity and jclouds.credential will be provided by the secret
164+
{{- if .Values.config.backends.b2.account }}
165+
jclouds.identity={{ .Values.config.backends.b2.account }}
166+
{{- end }}
167+
{{- if .Values.config.backends.b2.applicationKey.value }}
168+
# Credential will be merged from the secret properties file
169+
{{- end }}
158170
{{- end }}
159171

160172
{{- if .Values.config.backends.openstackSwift.enabled }}
@@ -169,8 +181,12 @@ data:
169181
{{- if .Values.config.backends.openstackSwift.region }}
170182
jclouds.region={{ .Values.config.backends.openstackSwift.region }}
171183
{{- end }}
172-
# Credentials will be merged from the secret properties file
173-
# jclouds.identity and jclouds.credential will be provided by the secret
184+
{{- if and .Values.config.backends.openstackSwift.tenantName .Values.config.backends.openstackSwift.userName }}
185+
jclouds.identity={{ printf "%s:%s" .Values.config.backends.openstackSwift.tenantName .Values.config.backends.openstackSwift.userName }}
186+
{{- end }}
187+
{{- if .Values.config.backends.openstackSwift.password.value }}
188+
# Credential will be merged from the secret properties file
189+
{{- end }}
174190
{{- end }}
175191

176192
{{- if .Values.config.backends.rackspaceCloudfiles.enabled }}
@@ -183,6 +199,10 @@ data:
183199
{{- else }}
184200
jclouds.provider=rackspace-cloudfiles-us
185201
{{- end }}
186-
# Credentials will be merged from the secret properties file
187-
# jclouds.identity and jclouds.credential will be provided by the secret
202+
{{- if .Values.config.backends.rackspaceCloudfiles.userName }}
203+
jclouds.identity={{ .Values.config.backends.rackspaceCloudfiles.userName }}
204+
{{- end }}
205+
{{- if .Values.config.backends.rackspaceCloudfiles.apiKey.value }}
206+
# Credential will be merged from the secret properties file
207+
{{- end }}
188208
{{- end }}

charts/s3proxy/templates/secret.yaml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,38 @@ stringData:
1616
{{- end }}
1717

1818
{{- if .Values.config.backends.s3.enabled }}
19+
{{- if .Values.config.backends.s3.secretAccessKey.value }}
1920
# S3 backend credentials
20-
{{- if .Values.config.backends.s3.accessKeyID }}
21-
jclouds.identity={{ .Values.config.backends.s3.accessKeyID }}
22-
{{- end }}
23-
{{- if .Values.config.backends.s3.secretAccessKey }}
24-
jclouds.credential={{ .Values.config.backends.s3.secretAccessKey }}
21+
jclouds.credential={{ .Values.config.backends.s3.secretAccessKey.value }}
2522
{{- end }}
2623
{{- else if .Values.config.backends.azureblob.enabled }}
24+
{{- if or .Values.config.backends.azureblob.key.value .Values.config.backends.azureblob.sasToken.value }}
2725
# Azure Blob backend credentials
28-
{{- if .Values.config.backends.azureblob.account }}
29-
jclouds.identity={{ .Values.config.backends.azureblob.account }}
3026
{{- end }}
31-
{{- if .Values.config.backends.azureblob.key }}
32-
jclouds.credential={{ .Values.config.backends.azureblob.key }}
27+
{{- if .Values.config.backends.azureblob.key.value }}
28+
jclouds.credential={{ .Values.config.backends.azureblob.key.value }}
3329
{{- end }}
34-
{{- if .Values.config.backends.azureblob.sasToken }}
35-
jclouds.azureblob.sas={{ .Values.config.backends.azureblob.sasToken }}
30+
{{- if .Values.config.backends.azureblob.sasToken.value }}
31+
jclouds.azureblob.sas={{ .Values.config.backends.azureblob.sasToken.value }}
3632
{{- end }}
3733
{{- else if .Values.config.backends.googleCloudStorage.enabled }}
3834
{{- if .Values.config.backends.googleCloudStorage.privateKey.value }}
3935
# Google Cloud Storage backend credentials (privateKey stored in secret)
4036
jclouds.credential=jclouds.credential={{ .Values.config.backends.googleCloudStorage.privateKey.value | trim | replace "\n" "\\n\\" }}
4137
{{- end }}
4238
{{- else if .Values.config.backends.b2.enabled }}
39+
{{- if .Values.config.backends.b2.applicationKey.value }}
4340
# Backblaze B2 backend credentials
44-
{{- if .Values.config.backends.b2.account }}
45-
jclouds.identity={{ .Values.config.backends.b2.account }}
46-
{{- end }}
47-
{{- if .Values.config.backends.b2.applicationKey }}
48-
jclouds.credential={{ .Values.config.backends.b2.applicationKey }}
41+
jclouds.credential={{ .Values.config.backends.b2.applicationKey.value }}
4942
{{- end }}
5043
{{- else if .Values.config.backends.openstackSwift.enabled }}
44+
{{- if .Values.config.backends.openstackSwift.password.value }}
5145
# OpenStack Swift backend credentials
52-
{{- if .Values.config.backends.openstackSwift.tenantName }}
53-
{{- if .Values.config.backends.openstackSwift.userName }}
54-
jclouds.identity={{ printf "%s:%s" .Values.config.backends.openstackSwift.tenantName .Values.config.backends.openstackSwift.userName }}
55-
{{- end }}
56-
{{- end }}
57-
{{- if .Values.config.backends.openstackSwift.password }}
58-
jclouds.credential={{ .Values.config.backends.openstackSwift.password }}
46+
jclouds.credential={{ .Values.config.backends.openstackSwift.password.value }}
5947
{{- end }}
6048
{{- else if .Values.config.backends.rackspaceCloudfiles.enabled }}
49+
{{- if .Values.config.backends.rackspaceCloudfiles.apiKey.value }}
6150
# Rackspace Cloud Files backend credentials
62-
{{- if .Values.config.backends.rackspaceCloudfiles.userName }}
63-
jclouds.identity={{ .Values.config.backends.rackspaceCloudfiles.userName }}
64-
{{- end }}
65-
{{- if .Values.config.backends.rackspaceCloudfiles.apiKey }}
66-
jclouds.credential={{ .Values.config.backends.rackspaceCloudfiles.apiKey }}
51+
jclouds.credential={{ .Values.config.backends.rackspaceCloudfiles.apiKey.value }}
6752
{{- end }}
6853
{{- end }}

charts/s3proxy/values.yaml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,14 @@ config:
183183
endpoint: ""
184184
# -- S3 Access Key ID for backend
185185
accessKeyID: ""
186-
# -- S3 Secret Access Key for backend
187-
secretAccessKey: ""
186+
# -- S3 Secret Access Key configuration
187+
secretAccessKey:
188+
# -- Secret access key value
189+
value: ""
190+
# -- Name of existing secret containing the secret access key
191+
existingSecret: ""
192+
# -- Key in the existing secret containing the secret access key
193+
secretKey: "secretAccessKey"
188194

189195
azureblob:
190196
# -- Enable Azure Blob Storage backend
@@ -193,12 +199,24 @@ config:
193199
provider: "azureblob"
194200
# -- Storage account name
195201
account: ""
196-
# -- Storage account key
197-
key: ""
202+
# -- Storage account key configuration
203+
key:
204+
# -- Storage account key value
205+
value: ""
206+
# -- Name of existing secret containing the storage account key
207+
existingSecret: ""
208+
# -- Key in the existing secret containing the storage account key
209+
secretKey: "accountKey"
198210
# -- Azure endpoint
199211
endpoint: ""
200-
# -- SAS token
201-
sasToken: ""
212+
# -- SAS token configuration
213+
sasToken:
214+
# -- SAS token value
215+
value: ""
216+
# -- Name of existing secret containing the SAS token
217+
existingSecret: ""
218+
# -- Key in the existing secret containing the SAS token
219+
secretKey: "sasToken"
202220

203221
googleCloudStorage:
204222
# -- Enable Google Cloud Storage backend
@@ -221,8 +239,14 @@ config:
221239
enabled: false
222240
# -- B2 account ID
223241
account: ""
224-
# -- B2 application key
225-
applicationKey: ""
242+
# -- B2 application key configuration
243+
applicationKey:
244+
# -- Application key value
245+
value: ""
246+
# -- Name of existing secret containing the application key
247+
existingSecret: ""
248+
# -- Key in the existing secret containing the application key
249+
secretKey: "applicationKey"
226250

227251
openstackSwift:
228252
# -- Enable OpenStack Swift backend
@@ -233,8 +257,14 @@ config:
233257
tenantName: ""
234258
# -- Username
235259
userName: ""
236-
# -- Password
237-
password: ""
260+
# -- Password configuration
261+
password:
262+
# -- Password value
263+
value: ""
264+
# -- Name of existing secret containing the password
265+
existingSecret: ""
266+
# -- Key in the existing secret containing the password
267+
secretKey: "password"
238268
# -- Region
239269
region: ""
240270

@@ -245,8 +275,14 @@ config:
245275
region: "us"
246276
# -- Username
247277
userName: ""
248-
# -- API key
249-
apiKey: ""
278+
# -- API key configuration
279+
apiKey:
280+
# -- API key value
281+
value: ""
282+
# -- Name of existing secret containing the API key
283+
existingSecret: ""
284+
# -- Key in the existing secret containing the API key
285+
secretKey: "apiKey"
250286

251287
persistence:
252288
# -- Enable persistence using PVC

0 commit comments

Comments
 (0)