-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (68 loc) · 2.56 KB
/
azure-k8s-cluster-dispatch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "azure-07-dispatch-kubernetes-service"
on:
workflow_dispatch:
inputs:
clusterName:
description: "The name given to the AKS cluster (it will be suffixed by a random id)."
required: true
k8sVersion:
description: "A currently supported Kubernetes version in AKS"
required: true
type: choice
options:
- "1.27"
- "1.26"
- "1.25"
- "1.24"
- "1.23"
- "1.22"
default: "1.26"
resourceGroupName:
description: "The resource group to provision the cluster in"
required: true
aksNodes:
description: "Minimum number of nodes"
required: true
default: "3"
aksNodeType:
description: "VM type to use for the nodes"
required: true
aksNodeDiskSize:
description: "Disk size for the node in GB"
required: true
default: "80"
suffix:
description: "A Virtual Network suffix. Used for looking up the subnet where cluster nodes will be running."
required: true
action:
required: true
type: choice
description: "Create (new) or destroy (existing)"
options:
- create
- destroy
jobs:
manage-aks:
uses: ./.github/workflows/azure-k8s-cluster.yml
with:
clusterName: ${{ github.event.inputs.clusterName }}
k8sVersion: ${{ github.event.inputs.k8sVersion }}
aksNodes: ${{ github.event.inputs.aksNodes }}
aksNodeType: ${{ github.event.inputs.aksNodeType }}
aksNodeDiskSize: ${{ github.event.inputs.aksNodeDiskSize }}
suffix: ${{ github.event.inputs.suffix }}
resourceGroupName: ${{ github.event.inputs.resourceGroupName }}
action: ${{ github.event.inputs.action }}
secrets:
AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }}
AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }}
TF_BACKEND_RESOURCE_GROUP_NAME: ${{ secrets.TF_BACKEND_RESOURCE_GROUP_NAME }}
TF_BACKEND_STORAGE_ACCOUNT_NAME: ${{ secrets.TF_BACKEND_STORAGE_ACCOUNT_NAME }}
TF_BACKEND_STORAGE_CONTAINER_NAME: ${{ secrets.TF_BACKEND_STORAGE_CONTAINER_NAME }}
TANZU_NETWORK_API_TOKEN: ${{ secrets.TANZU_NETWORK_API_TOKEN }}
TANZU_NETWORK_USERNAME: ${{ secrets.TANZU_NETWORK_USERNAME }}
TANZU_NETWORK_PASSWORD: ${{ secrets.TANZU_NETWORK_PASSWORD }}
CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }}
PA_TOKEN: ${{ secrets.PA_TOKEN }}