From 19fdfcbadda22c4b91cf7c24387d2a93214ed458 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 18 Dec 2023 16:30:37 +0100 Subject: [PATCH] fixup --- charts/alfresco-ai-transformer/README.md | 2 +- .../templates/deployment-ai-transformer.yaml | 19 +++++++-------- .../tests/deployment-ai-tranformer_test.yaml | 24 +++++++++---------- charts/alfresco-ai-transformer/values.yaml | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/charts/alfresco-ai-transformer/README.md b/charts/alfresco-ai-transformer/README.md index 1b7baa5fa..9ffdd0e41 100644 --- a/charts/alfresco-ai-transformer/README.md +++ b/charts/alfresco-ai-transformer/README.md @@ -40,7 +40,7 @@ A Helm chart for deploying Alfresco ai transformer service | livenessProbe.maxTransforms | int | `10000` | | | livenessProbe.periodSeconds | int | `20` | | | livenessProbe.timeoutSeconds | int | `10` | | -| messageBroker.existingConfigMap | object | `{"keys":{"url":null},"name":null}` | Alternatively, provide credentials via an existing secret and set the keys as they are given | +| messageBroker.existingConfigMap | object | `{"keys":{"url":"BROKER_URL"},"name":null}` | Alternatively, provide credentials via an existing secret and set the keys as they are given | | messageBroker.existingSecret.keys.password | string | `"BROKER_PASSWORD"` | | | messageBroker.existingSecret.keys.username | string | `"BROKER_USERNAME"` | | | messageBroker.existingSecret.name | string | `nil` | | diff --git a/charts/alfresco-ai-transformer/templates/deployment-ai-transformer.yaml b/charts/alfresco-ai-transformer/templates/deployment-ai-transformer.yaml index 2aee0736d..c5ca03a8d 100644 --- a/charts/alfresco-ai-transformer/templates/deployment-ai-transformer.yaml +++ b/charts/alfresco-ai-transformer/templates/deployment-ai-transformer.yaml @@ -64,7 +64,6 @@ spec: - configMapRef: name: {{ template "alfresco-ai-transformer.fullname" . }} env: - {{- include "activemq.env" . | nindent 12 }} {{- $mqSecretCtx := dict "Values" (dict "nameOverride" "ai-mq") "Chart" $.Chart "Release" $.Release }} {{- $mqSecret := coalesce .Values.messageBroker.existingSecret.name (include "alfresco-ai-transformer.fullname" $mqSecretCtx) }} {{- $awsSecretCtx := dict "Values" (dict "nameOverride" "aws-comprehend") "Chart" $.Chart "Release" $.Release }} @@ -76,47 +75,47 @@ spec: {{- $sfsCmCtx := dict "Values" (dict "nameOverride" "ai-sfs") "Chart" .Chart "Release" .Release }} {{- $sfsCm := coalesce .Values.sfs.existingConfigMap.name (include "alfresco-ai-transformer.fullname" $sfsCmCtx) }} - name: BROKER_USERNAME - valuesFrom: + valueFrom: secretKeyRef: name: {{ $mqSecret }} key: {{ .Values.messageBroker.existingSecret.keys.username }} - name: BROKER_PASSWORD - valuesFrom: + valueFrom: secretKeyRef: name: {{ $mqSecret }} key: {{ .Values.messageBroker.existingSecret.keys.password }} - name: BROKER_URL - valuesFrom: + valueFrom: configMapKeyRef: name: {{ $mqCm }} key: {{ .Values.messageBroker.existingConfigMap.keys.url }} - name: FILE_STORE_URL - valuesFrom: + valueFrom: configMapKeyRef: name: {{ $sfsCm }} key: {{ .Values.sfs.existingConfigMap.keys.url }} - name: AWS_ACCESS_KEY_ID - valuesFrom: + valueFrom: secretKeyRef: name: {{ $awsSecret }} key: {{ .Values.aws.existingSecret.keys.accessKeyId }} - name: AWS_SECRET_ACCESS_KEY - valuesFrom: + valueFrom: secretKeyRef: name: {{ $awsSecret }} key: {{ .Values.aws.existingSecret.keys.secretAccessKey }} - name: AWS_REGION - valuesFrom: + valueFrom: configMapKeyRef: name: {{ $awsCm }} key: {{ .Values.aws.existingConfigMap.keys.region }} - name: AWS_S3_BUCKET - valuesFrom: + valueFrom: configMapKeyRef: name: {{ $awsCm }} key: {{ .Values.aws.existingConfigMap.keys.s3Bucket }} - name: AWS_COMPREHEND_ROLE_ARN - valuesFrom: + valueFrom: configMapKeyRef: name: {{ $awsCm }} key: {{ .Values.aws.existingConfigMap.keys.comprehendRoleARN }} diff --git a/charts/alfresco-ai-transformer/tests/deployment-ai-tranformer_test.yaml b/charts/alfresco-ai-transformer/tests/deployment-ai-tranformer_test.yaml index 6c3bf5d72..7eae56b6d 100644 --- a/charts/alfresco-ai-transformer/tests/deployment-ai-tranformer_test.yaml +++ b/charts/alfresco-ai-transformer/tests/deployment-ai-tranformer_test.yaml @@ -12,7 +12,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_ACCESS_KEY_ID - valuesFrom: + valueFrom: secretKeyRef: name: RELEASE-NAME-aws-comprehend key: AWS_ACCESS_KEY_ID @@ -20,7 +20,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_SECRET_ACCESS_KEY - valuesFrom: + valueFrom: secretKeyRef: name: RELEASE-NAME-aws-comprehend key: AWS_SECRET_ACCESS_KEY @@ -28,7 +28,7 @@ tests: path: spec.template.spec.containers[0].env content: name: FILE_STORE_URL - valuesFrom: + valueFrom: configMapKeyRef: name: RELEASE-NAME-ai-sfs key: FILE_STORE_URL @@ -36,7 +36,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_REGION - valuesFrom: + valueFrom: configMapKeyRef: name: RELEASE-NAME-aws-comprehend key: AWS_REGION @@ -44,7 +44,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_S3_BUCKET - valuesFrom: + valueFrom: configMapKeyRef: name: RELEASE-NAME-aws-comprehend key: AWS_S3_BUCKET @@ -52,7 +52,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_COMPREHEND_ROLE_ARN - valuesFrom: + valueFrom: configMapKeyRef: name: RELEASE-NAME-aws-comprehend key: AWS_COMPREHEND_ROLE_ARN @@ -110,7 +110,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_ACCESS_KEY_ID - valuesFrom: + valueFrom: secretKeyRef: name: awscreds key: AWSACCESSKEYID @@ -118,7 +118,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_SECRET_ACCESS_KEY - valuesFrom: + valueFrom: secretKeyRef: name: awscreds key: AWSSECRETACCESSKEY @@ -126,7 +126,7 @@ tests: path: spec.template.spec.containers[0].env content: name: FILE_STORE_URL - valuesFrom: + valueFrom: configMapKeyRef: name: sfsurl key: SFS_URL @@ -134,7 +134,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_REGION - valuesFrom: + valueFrom: configMapKeyRef: name: amazon key: REGION @@ -142,7 +142,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_S3_BUCKET - valuesFrom: + valueFrom: configMapKeyRef: name: amazon key: comprehendbucket @@ -150,7 +150,7 @@ tests: path: spec.template.spec.containers[0].env content: name: AWS_COMPREHEND_ROLE_ARN - valuesFrom: + valueFrom: configMapKeyRef: name: amazon key: ROLE diff --git a/charts/alfresco-ai-transformer/values.yaml b/charts/alfresco-ai-transformer/values.yaml index 8c0d7f856..db55ec4b3 100644 --- a/charts/alfresco-ai-transformer/values.yaml +++ b/charts/alfresco-ai-transformer/values.yaml @@ -81,7 +81,7 @@ messageBroker: existingConfigMap: name: null keys: - url: null + url: BROKER_URL existingSecret: name: null keys: