Skip to content

Commit

Permalink
add es config
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldragontattoo committed Jan 15, 2025
1 parent 0311edb commit ab6e524
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/eks-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
, ${{ secrets.SECURITY_SCAN}}
DB_URL, ${{secrets.DB}}
, ${{ secrets.SECURITY_SCAN }}
DB_URL, ${{ secrets.DB }}
ES_CREDS, ${{ secrets.ES }}
parse-json-secrets: true

- name: Build Docker Images
Expand Down Expand Up @@ -83,9 +84,17 @@ jobs:
--set initContainers[0].image.repository=${{ secrets.CFGOV_IMAGE }}
--set initContainers[0].image.tag=${GITHUB_SHA}
--set initContainers[0].env[0].value=${DB_URL}
--set initContainers[0].env[2].value=${{ secrets.ES_HOST }}
--set initContainers[0].env[3].value=${{ secrets.ES_PORT }}
--set initContainers[0].env[4].value=${ES_CREDS_USERNAME}
--set initContainers[0].env[5].value=${ES_CREDS_PASSWORD}
--set containers[0].image.repository=${{ secrets.CFGOV_IMAGE }}
--set containers[0].image.tag=${GITHUB_SHA}
--set containers[0].env[0].value=${DB_URL}
--set containers[0].env[2].value=${{ secrets.ES_HOST }}
--set containers[0].env[3].value=${{ secrets.ES_PORT }}
--set containers[0].env[4].value=${ES_CREDS_USERNAME}
--set containers[0].env[5].value=${ES_CREDS_PASSWORD}
--set containers[1].image.repository=${{ secrets.CFGOV_APACHE_IMAGE }}
--set containers[1].image.tag=${GITHUB_SHA}
--set mapping.host=${{ secrets.HOST }}
2 changes: 1 addition & 1 deletion cfgov/cfgov/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
else:
OPENSEARCH_DSL = {
"default": {
"hosts": f"{ES_SCHEMA}://{ES_HOST}:{ES_PORT}",
"hosts": f"{ES_HOST}:{ES_PORT}",
"http_auth": (
os.getenv("ES_USER", "admin"),
os.getenv("ES_PASS", "admin"),
Expand Down
4 changes: 4 additions & 0 deletions helm/values.eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ initContainers:
value: "opensearch-cluster-master"
- name: ES_PORT
value: "9200"
- name: ES_USER
value: ""
- name: ES_PASSWORD
value: ""
command:
- 'sh'
- '-c'
Expand Down

0 comments on commit ab6e524

Please sign in to comment.