@@ -2,6 +2,10 @@ name: Deploy APL
2
2
on :
3
3
workflow_call :
4
4
inputs :
5
+ linode_types :
6
+ description : ' Linode instance types'
7
+ type : string
8
+ default : g6-dedicated-8
5
9
kubernetes_versions :
6
10
description : ' Kubernetes version'
7
11
type : string
28
32
default : ' false'
29
33
workflow_dispatch :
30
34
inputs :
35
+ linode_types :
36
+ description : ' Linode instance types'
37
+ type : choice
38
+ options :
39
+ - g6-dedicated-4
40
+ - g6-dedicated-8
41
+ - g6-dedicated-16
42
+ - g6-dedicated-32
43
+ - g6-dedicated-48
44
+ - g6-dedicated-50
45
+ - g6-dedicated-56
46
+ default : g6-dedicated-4
31
47
kubernetes_versions :
32
48
description : ' Kubernetes version'
33
49
type : choice
34
50
options :
35
- - " ['1.29']"
36
51
- " ['1.30']"
37
52
- " ['1.31']"
38
- default : " ['1.31']"
53
+ - " ['1.32']"
54
+ default : " ['1.32']"
39
55
install_profile :
40
56
description : APL installation profile
41
57
default : minimal-with-team
@@ -198,7 +214,7 @@ jobs:
198
214
--region nl-ams \
199
215
--k8s_version ${{ env.LINODE_K8S_VERSION }} \
200
216
--control_plane.high_availability true \
201
- --node_pools.type g6-dedicated-8 --node_pools.count 3 \
217
+ --node_pools.type ${{ inputs.linode_types }} --node_pools.count 3 \
202
218
--node_pools.autoscaler.enabled true \
203
219
--node_pools.autoscaler.max 3 \
204
220
--node_pools.autoscaler.min 3 \
@@ -223,24 +239,15 @@ jobs:
223
239
224
240
sleep 30
225
241
done
226
- - name : Save kubectl config with auth token and Get kubectl environment and create docker secret
242
+ - name : Save kubectl config with auth token
227
243
if : ${{ inputs.install_profile != 'no-apl' }}
228
244
run : |
229
- # Get the kubeconfig from linode-cli
230
- kubeconfig=$(linode-cli lke kubeconfig-view ${{ env.LINODE_CLUSTER_ID }} --text | sed 1d | base64 --decode)
231
-
232
- # Save the kubeconfig to a file
233
- kubeconfigDir="$HOME/.kube"
234
- kubeconfigPath="$HOME/.kube/config"
235
- mkdir -p "$kubeconfigDir" # Create the directory if it doesn't exist
236
- echo "$kubeconfig" > "$kubeconfigPath"
237
- echo "Kubeconfig saved to $kubeconfigPath"
238
-
239
- # Set the kubectl context to use the new kubeconfig
240
- export KUBECONFIG="$kubeconfigPath"
241
- contextName=$(kubectl config get-contexts -o name | head -n 1)
242
- kubectl config use-context "$contextName"
243
- echo "Kubectl context set to linode"
245
+ echo "Waiting for kubeconfig..."
246
+ while :; do
247
+ linode-cli get-kubeconfig --label "${{ env.LINODE_CLUSTER_NAME }}" 2> /dev/null && break
248
+ echo "still waiting..."
249
+ sleep 10
250
+ done
244
251
echo LINODE_CLUSTER_CONTEXT=`kubectl config current-context` >> $GITHUB_ENV
245
252
- name : Create image pull secret on test cluster
246
253
if : ${{ inputs.install_profile != 'no-apl' }}
0 commit comments