You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens if a requirer charm application would like to use multiple istio-ingress-k8s charms to expose services.
If a requirer charm integrates with multiple istio-ingress-k8s charms, the istio-ingress-k8s charms will apply changes to a single HTTPRoute. This will lead to conflict errors in the istio-ingress-k8s charms.
From what I understand, it is supposed to create multiple HTTPRoutes referenced by different gateways.
unit-istio-ingress-admin-0: 19:31:05 INFO unit.istio-ingress-admin/0.juju-log ingress:24: Applying resources
unit-istio-ingress-admin-0: 19:31:05 INFO unit.istio-ingress-admin/0.juju-log ingress:24: HTTP Request: PATCH https://10.152.183.1/apis/gateway.networking.k8s.io/v1/namespaces/test/httproutes/hydra-http?fieldManager=istio-ingress-admin "HTTP/1.1 409 Conflict"
unit-istio-ingress-admin-0: 19:31:05 ERROR unit.istio-ingress-admin/0.juju-log ingress:24: Uncaught exception whilein charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/generic_client.py", line 232, in raise_for_status
resp.raise_for_status()
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/httpx/_models.py", line 763, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '409 Conflict'for url 'https://10.152.183.1/apis/gateway.networking.k8s.io/v1/namespaces/test/httproutes/hydra-http?fieldManager=istio-ingress-admin'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/./src/charm.py", line 684, in<module>
main(IstioIngressCharm)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/main.py", line 45, in main
return _main.main(charm_class=charm_class, use_juju_for_storage=use_juju_for_storage)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/_main.py", line 543, in main
manager.run()
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/_main.py", line 529, in run
self._emit()
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/_main.py", line 518, in _emit
_emit_charm_event(self.charm, self.dispatcher.event_name, self._juju_context)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/_main.py", line 134, in _emit_charm_event
event_to_emit.emit(*args, **kwargs)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 347, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 857, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 947, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/lib/charms/traefik_k8s/v2/ingress.py", line 461, in _handle_relation
self.on.data_provided.emit( # type: ignore
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 347, in emit
framework._emit(event)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 857, in _emit
self._reemit(event_path)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/ops/framework.py", line 947, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/./src/charm.py", line 234, in _on_ingress_data_provided
self._sync_all_resources()
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/./src/charm.py", line 478, in _sync_all_resources
self._sync_ingress_resources()
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/./src/charm.py", line 580, in _sync_ingress_resources
krm.reconcile(current_ingresses)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube_extensions/batch/_kubernetes_resource_manager.py", line 179, in reconcile
self.apply(resources=resources, force=force)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube_extensions/batch/_kubernetes_resource_manager.py", line 102, in apply
apply_many(
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube_extensions/batch/_many.py", line 70, in apply_many
returns[i] = client.apply(
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/client.py", line 754, in apply
return self.patch(
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/client.py", line 489, in patch
return self._client.request(
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/generic_client.py", line 308, in request
return self.handle_response(method, resp, br)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/generic_client.py", line 248, in handle_response
self.raise_for_status(resp)
File "/var/lib/juju/agents/unit-istio-ingress-admin-0/charm/venv/lightkube/core/generic_client.py", line 234, in raise_for_status
raise transform_exception(e)
lightkube.core.exceptions.ApiError: Apply failed with 3 conflicts: conflicts with "istio-ingress-public":
- .metadata.labels.app.kubernetes.io/instance
- .spec.parentRefs
- .spec.rules
The text was updated successfully, but these errors were encountered:
Bug Description
This happens if a requirer charm application would like to use multiple istio-ingress-k8s charms to expose services.
If a requirer charm integrates with multiple istio-ingress-k8s charms, the istio-ingress-k8s charms will apply changes to a single HTTPRoute. This will lead to conflict errors in the istio-ingress-k8s charms.
From what I understand, it is supposed to create multiple HTTPRoutes referenced by different gateways.
Please see more details below.
cc @shipperizer
To Reproduce
Environment
microk8s: v1.27.16
istio-ingress-k8s channel: edge
Relevant log output
The text was updated successfully, but these errors were encountered: