1- apiVersion : v1
2- kind : ConfigMap
3- metadata :
4- name : {{ include "s3proxy.fullname" . }}
5- labels :
6- {{- include "s3proxy.labels" . | nindent 4 }}
7- data :
8- s3proxy.properties : |
1+ {{- define "s3proxy.main.config" -}}
92 # S3Proxy configuration
103 s3proxy.endpoint=http://0.0.0.0:{{ .Values.service.targetPort }}
114 s3proxy.authorization={{ .Values.config.auth.type }}
147{{- end }}
158
169{{- if ne .Values.config.auth.type "none" }}
17- # These will be overridden by environment variables from the secret
18- s3proxy.identity=${S3PROXY_IDENTITY}
19- s3proxy.credential=${S3PROXY_CREDENTIAL}
10+ # Authentication credentials will be merged from the secret properties file
11+ # s3proxy.identity and s3proxy.credential will be provided by the secret
2012{{- end }}
2113
2214{{- if .Values.config.cors.enabled }}
@@ -68,57 +60,122 @@ data:
6860 # Large object mocking middleware
6961 s3proxy.large-object-mocking=true
7062{{- end }}
63+ {{- end }}
64+
65+ apiVersion : v1
66+ kind : ConfigMap
67+ metadata :
68+ name : {{ include "s3proxy.fullname" . }}
69+ labels :
70+ {{- include "s3proxy.labels" . | nindent 4 }}
71+ data :
72+ {{- if .Values.config.backends.filesystem.enabled }}
73+ backend-filesystem.properties : |
74+ {{- include "s3proxy.main.config" . | nindent 4 }}
75+
76+ # Filesystem backend configuration
77+ {{- if .Values.config.backends.filesystem.nio2 }}
78+ jclouds.provider=filesystem-nio2
79+ {{- else }}
80+ jclouds.provider=filesystem
81+ {{- end }}
82+ jclouds.filesystem.basedir={{ .Values.config.backends.filesystem.basedir }}
83+ {{- end }}
7184
72- # JClouds backend configuration
73- jclouds.provider={{ .Values.config.backend.provider }}
85+ {{- if .Values.config.backends.transient.enabled }}
86+ backend-transient.properties : |
87+ {{- include "s3proxy.main.config" . | nindent 4 }}
7488
75- {{- if or (eq .Values.config.backend.provider "filesystem") (eq .Values.config.backend.provider "filesystem-nio2") }}
76- # Filesystem backend
77- jclouds.filesystem.basedir={{ .Values.config.backend.filesystem.basedir }}
78- {{- else if or (eq .Values.config.backend.provider "aws-s3") (eq .Values.config.backend.provider "s3") }}
79- # AWS S3 backend
80- {{- if .Values.config.backend.awsS3.region }}
81- jclouds.region={{ .Values.config.backend.awsS3.region }}
89+ # Transient backend configuration
90+ {{- if .Values.config.backends.transient.nio2 }}
91+ jclouds.provider=transient-nio2
92+ {{- else }}
93+ jclouds.provider=transient
8294 {{- end }}
83- {{- if .Values.config.backend.awsS3.endpoint }}
84- jclouds.endpoint={{ .Values.config.backend.awsS3.endpoint }}
95+ {{- end }}
96+
97+ {{- if .Values.config.backends.s3.enabled }}
98+ backend-s3.properties : |
99+ {{- include "s3proxy.main.config" . | nindent 4 }}
100+
101+ # S3 backend configuration
102+ {{- if .Values.config.backends.s3.aws }}
103+ jclouds.provider=aws-s3
104+ {{- else }}
105+ jclouds.provider=s3
85106 {{- end }}
86- # Credentials will be set via environment variables
87- jclouds.identity=${JCLOUDS_IDENTITY}
88- jclouds.credential=${JCLOUDS_CREDENTIAL}
89- {{- else if or (eq .Values.config.backend.provider "azureblob") (eq .Values.config.backend.provider "azureblob-sdk") }}
90- # Azure Blob backend
91- {{- if .Values.config.backend.azureblob.endpoint }}
92- jclouds.azureblob.endpoint={{ .Values.config.backend.azureblob.endpoint }}
107+ {{- if .Values.config.backends.s3.region }}
108+ jclouds.region={{ .Values.config.backends.s3.region }}
93109 {{- end }}
94- # Credentials will be set via environment variables
95- jclouds.identity=${JCLOUDS_IDENTITY}
96- jclouds.credential=${JCLOUDS_CREDENTIAL}
97- {{- if .Values.config.backend.azureblob.sasToken }}
98- jclouds.azureblob.sas=${JCLOUDS_AZURE_SAS}
110+ {{- if .Values.config.backends.s3.endpoint }}
111+ jclouds.endpoint={{ .Values.config.backends.s3.endpoint }}
99112 {{- end }}
100- {{- else if eq .Values.config.backend.provider "google-cloud-storage" }}
101- # Google Cloud Storage backend
102- {{- if .Values.config.backend.googleCloudStorage.projectId }}
103- jclouds.project-id={{ .Values.config.backend.googleCloudStorage.projectId }}
113+ # Credentials will be merged from the secret properties file
114+ # jclouds.identity and jclouds.credential will be provided by the secret
115+ {{- end }}
116+
117+ {{- if .Values.config.backends.azureblob.enabled }}
118+ backend-azureblob.properties : |
119+ {{- include "s3proxy.main.config" . | nindent 4 }}
120+
121+ # Azure Blob backend configuration
122+ jclouds.provider={{ .Values.config.backends.azureblob.provider }}
123+ {{- if .Values.config.backends.azureblob.endpoint }}
124+ jclouds.azureblob.endpoint={{ .Values.config.backends.azureblob.endpoint }}
104125 {{- end }}
105- # Credentials will be set via environment variables
106- jclouds.identity=${JCLOUDS_IDENTITY}
107- jclouds.credential=${JCLOUDS_CREDENTIAL }
108- {{- else if eq .Values.config.backend.provider "b2" }}
109- # Backblaze B2 backend
110- # Credentials will be set via environment variables
111- jclouds.identity=${JCLOUDS_IDENTITY }
112- jclouds.credential=${JCLOUDS_CREDENTIAL}
113- {{- else if eq .Values.config.backend.provider "openstack-swift" }}
114- # OpenStack Swift backend
115- {{- if .Values.config.backend.swift.authUrl }}
116- jclouds.keystone.auth-url ={{ .Values.config.backend.swift.authUrl }}
126+ # Credentials will be merged from the secret properties file
127+ # jclouds.identity, jclouds.credential, and jclouds.azureblob.sas will be provided by the secret
128+ {{- end } }
129+
130+ {{- if .Values.config.backends.googleCloudStorage.enabled }}
131+ backend-google-cloud-storage.properties : |
132+ {{- include "s3proxy.main.config" . | nindent 4 } }
133+
134+ # Google Cloud Storage backend configuration
135+ jclouds.provider=google-cloud-storage
136+ {{- if .Values.config.backends.googleCloudStorage.projectId }}
137+ jclouds.project-id ={{ .Values.config.backends.googleCloudStorage.projectId }}
117138 {{- end }}
118- {{- if .Values.config.backend.swift.region }}
119- jclouds.region={{ .Values.config.backend.swift.region }}
139+ # Credentials will be merged from the secret properties file
140+ # jclouds.identity and jclouds.credential will be provided by the secret
141+ {{- end }}
142+
143+ {{- if .Values.config.backends.b2.enabled }}
144+ backend-b2.properties : |
145+ {{- include "s3proxy.main.config" . | nindent 4 }}
146+
147+ # Backblaze B2 backend configuration
148+ jclouds.provider=b2
149+ # Credentials will be merged from the secret properties file
150+ # jclouds.identity and jclouds.credential will be provided by the secret
151+ {{- end }}
152+
153+ {{- if .Values.config.backends.openstackSwift.enabled }}
154+ backend-openstack-swift.properties : |
155+ {{- include "s3proxy.main.config" . | nindent 4 }}
156+
157+ # OpenStack Swift backend configuration
158+ jclouds.provider=openstack-swift
159+ {{- if .Values.config.backends.openstackSwift.authUrl }}
160+ jclouds.keystone.auth-url={{ .Values.config.backends.openstackSwift.authUrl }}
120161 {{- end }}
121- # Credentials will be set via environment variables
122- jclouds.identity=${JCLOUDS_IDENTITY}
123- jclouds.credential=${JCLOUDS_CREDENTIAL}
162+ {{- if .Values.config.backends.openstackSwift.region }}
163+ jclouds.region={{ .Values.config.backends.openstackSwift.region }}
164+ {{- end }}
165+ # Credentials will be merged from the secret properties file
166+ # jclouds.identity and jclouds.credential will be provided by the secret
124167{{- end }}
168+
169+ {{- if .Values.config.backends.rackspaceCloudfiles.enabled }}
170+ backend-rackspace-cloudfiles.properties : |
171+ {{- include "s3proxy.main.config" . | nindent 4 }}
172+
173+ # Rackspace Cloud Files backend configuration
174+ {{- if eq .Values.config.backends.rackspaceCloudfiles.region "uk" }}
175+ jclouds.provider=rackspace-cloudfiles-uk
176+ {{- else }}
177+ jclouds.provider=rackspace-cloudfiles-us
178+ {{- end }}
179+ # Credentials will be merged from the secret properties file
180+ # jclouds.identity and jclouds.credential will be provided by the secret
181+ {{- end }}
0 commit comments