Skip to content

Commit

Permalink
Update to CNI 1.2.0 (#146)
Browse files Browse the repository at this point in the history
* bump to cni 1.2.0 for k8s 1.27

* bump golang and script name to match upstream

* Build CNI with same golang as upstream (1.17)

* Test with juju 3.1 and python 3.10

* Use python-libjuju 3.1

---------

Co-authored-by: Kevin W Monroe <[email protected]>
  • Loading branch information
George Kraft and kwmonroe authored Aug 7, 2023
1 parent f4248b4 commit 1b2dc40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: vsphere
juju-channel: 3.1/stable
credentials-yaml: ${{ secrets.CREDENTIALS_YAML }}
clouds-yaml: ${{ secrets.CLOUDS_YAML }}
bootstrap-constraints: "arch=amd64 cores=2 mem=4G"
bootstrap-options: "${{ secrets.JAMMY_BOOTSTRAP_OPTIONS }} --model-default datastore=vsanDatastore --model-default primary-network=VLAN_2763"
- name: Run test
run: tox -e integration
run: tox -e integration -- --basetemp=/home/ubuntu/pytest
6 changes: 3 additions & 3 deletions build-cni-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eux
# When changing CNI_VERSION, it should be updated in both
# charm-kubernetes-control-plane/build-cni-resources.sh and
# charm-kubernetes-worker/build-cni-resources.sh
CNI_VERSION="${CNI_VERSION:-v0.7.5}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
ARCH="${ARCH:-amd64 arm64 s390x}"

build_script_commit="$(git show --oneline -q)"
Expand All @@ -29,8 +29,8 @@ mkdir "$temp_dir"
-e GOOS=linux \
-e GOARCH="$arch" \
-v "$temp_dir"/cni-plugins:/cni \
golang:1.15 \
/bin/bash -c "cd /cni && ./build.sh && chown -R ${USER_ID}:${GROUP_ID} /cni"
golang:1.17 \
/bin/bash -c "cd /cni && ./build_linux.sh && chown -R ${USER_ID}:${GROUP_ID} /cni"

(cd cni-plugins/bin
echo "cni-$arch $CNI_VERSION" >> BUILD_INFO
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ deps =
pytest
pytest-operator
ipdb
juju < 3.1
juju
commands = pytest --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {toxinidir}/tests/integration

[testenv:lint]
Expand Down

0 comments on commit 1b2dc40

Please sign in to comment.