From 3bbd29b47aece9ee59c808a21ce1ec38e8853eea Mon Sep 17 00:00:00 2001 From: Waldemar Date: Tue, 1 Apr 2025 09:59:19 +0200 Subject: [PATCH] More tweaks to architecture diagrams --- likec4/deployment.c4 | 64 ++++++++++++++++++++++++++++++++++++++------ likec4/model.c4 | 36 ++++++++++++++----------- likec4/spec.c4 | 9 +++---- 3 files changed, 80 insertions(+), 29 deletions(-) diff --git a/likec4/deployment.c4 b/likec4/deployment.c4 index 655514e..36ea8a6 100644 --- a/likec4/deployment.c4 +++ b/likec4/deployment.c4 @@ -1,18 +1,66 @@ // Deployment model deployment { - node customerNode { - instanceOf developer - } - environment local 'Local' { technology 'Kind' icon tech:kubernetes - instanceOf edp.ui - instanceOf edp.forgejo - instanceOf edp.keycloak - instanceOf edp.crossplane + namespace backstage { + instanceOf edp.ui.backstage + instanceOf edp.ui.database + } + + namespace gitea { + instanceOf edp.forgejo.forgejo + instanceOf edp.forgejo.forgejoRunner + } + + namespace keycloak { + instanceOf edp.keycloak.keycloak + instanceOf edp.keycloak.keycloakDB + } + + namespace crossplane 'crossplane-system' { + instanceOf edp.crossplane.crossplane + instanceOf edp.crossplane.crossplaneFunction + instanceOf edp.crossplane.crossplaneRbacManager + instanceOf edp.crossplane.providerArgoCD + instanceOf edp.crossplane.providerKind + instanceOf edp.crossplane.providerShell + } + + namespace externalSecrets 'external-secrets' { + instanceOf edp.externalSecrets.certController + instanceOf edp.externalSecrets.externalSecrets + instanceOf edp.externalSecrets.webhook + } + + namespace velero { + instanceOf edp.velero.velero + } + + namespace minio 'minio-backup' { + instanceOf edp.minio.minio + } + + namespace monitoring { + instanceOf edp.monitoring.alloy + instanceOf edp.monitoring.distributor + instanceOf edp.monitoring.gateway + instanceOf edp.monitoring.ingestor + instanceOf edp.monitoring.loki + instanceOf edp.monitoring.querier + instanceOf edp.monitoring.queryFrontend + } + + namespace ingressNginx 'ingress-nginx'{ + instanceOf edp.ingressNginx.ingressNginx + } + + namespace openbao { + instanceOf edp.openbao.openbao + instanceOf edp.openbao.agentInjector + } } } diff --git a/likec4/model.c4 b/likec4/model.c4 index c680d6e..e85b32f 100644 --- a/likec4/model.c4 +++ b/likec4/model.c4 @@ -6,7 +6,7 @@ model { edp = system 'EDP' { container ui 'Backstage' { - description 'Deeveloper Portal' + description 'Developer Portal' component backstage 'Backstage' { style { @@ -69,17 +69,18 @@ model { icon tech:java } - component database 'Database' { + component keycloakDB 'Database' { technology 'Postgresql' icon tech:postgresql style { shape storage } } - keycloak -> database 'reads/writes' + keycloak -> keycloakDB 'reads/writes' } container crossplane 'Crossplane' { + #internal description 'Declarative management of ressources' component crossplane 'Crossplane' @@ -91,11 +92,12 @@ model { } container externalSecrets 'external-secrets' { + #internal description 'Provider to access externally stored Kubernetes secrets' - internalComponent externalSecrets 'external-secrets controller' - internalComponent certController 'cert-controller' - internalComponent webhook 'webhook' + component externalSecrets 'external-secrets controller' + component certController 'cert-controller' + component webhook 'webhook' } container minio 'Minio' { @@ -110,6 +112,7 @@ model { } container velero 'Velero' { + #internal description 'Backup Kubernetes resources' component velero 'Velero' @@ -137,12 +140,14 @@ model { description 'Open Telemetry Collector' style { + icon tech:grafana multiple true } } container loki 'Loki' { description 'Log aggregation system' + icon tech:grafana component queryFrontend 'Query Frontend' component distributor 'Distributor' @@ -155,6 +160,7 @@ model { } container ingressNginx 'Ingress' { + #internal description 'Ingress Controller for incoming http(s) traffic' component ingressNginx 'ingress-nginx'{ @@ -162,13 +168,13 @@ model { icon tech:nginx } - ingressNginx -> forgejo 'Ingress' - ingressNginx -> keycloak 'Ingress' - ingressNginx -> openbao 'Ingress' - ingressNginx -> argocdServer 'Ingress' - ingressNginx -> backstage 'Ingress' - ingressNginx -> minio 'Ingress' - ingressNginx -> alloy 'Ingress' + ingressNginx -> forgejo.forgejo 'https' + ingressNginx -> keycloak.keycloak 'https' + ingressNginx -> openbao.openbao 'https' + ingressNginx -> argoCD.argocdServer 'https' + ingressNginx -> ui.backstage 'https' + ingressNginx -> minio.minio 'https' + ingressNginx -> monitoring.alloy 'https' } // UI requests data from the Backend @@ -192,13 +198,11 @@ views { title 'Context view' include * exclude ingressNginx -> + exclude element.tag = #internal style * { opacity 25% } - style developer { - color muted - } } view keycloak of keycloak { diff --git a/likec4/spec.c4 b/likec4/spec.c4 index 792c6e9..233c42f 100644 --- a/likec4/spec.c4 +++ b/likec4/spec.c4 @@ -20,9 +20,8 @@ specification { } deploymentNode node - deploymentNode environment { - style { - color gray - } - } + deploymentNode environment + deploymentNode namespace + + tag internal } \ No newline at end of file