Skip to content

Commit

Permalink
test a newer version of k8s
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <[email protected]>
  • Loading branch information
NikitaSkrynnik committed Aug 8, 2024
1 parent f32aa27 commit ed32642
Show file tree
Hide file tree
Showing 2 changed files with 848 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,32 @@ jobs:
- name: Setup cluster
working-directory: ${{ github.repository }}
run: |
GKE_K8S_VERSION=$(echo ${{ vars.NSM_KUBERNETES_VERSION }} | cut -c 2-)
GKE_K8S_VERSION=$(echo ${{ vars.NSM_KUBERNETES_VERSION }} | cut -d '.' -f 1,2 | cut -c 2-)
echo $GKE_K8S_VERSION
GKE_K8S_VERSION=1.28
gcloud components install gke-gcloud-auth-plugin
gcloud components update
gke_cluster_version=$(gcloud container get-server-config --zone=$GKE_CLUSTER_ZONE \
| jq '.channels[] | select (.channel=="REGULAR") | .validVersions[]' \
| grep -m 1 "$GKE_K8S_VERSION")
gcloud container clusters create "${GKE_CLUSTER_NAME}" \
--project="${GKE_PROJECT_ID}" \
--machine-type="${GKE_CLUSTER_TYPE}" \
--num-nodes="${GKE_CLUSTER_NUM_NODES}" \
--zone="${GKE_CLUSTER_ZONE}" \
--cluster-version="${GKE_K8S_VERSION}" \
--cluster-version=$gke_cluster_version \
--enable-gvnic -q
gcloud components list
echo "Writing config to ${KUBECONFIG}"
gcloud container clusters get-credentials "${GKE_CLUSTER_NAME}" --project="${GKE_PROJECT_ID}" --zone="${GKE_CLUSTER_ZONE}"
gcloud components list
env:
GKE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}
GKE_CLUSTER_NAME: gke-${{ github.run_id }}-${{ github.run_number }}
Expand Down
Loading

0 comments on commit ed32642

Please sign in to comment.