feat: COS-Dev mesh pt.1#343
Conversation
adhityaravi
left a comment
There was a problem hiding this comment.
First pass - we need to add the istio-k8s charm into the deployment which seems to be missing at the moment. It probably needs to be in its own model istio-system
|
@adhityaravi I would argue that this does not belong in our product, rather deployed separately. Similar to what we do with external-ca model in our itests for external-tls: However, this is up for debate because the CC008 spec does impose anything on us. I guess the question is: could COS operate without
make sense. Ref link |
Issue
COS-Dev lacked support for a service mesh (Istio) as an alternative networking layer. Users who want mTLS and cross-model relay (CMR) mesh connectivity in COS-Dev had no way to enable it.
Solution
This PR adds initial service mesh support to the COS-Dev Terraform module using Istio (
istio-beacon-k8sandistio-ingress-k8s). It is the foundational layer that:subsequently refactors the API on top of.
What's added
mesh_enabledvariable — a boolean flag (defaultfalse) that gates all mesh-related resources. A validation rule preventsmesh_enabledandinternal_tlsfrom both beingtrue.module "istio-ingress"andmodule "istio-beacon"are conditionally deployed whenmesh_enabled = true.juju_integration.istio_ingress,juju_integration.grafana_istio_ingress, andjuju_integration.istio_ingress_routemirror the existing Traefik ingress integrations but route through Istio. They are mutually exclusive with the Traefik integrations (guarded by!var.mesh_enabledon the Traefik side).juju_integration.istio_beaconwires theistio-beaconcharm'sservice_meshendpoint to all seven COS components (Alertmanager, Catalogue, Grafana, Loki, Mimir, OpenTelemetry Collector, Tempo).provide_cmr_meshandrequire_cmr_meshendpoints are exposed for all components, enabling cross-model mesh connectivity.Testing Instructions
Run the Terraform tests:
The new
mesh_enabled.tftest.hcltest file validates:internal_tls = false(Istio modules and 7 beacon integrations deployed).mesh_enabled = trueandinternal_tls = true.