Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prod to deploy workflow #189

Merged
merged 7 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
postgres_client_host: ${{ secrets.POSTGRES_CLIENT_HOST }}
postgres_url: ${{ secrets.POSTGRES_URL }}
opensearch_proxy_host: ${{ secrets.OPENSEARCH_PROXY_HOST }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}
20 changes: 20 additions & 0 deletions .github/workflows/deploy-staged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
postgres_client_host: ${{ secrets.POSTGRES_CLIENT_HOST }}
postgres_url: ${{ secrets.POSTGRES_URL }}
opensearch_proxy_host: ${{ secrets.OPENSEARCH_PROXY_HOST }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}

deploy-preprod:
uses: ./.github/workflows/deploy-workflow.yml
Expand All @@ -43,3 +44,22 @@ jobs:
postgres_client_host: ${{ secrets.POSTGRES_CLIENT_HOST }}
postgres_url: ${{ secrets.POSTGRES_URL }}
opensearch_proxy_host: ${{ secrets.OPENSEARCH_PROXY_HOST }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}

deploy-prod:
uses: ./.github/workflows/deploy-workflow.yml
needs: [deploy-preprod]
with:
env: prod
datahub_helm_version: "0.4.9"
datahub_prereqs_helm_version: "0.1.10"
secrets:
kube_namespace: "${{ secrets.KUBE_NAMESPACE }}"
kube_cert: "${{ secrets.KUBE_CERT }}"
kube_cluster: "${{ secrets.KUBE_CLUSTER }}"
kube_token: "${{ secrets.KUBE_TOKEN }}"
postgres_host: ${{ secrets.POSTGRES_HOST}}
postgres_client_host: ${{ secrets.POSTGRES_CLIENT_HOST }}
postgres_url: ${{ secrets.POSTGRES_URL }}
opensearch_proxy_host: ${{ secrets.OPENSEARCH_PROXY_HOST }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}
14 changes: 14 additions & 0 deletions .github/workflows/deploy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ on:
opensearch_proxy_host:
description: "domain address to reach opensearch"
required: true
azure_client_secret:
description: "client secret for azure authentication"
required: true

concurrency:
group: ${{ inputs.env }}
Expand Down Expand Up @@ -183,6 +186,17 @@ jobs:
envsubst < helm_deploy/monitoring/datahub-networkpolicy.yaml |
kubectl apply -f - --namespace=${KUBE_NAMESPACE}

- name: create azure k8s secrets
shell: bash
env:
KUBE_NAMESPACE: ${{ secrets.kube_namespace }}
AZURE_CLIENT_ID: ${{ vars.CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
TENANT_ID: ${{ vars.TENANT_ID }}
run: |
envsubst < helm_deploy/secrets.yaml |
kubectl -n ${KUBE_NAMESPACE} apply -f -

- name: update grafana status dashboard configmap
if: ${{ inputs.env == 'dev' }}
shell: bash
Expand Down
9 changes: 9 additions & 0 deletions helm_deploy/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: "azure-secrets"
type: Opaque
stringData:
client_id: "${AZURE_CLIENT_ID}"
client_secret: "${AZURE_CLIENT_SECRET}"
tenant_id: "${TENANT_ID}"
Loading