Skip to content

Commit 31cd7a9

Browse files
authored
Add Credentialless Support (#997)
Signed-off-by: rasel <[email protected]>
1 parent d819a0c commit 31cd7a9

File tree

16 files changed

+55
-14
lines changed

16 files changed

+55
-14
lines changed

apis/installer/v1alpha1/ace_ace_types.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,16 @@ const (
253253
)
254254

255255
type InfraObjstore struct {
256-
Provider ObjstoreProvider `json:"provider"`
257-
Bucket string `json:"bucket"`
258-
Prefix string `json:"prefix,omitempty"`
259-
Endpoint string `json:"endpoint,omitempty"`
260-
Region string `json:"region,omitempty"`
261-
MountPath string `json:"mountPath"`
262-
S3 *wizardsapi.S3Auth `json:"s3,omitempty"`
263-
Azure *wizardsapi.AzureAuth `json:"azure,omitempty"`
264-
GCS *wizardsapi.GCSAuth `json:"gcs,omitempty"`
256+
EnableCredLess bool `json:"enableCredLess,omitempty"`
257+
Provider ObjstoreProvider `json:"provider"`
258+
Bucket string `json:"bucket"`
259+
Prefix string `json:"prefix,omitempty"`
260+
Endpoint string `json:"endpoint,omitempty"`
261+
Region string `json:"region,omitempty"`
262+
MountPath string `json:"mountPath"`
263+
S3 *wizardsapi.S3Auth `json:"s3,omitempty"`
264+
Azure *wizardsapi.AzureAuth `json:"azure,omitempty"`
265+
GCS *wizardsapi.GCSAuth `json:"gcs,omitempty"`
265266
}
266267

267268
type InfraKms struct {

apis/installer/v1alpha1/ace_options_types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ export AZURE_STORAGE_KEY=%s`, cs.Objstore.Auth.Azure.AzureAccountName, cs.Objsto
277277
}
278278

279279
type AceOptionsInfraObjstore struct {
280-
Bucket string `json:"bucket"`
281-
Prefix string `json:"prefix,omitempty"`
280+
EnableCredLess bool `json:"enableCredLess"`
281+
Bucket string `json:"bucket"`
282+
Prefix string `json:"prefix,omitempty"`
282283
// Required for s3 type buckets other than AWS s3 buckets
283284
Endpoint string `json:"endpoint,omitempty"`
284285
// Required for s3 buckets

apis/installer/v1alpha1/ace_shared_types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ type ObjectReference struct {
8989
}
9090

9191
type ProviderMount struct {
92-
Provider string `json:"provider"`
93-
MountPath string `json:"mountPath"`
92+
Provider string `json:"provider"`
93+
MountPath string `json:"mountPath"`
94+
EnableCredLess bool `json:"enableCredLess,omitempty"`
9495
}
9596

9697
type VolumeMount struct {

charts/accounts-ui/values.openapiv3_schema.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ properties:
495495
type: object
496496
objstore:
497497
properties:
498+
enableCredLess:
499+
type: boolean
498500
mountPath:
499501
type: string
500502
provider:

charts/ace-installer/values.openapiv3_schema.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ properties:
290290
type: object
291291
bucket:
292292
type: string
293+
enableCredLess:
294+
type: boolean
293295
endpoint:
294296
type: string
295297
prefix:
@@ -299,6 +301,7 @@ properties:
299301
required:
300302
- auth
301303
- bucket
304+
- enableCredLess
302305
type: object
303306
type: object
304307
proxyServiceDomain:
@@ -439,6 +442,8 @@ properties:
439442
type: object
440443
bucket:
441444
type: string
445+
enableCredLess:
446+
type: boolean
442447
endpoint:
443448
type: string
444449
prefix:
@@ -448,6 +453,7 @@ properties:
448453
required:
449454
- auth
450455
- bucket
456+
- enableCredLess
451457
type: object
452458
provider:
453459
enum:

charts/ace/templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ Returns the ServiceMonitor labels
148148
{{- end }}
149149

150150
{{- define "settings.objstoreSecretName" -}}
151+
{{- if not (.Values.global.infra.objstore.enableCredLess) }}
151152
{{- printf "%s-objstore-cred" (include "ace.fullname" .) -}}
152153
{{- end }}
154+
{{- end }}
153155

154156
{{- define "settings.natsSecretName" -}}
155157
{{- printf "%s-nats-cred" (include "ace.fullname" .) -}}

charts/ace/templates/platform/objstore-cred.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ $objstore := .Values.global.infra.objstore }}
22

3-
{{- if $objstore.provider }}
3+
{{- if and (include "settings.objstoreSecretName" .) ($objstore.provider) }}
44

55
apiVersion: v1
66
kind: Secret

charts/ace/values.openapiv3_schema.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,8 @@ properties:
14911491
type: object
14921492
bucket:
14931493
type: string
1494+
enableCredLess:
1495+
type: boolean
14941496
endpoint:
14951497
type: string
14961498
gcs:
@@ -2235,6 +2237,8 @@ properties:
22352237
type: object
22362238
objstore:
22372239
properties:
2240+
enableCredLess:
2241+
type: boolean
22382242
mountPath:
22392243
type: string
22402244
provider:
@@ -16130,6 +16134,8 @@ properties:
1613016134
type: object
1613116135
objstore:
1613216136
properties:
16137+
enableCredLess:
16138+
type: boolean
1613316139
mountPath:
1613416140
type: string
1613516141
provider:
@@ -19643,6 +19649,8 @@ properties:
1964319649
type: object
1964419650
objstore:
1964519651
properties:
19652+
enableCredLess:
19653+
type: boolean
1964619654
mountPath:
1964719655
type: string
1964819656
provider:

charts/billing/values.openapiv3_schema.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ properties:
485485
type: object
486486
objstore:
487487
properties:
488+
enableCredLess:
489+
type: boolean
488490
mountPath:
489491
type: string
490492
provider:

charts/grafana/values.openapiv3_schema.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ properties:
495495
type: object
496496
objstore:
497497
properties:
498+
enableCredLess:
499+
type: boolean
498500
mountPath:
499501
type: string
500502
provider:

0 commit comments

Comments
 (0)