@startuml
skinparam componentStyle rectangle

node "Kubernetes Cluster" {

  cloud "Service: oc-workflow" as oc_workflow_service {
    oc_workflow_service : Type: NodePort
    oc_workflow_service : External NodePort: 8088  # Exposed NodePort for external access
    oc_workflow_service : Internal TargetPort: 8080
  }

  ' Deployment for oc-workflow managing the pods
  node "Deployment: oc-workflow" as oc_workflow_deployment {
    oc_workflow_deployment : Replicas: {{ .Values.replicaCount }}
    oc_workflow_deployment : Image: registry.dev.svc.cluster.local:5000/oc-workflow:latest
    oc_workflow_deployment : PullPolicy: IfNotPresent
    oc_workflow_deployment : TargetPort: 8080

    node "Pod: oc-workflow-1" as workflow_1 {
      component "Container: oc-workflow" as oc_workflow_container1 {
        oc_workflow_container1 : Internal Port: 8080
        oc_workflow_container1 : MONGO_DATABASE=DC_myDC
        oc_workflow_container1 : MONGO_URI=mongodb://mongo:27017
      }
    }
  }

  oc_workflow_service --> oc_workflow_deployment : Routes traffic to Deployment
  oc_workflow_deployment --> workflow_1 : Manages Pods

  ' MongoDB service and statefulset

  cloud "Service: mongo" as mongo_service {
    mongo_service : Type: ClusterIP
    mongo_service : Internal Port: 27017
  }

  workflow_1 --> mongo_service : Connects to MongoDB

}
@enduml