Skip to content

Commit e03e952

Browse files
committed
ci: updated github workflow
1 parent 2f3def2 commit e03e952

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

.github/workflows/integration.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Deploy APL
22
on:
33
workflow_call:
44
inputs:
5+
linode_types:
6+
description: 'Linode instance types'
7+
type: string
8+
default: g6-dedicated-8
59
kubernetes_versions:
610
description: 'Kubernetes version'
711
type: string
@@ -28,14 +32,26 @@ on:
2832
default: 'false'
2933
workflow_dispatch:
3034
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
3147
kubernetes_versions:
3248
description: 'Kubernetes version'
3349
type: choice
3450
options:
35-
- "['1.29']"
3651
- "['1.30']"
3752
- "['1.31']"
38-
default: "['1.31']"
53+
- "['1.32']"
54+
default: "['1.32']"
3955
install_profile:
4056
description: APL installation profile
4157
default: minimal-with-team
@@ -198,7 +214,7 @@ jobs:
198214
--region nl-ams \
199215
--k8s_version ${{ env.LINODE_K8S_VERSION }} \
200216
--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 \
202218
--node_pools.autoscaler.enabled true \
203219
--node_pools.autoscaler.max 3 \
204220
--node_pools.autoscaler.min 3 \
@@ -223,24 +239,15 @@ jobs:
223239
224240
sleep 30
225241
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
227243
if: ${{ inputs.install_profile != 'no-apl' }}
228244
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
244251
echo LINODE_CLUSTER_CONTEXT=`kubectl config current-context` >> $GITHUB_ENV
245252
- name: Create image pull secret on test cluster
246253
if: ${{ inputs.install_profile != 'no-apl' }}

0 commit comments

Comments
 (0)