Skip to content

Commit

Permalink
Merge pull request #421 from networkservicemesh/use-envs-new
Browse files Browse the repository at this point in the history
Use KUBERNETES_VERSION variable to set k8s cluster version
  • Loading branch information
denis-tingaikin authored Aug 14, 2024
2 parents c92a4e9 + 3fc11f3 commit ade0fe6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,25 @@ jobs:
mv /tmp/eksctl /usr/local/bin
eksctl version
curl -o aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.6.22/aws-iam-authenticator_0.6.22_$(uname -s)_amd64
chmod 755 aws-iam-authenticator
mv ./aws-iam-authenticator /usr/local/bin
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.6/bin/linux/amd64/kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/${{ vars.NSM_KUBERNETES_VERSION }}/bin/linux/amd64/kubectl
chmod +x kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl
kubectl version --client
- name: Create clusters
working-directory: ${{ github.repository }}
run: |
AWS_K8S_VERSION=$(echo ${{ vars.NSM_KUBERNETES_VERSION }} | cut -d '.' -f 1,2 | cut -c 2-)
sed -i "s/NSM_CLUSTER_NAME/$AWS_CLUSTER_NAME/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_REGION/$AWS_REGION/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_NODEGROUPS_NAME/$AWS_CLUSTER_NAME-workers/g" aws-${{ matrix.ip_family }}.yaml
sed -i "s/NSM_K8S_VERSION/\"$AWS_K8S_VERSION\"/g" aws-${{ matrix.ip_family }}.yaml
eksctl create cluster -f aws-${{ matrix.ip_family }}.yaml
kubectl get pods -A -o wide
kubectl version
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion aws-ipv4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ClusterConfig
metadata:
name: NSM_CLUSTER_NAME
region: NSM_REGION
version: "1.27"
version: NSM_K8S_VERSION

kubernetesNetworkConfig:
ipFamily: IPv4
Expand Down
2 changes: 1 addition & 1 deletion aws-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ClusterConfig
metadata:
name: NSM_CLUSTER_NAME
region: NSM_REGION
version: "1.27"
version: NSM_K8S_VERSION

kubernetesNetworkConfig:
ipFamily: IPv6
Expand Down

0 comments on commit ade0fe6

Please sign in to comment.