Skip to content

Commit

Permalink
Merge pull request #397 from networkservicemesh/update_clusterapi
Browse files Browse the repository at this point in the history
Update clusterapi
  • Loading branch information
denis-tingaikin authored Mar 11, 2024
2 parents c40676d + 3c4e35c commit d34e91d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,41 @@ jobs:
- name: Set up /bin permissions
run: |
sudo chmod -R 777 /bin
- name: Install metal CLI
run: |
curl -L https://github.com/equinix/metal-cli/releases/download/v0.22.0/metal-linux-amd64 -o metal
chmod +x ./metal
mv ./metal /usr/local/bin/metal
metal -v
- name: Set envs
run: |
id=${{ matrix.CNI }}-${{ github.run_number }}
echo METRO=ny >> $GITHUB_ENV
if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then
id=calico-${{ github.run_number }}
echo METRO=at >> $GITHUB_ENV
fi
echo CLUSTER_NAME=nsm-ci-${id} >> $GITHUB_ENV
echo SSH_KEY=nsm-ssh-${id} >> $GITHUB_ENV
- name: Find metro
run: |
metros_to_check=da,ny
if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then
metros_to_check=at,ch
fi
METRO=$(metal capacity check -m ${metros_to_check} -P n3.xlarge.x86 -q 2 -o json | jq -r '[.[] | select( .available == true ) | .metro][0]')
if [ ${METRO} == "null" ]; then
exit 1;
fi
echo METRO=${METRO} >> $GITHUB_ENV
env:
METAL_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}

- name: Set up go
uses: actions/setup-go@v1
with:
go-version: 1.20.5
go-version: 1.20.11
- name: Checkout files
uses: actions/checkout@v2
with:
Expand All @@ -70,24 +91,11 @@ jobs:
- name: Install clusterctl
run: |
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-linux-amd64 -o clusterctl
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.2/clusterctl-linux-amd64 -o clusterctl
chmod +x ./clusterctl
mv ./clusterctl /usr/local/bin/clusterctl
clusterctl version
- name: Install metal CLI
run: |
curl -L https://github.com/equinix/metal-cli/releases/download/v0.16.0/metal-linux-amd64 -o metal
chmod +x ./metal
mv ./metal /usr/local/bin/metal
metal -v
- name: Checkout deployments
uses: actions/checkout@v2
with:
repository: networkservicemesh/deployments-k8s
path: networkservicemesh/deployments-k8s

- name: Setup ssh
working-directory: ${{ github.repository }}
id: setup_ssh
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/networkservicemesh/integration-k8s-packet
go 1.20

require (
github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb
github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719
github.com/stretchr/testify v1.8.4
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc h1:1L/OisEFsOyhwaqeJpYmM1nlJ2dBusUMiszPDBlUip0=
github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc/go.mod h1:8EWnekTRNX+NxBdTFE24WqUoM7SgJHbiafDBrIIdOmQ=
github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb h1:1Z/rGrtqBRLhAqj8dhx71hChCdBPxRb0gzMgfUfgUP8=
github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb/go.mod h1:WLpOEldvahZQkJSdU3kspIS4tB1x1hDnWP08B/nCTjM=
github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719 h1:0TlXNQ7skuAE0QtSgmIfwEO2FCOkvLk7maSJvlxhn94=
github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719/go.mod h1:WLpOEldvahZQkJSdU3kspIS4tB1x1hDnWP08B/nCTjM=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ source scripts/include/wait-pids.sh
source scripts/include/wait-start.sh

## Run clusterctl
clusterctl init --infrastructure packet:v0.7.2 || exit 1
clusterctl init --infrastructure packet:v0.8.0 || exit 1
clusterctl generate cluster ${CLUSTER_NAME} \
--kubernetes-version ${KUBERNETES_VERSION} \
--control-plane-machine-count=1 \
Expand Down

0 comments on commit d34e91d

Please sign in to comment.