-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2293 Fix wrong resource name for broker url (#186)
- Loading branch information
Showing
11 changed files
with
272 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
charts/alfresco-ai-transformer/templates/_helpers-name.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{- define "alfresco-ai-transformer.config-ai-aws.name" -}} | ||
{{- $scope := (dict "Values" (dict "nameOverride" "aws-comprehend" ) "Chart" .Chart "Release" .Release) }} | ||
{{- include "alfresco-ai-transformer.fullname" $scope }} | ||
{{- end }} | ||
|
||
{{- define "alfresco-ai-transformer.config-ai-mq.name" -}} | ||
{{- $scope := (dict "Values" (dict "nameOverride" "ai-mq" ) "Chart" .Chart "Release" .Release) }} | ||
{{- include "alfresco-ai-transformer.fullname" $scope }} | ||
{{- end }} | ||
|
||
{{- define "alfresco-ai-transformer.config-ai-sfs.name" -}} | ||
{{- $scope := (dict "Values" (dict "nameOverride" "ai-sfs" ) "Chart" .Chart "Release" .Release) }} | ||
{{- include "alfresco-ai-transformer.fullname" $scope }} | ||
{{- end }} | ||
|
||
{{- define "alfresco-ai-transformer.secret-ai-aws.name" -}} | ||
{{- $scope := (dict "Values" (dict "nameOverride" "aws-comprehend" ) "Chart" .Chart "Release" .Release) }} | ||
{{- include "alfresco-ai-transformer.fullname" $scope }} | ||
{{- end }} | ||
|
||
{{- define "alfresco-ai-transformer.secret-ai-mq.name" -}} | ||
{{- $scope := (dict "Values" (dict "nameOverride" "ai-mq" ) "Chart" .Chart "Release" .Release) }} | ||
{{- include "alfresco-ai-transformer.fullname" $scope }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 60 additions & 57 deletions
117
charts/alfresco-ai-transformer/tests/confimap_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,63 @@ | ||
suite: test ai-transformer configmap | ||
templates: | ||
- config-message-broker.yaml | ||
- config-ai-transformer.yaml | ||
- config-aws.yaml | ||
- config-sfs.yaml | ||
- config-message-broker.yaml | ||
- config-ai-transformer.yaml | ||
- config-aws.yaml | ||
- config-sfs.yaml | ||
tests: | ||
- it: should fail due to missing values | ||
template: config-message-broker.yaml | ||
set: | ||
sfs: | ||
url: htts://some-file-store.infra.local:8080 | ||
asserts: | ||
- failedTemplate: | ||
errorMessage: >- | ||
Please provide a valid broker URL with messageBroker.url or as a configmap key using messageBroker.existingConfigMap | ||
- it: should fail due to missing values | ||
set: | ||
messageBroker: | ||
url: nio://activemq:61616 | ||
asserts: | ||
- failedTemplate: | ||
errorMessage: You must provide a base URL for the filestore service as sfs.url | ||
template: config-sfs.yaml | ||
- it: should render default configmaps based on values | ||
values: &testvalues | ||
- values/test_values.yaml | ||
template: config-aws.yaml | ||
asserts: | ||
- equal: | ||
path: data.JAVA_OPTS | ||
value: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 | ||
template: config-ai-transformer.yaml | ||
- equal: | ||
path: data.FILE_STORE_URL | ||
value: http://acs-alfresco-transform-service/alfresco/api/-default-/private/sfs/versions/1/file/ | ||
template: config-sfs.yaml | ||
- equal: | ||
path: data.BROKER_URL | ||
value: failover:(nio://activemq:61616) | ||
template: config-message-broker.yaml | ||
- equal: | ||
path: data.AWS_REGION | ||
value: null | ||
- equal: | ||
path: data.AWS_S3_BUCKET | ||
value: null | ||
- equal: | ||
path: data.AWS_COMPREHEND_ROLE_ARN | ||
value: null | ||
- it: should not render components configmaps | ||
values: *testvalues | ||
set: | ||
aws: | ||
existingConfigMap: | ||
name: myaws | ||
template: config-aws.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
- it: should fail due to missing values | ||
template: config-message-broker.yaml | ||
set: | ||
sfs: | ||
url: htts://some-file-store.infra.local:8080 | ||
asserts: | ||
- failedTemplate: | ||
errorMessage: >- | ||
Please provide a valid broker URL with messageBroker.url or as a configmap key using messageBroker.existingConfigMap | ||
- it: should fail due to missing values | ||
set: | ||
messageBroker: | ||
url: nio://activemq:61616 | ||
asserts: | ||
- failedTemplate: | ||
errorMessage: You must provide a base URL for the filestore service as sfs.url | ||
template: config-sfs.yaml | ||
|
||
- it: should render default configmaps based on values | ||
values: &testvalues | ||
- values/test_values.yaml | ||
template: config-aws.yaml | ||
asserts: | ||
- equal: | ||
path: data.JAVA_OPTS | ||
value: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 | ||
template: config-ai-transformer.yaml | ||
- equal: | ||
path: data.FILE_STORE_URL | ||
value: http://acs-alfresco-transform-service/alfresco/api/-default-/private/sfs/versions/1/file/ | ||
template: config-sfs.yaml | ||
- equal: | ||
path: data.BROKER_URL | ||
value: failover:(nio://activemq:61616) | ||
template: config-message-broker.yaml | ||
- equal: | ||
path: data.AWS_REGION | ||
value: null | ||
- equal: | ||
path: data.AWS_S3_BUCKET | ||
value: null | ||
- equal: | ||
path: data.AWS_COMPREHEND_ROLE_ARN | ||
value: null | ||
|
||
- it: should not render components configmaps | ||
values: *testvalues | ||
set: | ||
aws: | ||
existingConfigMap: | ||
name: myaws | ||
template: config-aws.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 0 |
Oops, something went wrong.