Skip to content

Commit ab7b631

Browse files
authored
ci: update workflow to support k8s 1.32 and wait for kubeconfig (#1943)
1 parent d0fb19c commit ab7b631

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

.github/workflows/integration.yml

+9-18
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ on:
3232
description: 'Kubernetes version'
3333
type: choice
3434
options:
35-
- "['1.29']"
3635
- "['1.30']"
3736
- "['1.31']"
38-
default: "['1.31']"
37+
- "['1.32']"
38+
default: "['1.32']"
3939
install_profile:
4040
description: APL installation profile
4141
default: minimal-with-team
@@ -223,24 +223,15 @@ jobs:
223223
224224
sleep 30
225225
done
226-
- name: Save kubectl config with auth token and Get kubectl environment and create docker secret
226+
- name: Save kubectl config with auth token
227227
if: ${{ inputs.install_profile != 'no-apl' }}
228228
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"
229+
echo "Waiting for kubeconfig..."
230+
while :; do
231+
linode-cli get-kubeconfig --label "${{ env.LINODE_CLUSTER_NAME }}" 2> /dev/null && break
232+
echo "still waiting..."
233+
sleep 10
234+
done
244235
echo LINODE_CLUSTER_CONTEXT=`kubectl config current-context` >> $GITHUB_ENV
245236
- name: Create image pull secret on test cluster
246237
if: ${{ inputs.install_profile != 'no-apl' }}

0 commit comments

Comments
 (0)