Skip to content

Commit

Permalink
OPSEXP-1798 Fix elasticsearch reindexing job database credentials (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Oct 21, 2022
1 parent d5fe9f6 commit efa0fa9
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/helm-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
group: ${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: false
jobs:
app_charts:
build_vars:
runs-on: ubuntu-latest
if: >-
github.event_name == 'push'
Expand Down Expand Up @@ -56,13 +56,13 @@ jobs:
helm_integration:
runs-on: ubuntu-latest
needs:
- app_charts
- build_vars
name: Helm ${{ matrix.name }} ${{ matrix.values }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
include: ${{ fromJSON(needs.app_charts.outputs.ver_json) }}
include: ${{ fromJSON(needs.build_vars.outputs.ver_json) }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -109,11 +109,11 @@ jobs:
)
runs-on: ubuntu-latest
needs:
- app_charts
- build_vars
- helm_integration
strategy:
matrix:
charts: ${{ fromJSON(needs.app_charts.outputs.chart_names) }}
charts: ${{ fromJSON(needs.build_vars.outputs.chart_names) }}
steps:
- uses: >-
Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.17.0
Expand All @@ -129,7 +129,7 @@ jobs:
uses: >-
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/publish-chart@v1.17.0
with:
chart: ${{ matrix.charts }}
chart: ${{ matrix.charts }}
release_type: ${{ env.RELEASE_TYPE }}
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
github_username: ${{ secrets.BOT_GITHUB_USERNAME }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ spec:
- secretRef:
name: {{ default (printf "%s-brokersecret" (include "content-services.shortname" .)) .Values.messageBroker.existingSecretName }}
env:
- name: SPRING_DATABASE_PASSWORD
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "content-services.shortname" . }}-dbsecret
key: DATABASE_PASSWORD
- name: SPRING_DATABASE_USERNAME
- name: SPRING_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
name: {{ template "content-services.shortname" . }}-dbsecret
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
suite: test reindexing job manifest
templates:
- reindexing-job.yaml
tests:
- it: should have env vars for spring database credentials
values: &testvalues
- ../../../tests/values/test_values.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].env[0].name
value: SPRING_DATASOURCE_PASSWORD
- equal:
path: spec.template.spec.containers[0].env[1].name
value: SPRING_DATASOURCE_USERNAME
- it: should not be present when disabled
values: *testvalues
set:
reindexing.enabled: false
asserts:
- hasDocuments:
count: 0
6 changes: 3 additions & 3 deletions helm/alfresco-content-services/tests/activemq_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ templates:
tests:
- it: should render activeMQ embeded secret
values:
- test-values.yml
- externalBroker-values.yml
- values/test_values.yaml
- values/externalBroker_values.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].envFrom[3].secretRef.name
Expand All @@ -24,7 +24,7 @@ tests:
value: ZmFpbG92ZXIobmlvOi8vc29tZWJyb2tlcjo2MTYxNik=
- it: should render custom secret
values:
- test-values.yml
- values/test_values.yaml
set:
messageBroker:
existingSecretName: acs-credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ templates:
tests:
- it: should render with default value alfresco-cs
values: &testvalues
- test-values.yml
- values/test_values.yaml
asserts:
- equal:
path: data.JAVA_TOOL_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion helm/alfresco-content-services/tests/search_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ templates:
tests:
- it: should configure ACS without any search subsystem
values: &testvalues
- test-values.yml
- values/test_values.yaml
set:
alfresco-search:
enabled: false
Expand Down

0 comments on commit efa0fa9

Please sign in to comment.