Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Allow kms key id to be sourced and used (#92)
Browse files Browse the repository at this point in the history
* Allow KMS_KEY_ID to be sourced as a secret and passed to Allure Report

* Update Chart.yaml

* Update _helpers.tpl

Fixing env key
  • Loading branch information
j-puri authored Apr 10, 2024
1 parent badbaf5 commit 6f804b0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/allure-testops/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: allure-testops
version: 4.14.7
version: 4.14.8
appVersion: 4.22.0

description: Allure TestOps
Expand Down
9 changes: 8 additions & 1 deletion charts/allure-testops/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@
{{- else }}
value: {{ .Values.fs.s3.region}}
{{- end }}
{{ if .Values.fs.s3.kms.enabled }}
- name: {{ .Values.build}}_BLOBSTORAGE_S3_KMSKEYID
valueFrom:
secretKeyRef:
name: {{ template "allure-testops.secret.name" . }}
key: "s3KmsKeyId"
{{- end}}
{{- if and (not .Values.allure.manualConfig) (not .Values.aws.enabled) }}
- name: {{ .Values.build }}_BLOBSTORAGE_S3_ACCESSKEY
valueFrom:
Expand Down Expand Up @@ -279,4 +286,4 @@
{{- else }}
{{- printf "%s/" .Values.registry.repo }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/allure-testops/templates/infra/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ data:
s3AccessKey: {{ .Values.fs.s3.accessKey | b64enc | quote }}
s3SecretKey: {{ .Values.fs.s3.secretKey | b64enc | quote }}
{{- end}}
{{ if .Values.fs.s3.kms.enabled }}
s3KmsKeyId: {{ .Values.fs.s3.kms.kmsKeyId | b64enc | quote }}
{{- end }}
redisPass: {{ .Values.redis.auth.password | b64enc | quote }}
clientId: {{ .Values.allure.auth.oidc.client.id | b64enc | quote }}
clientSecret: {{ .Values.allure.auth.oidc.client.secret | b64enc | quote }}
Expand Down
13 changes: 13 additions & 0 deletions charts/allure-testops/templates/infra/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ spec:
- objectName: "s3SecretKey"
key: "s3SecretKey"
{{- end }}

{{ if .Values.fs.s3.kms.enabled }}
- objectName: "s3KmsKeyId"
secretPath: "{{ .Values.vault.secretPath }}"
secretKey: "s3_kms_key_id"
{{- end }}

- objectName: "smtpUsername"
key: "smtpUsername"
- objectName: "smtpPassword"
Expand Down Expand Up @@ -136,6 +143,12 @@ spec:
secretKey: "s3_secret_key"
{{- end }}

{{ if .Values.fs.s3.kms.enabled }}
- objectName: "s3KmsKeyId"
secretPath: "{{ .Values.vault.secretPath }}"
secretKey: "s3_kms_key_id"
{{- end }}

- objectName: "smtpUsername"
secretPath: "{{ .Values.vault.smtpPath }}"
secretKey: "username"
Expand Down
4 changes: 4 additions & 0 deletions charts/allure-testops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ fs:
# If you run Allure Testops in AWS EKS you don't need stating accessKey & secretKey
accessKey: foo
secretKey: bar
kms:
enabled: false
# If using Vault then this is ignored
kmsKeyId:
csiStorage:
storageClass: ""
existingVolumeName: ""
Expand Down

0 comments on commit 6f804b0

Please sign in to comment.