Files
kata-containers/.github/workflows/create-aks.yaml
Fabiano Fidêncio c444c24bc5 gha: aks: Add snippets to create / delete aks clusters
Those will be shortly used as part of a newly added GitHub action for
testing k8s tests on Azure.

They've been created using the secrets we already have exposed as part
of our GitHub, and they follow a similar way to authenticate to Azure /
create an AKS cluster as done in the `/test-kata-deploy` action.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-03-31 21:55:41 +02:00

33 lines
778 B
YAML

name: CI | Create AKS cluster
on:
workflow_call:
inputs:
name:
required: true
type: string
jobs:
create-aks:
runs-on: ubuntu-latest
steps:
- name: Download Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- name: Log into the Azure account
run: |
az login \
--service-principal \
-u "${{ secrets.AZ_APPID }}" \
-p "${{ secrets.AZ_PASSWORD }}" \
--tenant "${{ secrets.AZ_TENANT_ID }}"
- name: Create AKS cluster
run: |
az aks create \
-g "kataCI" \
-n "${{ inputs.name }}" \
-s "Standard_D4s_v3" \
--node-count 1 \
--generate-ssh-keys