|
559 | 559 |
|
560 | 560 |
|
561 | 561 | {{- define "renderS3Envs" }} |
| 562 | +{{- $s3Prefix := ternary "S3SHARDED" "S3" (eq .Values.storage.type "S3_SHARDED") }} |
562 | 563 | - name: ALLURE_BLOBSTORAGE_TYPE |
563 | 564 | value: {{ .Values.storage.type }} |
564 | 565 | - name: ALLURE_BLOBSTORAGE_MAXCONCURRENCY |
|
577 | 578 | - name: ALLURE_BLOBSTORAGE_COPYSUPPORTED |
578 | 579 | value: {{ .Values.storage.s3.advancedS3SDK.copySupported | quote}} |
579 | 580 | {{- end }} |
580 | | - - name: ALLURE_BLOBSTORAGE_S3_ENDPOINT |
| 581 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_ENDPOINT |
581 | 582 | {{- if .Values.minio.enabled }} |
582 | 583 | value: http://{{ template "testops.minio.fullname" . }}:{{ .Values.minio.service.ports.api }} |
583 | | - - name: ALLURE_BLOBSTORAGE_S3_PATHSTYLEACCESS |
| 584 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_PATHSTYLEACCESS |
584 | 585 | value: "true" |
585 | 586 | {{- else }} |
586 | 587 | value: {{ .Values.storage.s3.endpoint }} |
587 | | - - name: ALLURE_BLOBSTORAGE_S3_PATHSTYLEACCESS |
| 588 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_PATHSTYLEACCESS |
588 | 589 | value: "{{ .Values.storage.s3.pathstyle }}" |
589 | 590 | {{- end }} |
590 | | - - name: ALLURE_BLOBSTORAGE_S3_BUCKET |
| 591 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_BUCKET |
591 | 592 | {{- if .Values.minio.enabled }} |
592 | 593 | value: {{ .Values.minio.defaultBuckets }} |
593 | 594 | {{- else }} |
594 | 595 | value: {{ .Values.storage.s3.bucket }} |
595 | 596 | {{- end }} |
596 | | - - name: ALLURE_BLOBSTORAGE_S3_REGION |
| 597 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_REGION |
597 | 598 | {{- if .Values.minio.enabled }} |
598 | 599 | value: {{ .Values.minio.defaultRegion }} |
599 | 600 | {{- else }} |
600 | 601 | value: {{ .Values.storage.s3.region}} |
601 | 602 | {{- end }} |
602 | 603 | {{- if not .Values.storage.awsSTS.enabled }} |
603 | | - - name: ALLURE_BLOBSTORAGE_S3_ACCESSKEY |
| 604 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_ACCESSKEY |
604 | 605 | valueFrom: |
605 | 606 | secretKeyRef: |
606 | 607 | name: {{ template "testops.secret.name" . }} |
607 | 608 | key: "s3AccessKey" |
608 | | - - name: ALLURE_BLOBSTORAGE_S3_SECRETKEY |
| 609 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_SECRETKEY |
609 | 610 | valueFrom: |
610 | 611 | secretKeyRef: |
611 | 612 | name: {{ template "testops.secret.name" . }} |
612 | 613 | key: "s3SecretKey" |
613 | 614 | {{- end }} |
614 | 615 | {{- if .Values.storage.s3.serverSideEncryption.enabled }} |
615 | | - - name: ALLURE_BLOB_STORAGE_S3_SERVER_SIDE_ENCRYPTION |
| 616 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_SERVERSIDEENCRYPTION |
616 | 617 | value: {{ .Values.storage.s3.serverSideEncryption.type | quote }} |
617 | 618 | {{- if .Values.storage.s3.serverSideEncryption.keyId }} |
618 | | - - name: ALLURE_BLOB_STORAGE_S3_KMS_KEY_ID |
| 619 | + - name: ALLURE_BLOBSTORAGE_{{ $s3Prefix }}_KMSKEYID |
619 | 620 | value: {{ .Values.storage.s3.serverSideEncryption.keyId | quote }} |
620 | 621 | {{- end }} |
621 | 622 | {{- end }} |
| 623 | + |
| 624 | +{{- if eq .Values.storage.type "S3_SHARDED" }} |
| 625 | +{{- range $index, $storage := .Values.storage.s3.additionalStorages }} |
| 626 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_NAME |
| 627 | + value: {{ $storage.name | quote }} |
| 628 | +{{- if $storage.endpoint }} |
| 629 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_ENDPOINT |
| 630 | + value: {{ $storage.endpoint | quote }} |
| 631 | +{{- end }} |
| 632 | +{{- if $storage.bucket }} |
| 633 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_BUCKET |
| 634 | + value: {{ $storage.bucket | quote }} |
| 635 | +{{- end }} |
| 636 | +{{- if $storage.region }} |
| 637 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_REGION |
| 638 | + value: {{ $storage.region | quote }} |
| 639 | +{{- end }} |
| 640 | +{{- if $storage.accessKey }} |
| 641 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_ACCESSKEY |
| 642 | + value: {{ $storage.accessKey | quote }} |
| 643 | +{{- end }} |
| 644 | +{{- if $storage.secretKey }} |
| 645 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_SECRETKEY |
| 646 | + value: {{ $storage.secretKey | quote }} |
| 647 | +{{- end }} |
| 648 | +{{- if $storage.pathstyle }} |
| 649 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_PATHSTYLEACCESS |
| 650 | + value: {{ $storage.pathstyle | quote }} |
| 651 | +{{- end }} |
| 652 | +{{- if and $storage.serverSideEncryption $storage.serverSideEncryption.enabled }} |
| 653 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_SERVERSIDEENCRYPTION |
| 654 | + value: {{ $storage.serverSideEncryption.type | quote }} |
| 655 | +{{- if $storage.serverSideEncryption.keyId }} |
| 656 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_STORAGES_{{ $index }}_KMSKEYID |
| 657 | + value: {{ $storage.serverSideEncryption.keyId | quote }} |
| 658 | +{{- end }} |
| 659 | +{{- end }} |
| 660 | +{{- end }} |
| 661 | +{{- range $projectId, $config := .Values.storage.s3.projects }} |
| 662 | +{{- if $config.storage }} |
| 663 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_PROJECTS_{{ $projectId }}_STORAGE |
| 664 | + value: {{ $config.storage | quote }} |
| 665 | +{{- end }} |
| 666 | +{{- if $config.bucket }} |
| 667 | + - name: ALLURE_BLOBSTORAGE_S3SHARDED_PROJECTS_{{ $projectId }}_BUCKET |
| 668 | + value: {{ $config.bucket | quote }} |
| 669 | +{{- end }} |
| 670 | +{{- end }} |
| 671 | +{{- end }} |
622 | 672 | {{- end }} |
623 | 673 |
|
624 | 674 | {{- define "renderFSEnvs" }} |
|
0 commit comments