Skip to content

Commit 22e47e6

Browse files
committed
feat: added configuration support for S3_SHARDED storage type
1 parent b828415 commit 22e47e6

4 files changed

Lines changed: 92 additions & 2 deletions

File tree

charts/testops/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Entries are ordered by priority:
1010
4. `[BUGFIX]` Fixes for defects
1111
5. `[DOCS]` Update of the documentation in `values.yaml`
1212

13+
## 5.27.0
14+
15+
- [FEATURE] Added configuration support for `S3_SHARDED` storage type, allowing users to configure multiple S3 storages and map them to specific projects.
16+
1317
## 5.26.2
1418

1519
- [BUGFIX] Fixed scientific notation in the application's thread pool configuration.

charts/testops/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: testops
3-
version: 5.26.2
3+
version: 5.27.0
44
appVersion: 26.1.1
55
kubeVersion: '>= 1.20.0-0'
66

charts/testops/templates/_helpers.tpl

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,65 @@
619619
value: {{ .Values.storage.s3.serverSideEncryption.keyId | quote }}
620620
{{- end }}
621621
{{- end }}
622+
623+
{{- if eq .Values.storage.type "S3_SHARDED" }}
624+
{{- range $index, $storage := .Values.storage.s3.additionalStorages }}
625+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_NAME
626+
value: {{ $storage.name | quote }}
627+
{{- if $storage.endpoint }}
628+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_ENDPOINT
629+
value: {{ $storage.endpoint | quote }}
630+
{{- end }}
631+
{{- if $storage.bucket }}
632+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_BUCKET
633+
value: {{ $storage.bucket | quote }}
634+
{{- end }}
635+
{{- if $storage.region }}
636+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_REGION
637+
value: {{ $storage.region | quote }}
638+
{{- end }}
639+
{{- if $storage.accessKey }}
640+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_ACCESSKEY
641+
value: {{ $storage.accessKey | quote }}
642+
{{- end }}
643+
{{- if $storage.secretKey }}
644+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_SECRETKEY
645+
value: {{ $storage.secretKey | quote }}
646+
{{- end }}
647+
{{- if and $storage.serverSideEncryption $storage.serverSideEncryption.enabled }}
648+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_SERVERSIDEENCRYPTION
649+
value: {{ $storage.serverSideEncryption.type | quote }}
650+
{{- if $storage.serverSideEncryption.keyId }}
651+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_KMSKEYID
652+
value: {{ $storage.serverSideEncryption.keyId | quote }}
653+
{{- end }}
654+
{{- end }}
655+
{{- end }}
656+
{{- range $projectId, $config := .Values.storage.s3.projects }}
657+
{{- if $config.storage }}
658+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_PROJECTS_{{ $projectId }}_STORAGE
659+
value: {{ $config.storage | quote }}
660+
{{- end }}
661+
{{- if $config.bucket }}
662+
- name: ALLURE_BLOBSTORAGE_S3SHARDED_PROJECTS_{{ $projectId }}_BUCKET
663+
value: {{ $config.bucket | quote }}
622664
{{- end }}
665+
{{- end }}
666+
{{- end }}
667+
{{- end }}
668+
669+
{{/*
670+
671+
672+
673+
private ServerSideEncryption serverSideEncryption;
674+
private String kmsKeyId;
675+
676+
private boolean pathStyleAccess;
677+
private boolean chunkedEncoding;
678+
679+
private Duration connectionTimeout = Duration.ofMinutes(1);
680+
private Duration connectionMaxIdleTime = Duration.ofMinutes(2);*/}}
623681

624682
{{- define "renderFSEnvs" }}
625683
- name: ALLURE_BLOBSTORAGE_TYPE

charts/testops/values.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ smtp:
366366
# 2) S3_ASYNC - recommended for AWS S3, this option supports parameters described in .Values.storage.s3.advancedS3SDK
367367
# S3_ASYNC allows usage of optimised commands towards S3 solution (e.g. delete objects). Consult your solution
368368
# documentation before using this option
369-
# 3) CSI
369+
# 3) S3_SHARDED - allows configuring multiple S3 storages
370+
# and mapping them to specific projects via .Values.storage.s3.storages and .Values.storage.s3.projects
371+
# 4) CSI
370372
# For CSI refer to https://kubernetes-csi.github.io/docs/drivers.html
371373
# S3 is preferable. The best option is using SaaS S3 AWS or other S3 comparable services.
372374
# It's highly recommended disabling versioning for S3 from the very start
@@ -377,6 +379,7 @@ storage:
377379
# Options are:
378380
# - S3
379381
# - S3_ASYNC
382+
# - S3_SHARDED
380383
# - CSI
381384
type: "S3"
382385
s3:
@@ -423,6 +426,31 @@ storage:
423426
# The ARN format is: arn:aws:kms:<region>:<account-id>:key/<key-id>
424427
# Ref: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#aws-managed-customer-managed-keys
425428
keyId:
429+
## @param storage.s3.additionalStorages defines an array of additional S3 storages for S3_SHARDED mode.
430+
## Each storage requires a unique 'name' and can override default S3 parameters like endpoint, bucket, region, accessKey, secretKey, and serverSideEncryption.
431+
## e.g:
432+
## additionalStorages:
433+
## - name: "eu-storage"
434+
## endpoint: "https://s3.eu-central-1.amazonaws.com"
435+
## bucket: "allure-eu-bucket"
436+
## region: "eu-central-1"
437+
## serverSideEncryption:
438+
## enabled: true
439+
## type: "AWS_KMS"
440+
## keyId: "arn:aws:kms:eu-central-1:123456789012:key/12345678-1234-1234-1234-123456789012"
441+
##
442+
additionalStorages: []
443+
## @param storage.s3.projects defines a map of project-specific S3 configurations for S3_SHARDED mode.
444+
## The key is the project ID. You can specify a custom 'bucket' and/or a 'storage' name (referencing an entry from additional-storages).
445+
## If a property is not set, the default S3 configuration will be used.
446+
## e.g:
447+
## projects:
448+
## 12:
449+
## storage: "eu-storage"
450+
## 45:
451+
## bucket: "custom-us-bucket"
452+
##
453+
projects: []
426454
csi:
427455
storageClass: ""
428456
existingVolumeName: ""

0 commit comments

Comments
 (0)