Skip to content

Commit

Permalink
feat: add support for istio 1.21.2 (#428)
Browse files Browse the repository at this point in the history
This commit adds support for istio operators 1.21.2.

Part of #413
  • Loading branch information
DnPlas authored Jun 5, 2024
1 parent 3ca17a6 commit 6103d11
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charms/istio-gateway/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ options:
description: |
Type of service for the ingress gateway out of: 'ClusterIP', 'LoadBalancer', or 'NodePort'.
proxy-image:
default: 'docker.io/istio/proxyv2:1.17.3'
default: 'docker.io/istio/proxyv2:1.21.2'
description: Istio Proxy image
type: string
2 changes: 1 addition & 1 deletion charms/istio-gateway/tests/unit/data/egress-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
value: standard
- name: ISTIO_META_CLUSTER_ID
value: Kubernetes
image: docker.io/istio/proxyv2:1.17.3
image: docker.io/istio/proxyv2:1.21.2
name: istio-proxy
ports:
- containerPort: 15021
Expand Down
2 changes: 1 addition & 1 deletion charms/istio-gateway/tests/unit/data/ingress-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
value: standard
- name: ISTIO_META_CLUSTER_ID
value: Kubernetes
image: docker.io/istio/proxyv2:1.17.3
image: docker.io/istio/proxyv2:1.21.2
name: istio-proxy
ports:
- containerPort: 15021
Expand Down
2 changes: 1 addition & 1 deletion charms/istio-pilot/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ parts:
build-packages: [git, rustc, cargo, libffi-dev, libssl-dev, pkg-config]
istioctl:
plugin: dump
source: https://github.com/istio/istio/releases/download/1.17.3/istioctl-1.17.3-linux-amd64.tar.gz
source: https://github.com/istio/istio/releases/download/1.21.2/istioctl-1.21.2-linux-amd64.tar.gz
source-type: tar
2 changes: 1 addition & 1 deletion charms/istio-pilot/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ options:
image-configuration:
default: |
pilot-image: 'pilot' # values.pilot.image
global-tag: '1.17.3' # values.global.tag
global-tag: '1.21.2' # values.global.tag
global-hub: 'docker.io/istio' # values.global.hub
global-proxy-image: 'proxyv2' # values.global.proxy.image
global-proxy-init-image: 'proxyv2' # values.global.proxy_init.image
Expand Down
1 change: 0 additions & 1 deletion charms/istio-pilot/src/istioctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def remove(self):
subprocess.check_call(
[
self._istioctl_path,
"x",
"uninstall",
"--purge",
"-y",
Expand Down
4 changes: 3 additions & 1 deletion charms/istio-pilot/tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,8 @@ def test_upgrade_successful(
harness.charm.upgrade_charm("mock_event")

# Assert that the upgrade was successful
image_config = yaml.safe_load(harness.model.config["image-configuration"])
pilot_image_tag = image_config["global-tag"]
mocked_istioctl_class.assert_called_with(
"./istioctl",
model_name,
Expand All @@ -1365,7 +1367,7 @@ def test_upgrade_successful(
"--set",
"values.pilot.image=pilot",
"--set",
"values.global.tag=1.17.3",
f"values.global.tag={pilot_image_tag}",
"--set",
"values.global.hub=docker.io/istio",
"--set",
Expand Down
2 changes: 1 addition & 1 deletion charms/istio-pilot/tests/unit/test_istioctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_istioctl_remove(mocked_check_call):

ictl.remove()

mocked_check_call.assert_called_once_with([ISTIOCTL_BINARY, "x", "uninstall", "--purge", "-y"])
mocked_check_call.assert_called_once_with([ISTIOCTL_BINARY, "uninstall", "--purge", "-y"])


def test_istioctl_remove_error(mocked_check_call_failing):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

ISTIO_PILOT = "istio-pilot"
ISTIO_GATEWAY_APP_NAME = "istio-ingressgateway"

ISTIO_RELEASE = "release-1.21"
USERNAME = "user123"
PASSWORD = "user123"

Expand Down Expand Up @@ -156,7 +156,7 @@ async def test_gateway_info_relation(ops_test: OpsTest):

@pytest.mark.abort_on_fail
async def test_deploy_bookinfo_example(ops_test: OpsTest):
root_url = "https://raw.githubusercontent.com/istio/istio/release-1.11/samples/bookinfo"
root_url = f"https://raw.githubusercontent.com/istio/istio/{ISTIO_RELEASE}/samples/bookinfo"
bookinfo_namespace = f"{ops_test.model_name}-bookinfo"

await ops_test.run(
Expand Down

0 comments on commit 6103d11

Please sign in to comment.