Skip to content

Commit

Permalink
repackage datahub and datahub-prerequisites into datahub-cp helm char…
Browse files Browse the repository at this point in the history
…t for more easily managed deployment & updating

Co-authored-by: Jacob Woffenden <[email protected]>
  • Loading branch information
tom-webber and jacobwoffenden committed Jun 3, 2024
1 parent 2ec6f5a commit 7c53b08
Show file tree
Hide file tree
Showing 7 changed files with 756 additions and 32 deletions.
61 changes: 29 additions & 32 deletions .github/workflows/deploy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ on:
description: "which environment to deploy to"
required: true
type: string
datahub_helm_version:
datahub_cp_version:
description: "version of the datahub helm chart to use for deploy"
required: true
type: string
datahub_prereqs_helm_version:
description: "version of the datahub prerequisites helm chart to use for deploy"
required: true
type: string
secrets:
kube_namespace:
description: "the kubernetes namespace to deploy to"
Expand Down Expand Up @@ -113,18 +109,18 @@ jobs:
run: |
helm repo update datahub
- name: install datahub pre-requisites charts
shell: bash
id: upgrade-helm-prereqs
env:
CHART_VERSION: ${{ inputs.datahub_prereqs_helm_version }}
run: |
helm upgrade \
--install prerequisites datahub/datahub-prerequisites \
--version ${CHART_VERSION} \
--atomic --timeout 5m0s \
--values helm_deploy/values_prerequisites-base.yaml \
--namespace ${{ secrets.kube_namespace }}
# - name: install datahub pre-requisites charts
# shell: bash
# id: upgrade-helm-prereqs
# env:
# CHART_VERSION: ${{ inputs.datahub_prereqs_helm_version }}
# run: |
# helm upgrade \
# --install prerequisites datahub/datahub-prerequisites \
# --version ${CHART_VERSION} \
# --atomic --timeout 5m0s \
# --values helm_deploy/values_prerequisites-base.yaml \
# --namespace ${{ secrets.kube_namespace }}

- name: set env vars
shell: bash
Expand All @@ -145,34 +141,35 @@ jobs:
id: upgrade-helm-datahub
env:
APP_SHORT_HOST: ${{ env.APP_SHORT_HOST }}
CHART_VERSION: ${{ inputs.datahub_helm_version }}
CHART_VERSION: ${{ inputs.datahub_cp_version }}
IRSA_SA: data-platform-${{ inputs.env }}
OPENSEARCH_PROXY_HOST: ${{ secrets.OPENSEARCH_PROXY_HOST }}
POSTGRES_CLIENT_HOST: ${{ secrets.postgres_client_host }}
POSTGRES_HOST: ${{ secrets.postgres_host }}
POSTGRES_URL: ${{ secrets.postgres_url }}
RELEASE_NAME: datahub
RELEASE_NAME: datahub-cp
FRONTEND_FULLNAME: datahub-frontend-${{ inputs.env }}
# if many env-specific variables need setting, add --values files after 'base'
# e.g. `--values helm_deploy/values-${{ inputs.env }}.yaml \`
run: |
helm upgrade \
--install ${RELEASE_NAME} datahub/datahub \
--install ${RELEASE_NAME} datahub-cp \
--version ${CHART_VERSION} \
--atomic --timeout 10m0s \
--values helm_deploy/values-base.yaml \
--values helm_deploy/charts/datahub-cp/values/prerequisites-values.yaml \
--values helm_deploy/charts/datahub-cp/values/datahub-values.yaml \
--namespace ${{ secrets.kube_namespace }} \
--set datahub-frontend.fullnameOverride=${RELEASE_NAME}-${FRONTEND_FULLNAME} \
--set datahub-frontend.oidcAuthentication.azureTenantId=${{ vars.TENANT_ID }} \
--set datahub-frontend.oidcAuthentication.clientId=${{ vars.CLIENT_ID }} \
--set datahub-frontend.ingress.tls[0].hosts[0]=${APP_SHORT_HOST} \
--set datahub-frontend.ingress.hosts[0].host=${APP_SHORT_HOST} \
--set datahub-frontend.ingress.annotations.external-dns\\.alpha\\.kubernetes\\.io/set-identifier=${EXT_DNS_ID} \
--set acryl-datahub-actions.serviceAccount.name=${IRSA_SA} \
--set global.elasticsearch.host=${OPENSEARCH_PROXY_HOST} \
--set global.sql.datasource.host=${POSTGRES_HOST} \
--set global.sql.datasource.hostForpostgresqlClient=${POSTGRES_CLIENT_HOST} \
--set global.sql.datasource.url=${POSTGRES_URL}
--set datahub.datahub-frontend.fullnameOverride=${RELEASE_NAME}-${FRONTEND_FULLNAME} \
--set datahub.datahub-frontend.oidcAuthentication.azureTenantId=${{ vars.TENANT_ID }} \
--set datahub.datahub-frontend.oidcAuthentication.clientId=${{ vars.CLIENT_ID }} \
--set datahub.datahub-frontend.ingress.tls[0].hosts[0]=${APP_SHORT_HOST} \
--set datahub.datahub-frontend.ingress.hosts[0].host=${APP_SHORT_HOST} \
--set datahub.datahub-frontend.ingress.annotations.external-dns\\.alpha\\.kubernetes\\.io/set-identifier=${EXT_DNS_ID} \
--set datahub.acryl-datahub-actions.serviceAccount.name=${IRSA_SA} \
--set datahub.global.elasticsearch.host=${OPENSEARCH_PROXY_HOST} \
--set datahub.global.sql.datasource.host=${POSTGRES_HOST} \
--set datahub.global.sql.datasource.hostForpostgresqlClient=${POSTGRES_CLIENT_HOST} \
--set datahub.global.sql.datasource.url=${POSTGRES_URL}
- name: allow CP prometheus scraping
shell: bash
Expand Down
23 changes: 23 additions & 0 deletions helm_deploy/charts/datahub-cp/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions helm_deploy/charts/datahub-cp/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: datahub
repository: https://helm.datahubproject.io
version: 0.4.9
- name: datahub-prerequisites
repository: https://helm.datahubproject.io
version: 0.1.10
digest: sha256:3668ad569c5875139e0104e5a0c7e5cd558185501e3191b62633c57bc41d953e
generated: "2024-06-03T12:01:45.582601+01:00"
12 changes: 12 additions & 0 deletions helm_deploy/charts/datahub-cp/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: datahub-cp
type: application
version: 0.1.0
appVersion: "0.13.2"
dependencies:
- name: datahub-prerequisites
version: "0.1.10"
repository: "https://helm.datahubproject.io"
- name: datahub
version: "0.4.9"
repository: "https://helm.datahubproject.io"
16 changes: 16 additions & 0 deletions helm_deploy/charts/datahub-cp/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Default values for datahub-cp.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

datahub:
values: {}

prerequisites:
values: {}

monitoring:
enabled: false
prometheus:
enabled: true
grafanaDashboards:
enabled: true
Loading

0 comments on commit 7c53b08

Please sign in to comment.