Helm deployment #21
Workflow file for this run
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
name: Helm deployment | |
on: | |
workflow_dispatch: | |
inputs: | |
chart: | |
type: choice | |
required: true | |
description: Name of the chart | |
options: | |
- cert-manager | |
- httpserver | |
- kafka | |
- kafkaconsumer | |
- mysql | |
- otelcollector | |
- oteloperator | |
- simulator | |
language: | |
type: choice | |
required: false | |
description: Name of the programming language | |
default: '' | |
options: | |
- '' | |
- golang | |
jobs: | |
helm_deploy: | |
name: "Deploy ${{ inputs.chart }}" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
id: checkout_repo | |
uses: actions/checkout@v4 | |
- name: Login to Azure | |
id: login_to_azure | |
run: | | |
az login \ | |
--service-principal \ | |
-u ${{ secrets.AZURE_SERVICE_PRINCIPAL_APP_ID }} \ | |
-p ${{ secrets.AZURE_SERVICE_PRINCIPAL_SECRET }} \ | |
--tenant ${{ secrets.AZURE_TENANT_ID }} | |
- name: Get AKS credentials | |
id: get_aks_credentials | |
run: | | |
az aks get-credentials \ | |
--resource-group "rg${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \ | |
--name "aks${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \ | |
--overwrite-existing | |
- name: Install Helm | |
id: install_helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: "v3.11.1" | |
- name: Deploy Helm ${{ inputs.chart }} | |
id: deploy_helm_chart | |
run: | | |
chart=${{ inputs.chart }} | |
language=${{ inputs.language }} | |
if [[ ${language} != '' ]]; then | |
bash ./infra/helm/${chart}/deploy.sh \ | |
--github-actor ${{ github.actor }} \ | |
--project ${{ secrets.PROJECT }} \ | |
--instance ${{ secrets.INSTANCE }} \ | |
--application ${chart} \ | |
--language ${language} | |
elif [[ ${chart} == 'otelcollector' ]]; then | |
bash ./infra/helm/${chart}/deploy.sh \ | |
--project ${{ secrets.PROJECT }} \ | |
--instance ${{ secrets.INSTANCE }} \ | |
--cluster-type aks \ | |
--newrelic-otlp-endpoint ${{ secrets.NEWRELIC_OTLP_ENDPOINT }} \ | |
--newrelic-opsteam-license-key ${{ secrets.NEWRELIC_LICENSE_KEY_OPSTEAM }} | |
else | |
bash ./infra/helm/${chart}/deploy.sh | |
fi | |
- name: Logout of Azure | |
id: logout_from_azure | |
if: always() | |
run: | | |
az logout |