Skip to content

Commit

Permalink
ci: update juju to 3.1 and microk8s to 1.25 (#169)
Browse files Browse the repository at this point in the history
* ci: update juju to 3.1 and microk8s to 1.25
* fix: remove charm requirements from tox
* fix: add lightkube to integration requirements
* fix: deploy knative operator then serving fixes #172
  • Loading branch information
NohaIhab authored Sep 19, 2023
1 parent 44a6484 commit e373df8
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 32 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ jobs:
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
channel: 1.24/stable
# Pinned until this bug is resolved: https://bugs.launchpad.net/juju/+bug/1992833
bootstrap-options: "--agent-version=2.9.34"
channel: 1.25-strict/stable
juju-channel: 3.1/stable
microk8s-addons: "dns storage rbac metallb:10.64.140.43-10.64.140.49"
charmcraft-channel: latest/candidate
- run: |
Expand Down
4 changes: 3 additions & 1 deletion charms/kserve-controller/requirements-integration.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
aiohttp
jinja2
juju==2.9.44
# Pinning to <4.0 due to compatibility with the 3.1 controller version
juju<4.0
lightkube
pytest-operator
requests
tenacity
70 changes: 45 additions & 25 deletions charms/kserve-controller/requirements-integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ aiohttp==3.8.5
# via -r requirements-integration.in
aiosignal==1.3.1
# via aiohttp
asttokens==2.2.1
anyio==4.0.0
# via httpcore
asttokens==2.4.0
# via stack-data
async-timeout==4.0.2
async-timeout==4.0.3
# via aiohttp
attrs==23.1.0
# via aiohttp
Expand All @@ -22,6 +24,8 @@ cachetools==5.3.1
# via google-auth
certifi==2023.7.22
# via
# httpcore
# httpx
# kubernetes
# requests
cffi==1.15.1
Expand All @@ -32,24 +36,36 @@ charset-normalizer==3.2.0
# via
# aiohttp
# requests
cryptography==41.0.2
cryptography==41.0.3
# via paramiko
decorator==5.1.1
# via
# ipdb
# ipython
exceptiongroup==1.1.2
# via pytest
exceptiongroup==1.1.3
# via
# anyio
# pytest
executing==1.2.0
# via stack-data
frozenlist==1.4.0
# via
# aiohttp
# aiosignal
google-auth==2.22.0
google-auth==2.23.0
# via kubernetes
h11==0.14.0
# via httpcore
httpcore==0.18.0
# via httpx
httpx==0.25.0
# via lightkube
hvac==1.2.1
# via juju
idna==3.4
# via
# anyio
# httpx
# requests
# yarl
iniconfig==2.0.0
Expand All @@ -64,18 +80,18 @@ jinja2==3.1.2
# via
# -r requirements-integration.in
# pytest-operator
juju==2.9.44.0
juju==3.2.2
# via
# -r requirements-integration.in
# pytest-operator
jujubundlelib==0.5.7
# via theblues
kubernetes==27.2.0
# via juju
lightkube==0.14.0
# via -r requirements-integration.in
lightkube-models==1.28.1.4
# via lightkube
macaroonbakery==1.3.1
# via
# juju
# theblues
# via juju
markupsafe==2.1.3
# via jinja2
matplotlib-inline==0.1.6
Expand All @@ -100,7 +116,7 @@ pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pluggy==1.2.0
pluggy==1.3.0
# via pytest
prompt-toolkit==3.0.39
# via ipython
Expand All @@ -119,8 +135,10 @@ pyasn1-modules==0.3.0
# via google-auth
pycparser==2.21
# via cffi
pygments==2.15.1
pygments==2.16.1
# via ipython
pyhcl==0.4.5
# via hvac
pymacaroons==0.13.0
# via macaroonbakery
pynacl==1.5.0
Expand All @@ -132,50 +150,52 @@ pyrfc3339==1.1
# via
# juju
# macaroonbakery
pytest==7.4.0
pytest==7.4.2
# via
# pytest-asyncio
# pytest-operator
pytest-asyncio==0.21.1
# via pytest-operator
pytest-operator==0.28.0
pytest-operator==0.29.0
# via -r requirements-integration.in
python-dateutil==2.8.2
# via kubernetes
pytz==2023.3
pytz==2023.3.post1
# via pyrfc3339
pyyaml==6.0.1
# via
# juju
# jujubundlelib
# kubernetes
# lightkube
# pytest-operator
requests==2.31.0
# via
# -r requirements-integration.in
# hvac
# kubernetes
# macaroonbakery
# requests-oauthlib
# theblues
requests-oauthlib==1.3.1
# via kubernetes
rsa==4.9
# via google-auth
six==1.16.0
# via
# asttokens
# google-auth
# kubernetes
# macaroonbakery
# paramiko
# pymacaroons
# python-dateutil
sniffio==1.3.0
# via
# anyio
# httpcore
# httpx
stack-data==0.6.2
# via ipython
tenacity==8.2.2
tenacity==8.2.3
# via -r requirements-integration.in
theblues==0.5.2
# via juju
tomli==2.0.1
# via
# ipdb
Expand All @@ -199,9 +219,9 @@ urllib3==1.26.16
# requests
wcwidth==0.2.6
# via prompt-toolkit
websocket-client==1.6.1
websocket-client==1.6.3
# via kubernetes
websockets==7.0
websockets==8.1
# via juju
yarl==1.9.2
# via aiohttp
15 changes: 13 additions & 2 deletions charms/kserve-controller/tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,23 @@ async def test_deploy_knative_dependencies(ops_test: OpsTest):
# Deploy knative for serverless mode
namespace = ops_test.model_name

# Deploy knative-operators
# Deploy knative-operator
await ops_test.model.deploy(
"knative-operator",
channel=KNATIVE_VERSION,
trust=True,
)

# Wait for idle knative-operator before deploying knative-serving
# due to issue https://github.com/canonical/knative-operators/issues/156
await ops_test.model.wait_for_idle(
["knative-operator"],
status="active",
raise_on_blocked=False,
timeout=90 * 10,
)

# Deploy knative-serving
await ops_test.model.deploy(
"knative-serving",
channel=KNATIVE_VERSION,
Expand All @@ -201,7 +212,7 @@ async def test_deploy_knative_dependencies(ops_test: OpsTest):
trust=True,
)
await ops_test.model.wait_for_idle(
["knative-operator", "knative-serving"],
["knative-serving"],
raise_on_blocked=False,
status="active",
timeout=90 * 10,
Expand Down
1 change: 0 additions & 1 deletion charms/kserve-controller/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ commands =
description = Run integration tests
deps =
-r{toxinidir}/requirements-integration.txt
-r{toxinidir}/requirements.txt
commands =
pytest -v --tb native --ignore={[vars]tst_path}unit --log-cli-level=INFO -s {posargs}

0 comments on commit e373df8

Please sign in to comment.