How opswat/metadefender-k8s works
Main Components
• Infrastructure Provisioning: Represent Terraform modules that span different cloud providers (AWS, Azure, GCloud). These modules include:
• EKS cluster (or equivalent Kubernetes offerings)
• Database provisioning (e.g., aws_rds_postgres_module for Postgres)
• Cloud-functions for Azure (webhook notifications) located under terraform/CloudFunctions.
• Kubernetes Cluster Components: Inside the cluster the deployment is handled via multiple Helm charts:
• “mdcore” chart for MetaDefender Core
• “mdss” chart for MetaDefender Storage Security
• “mdssc” chart (and possibly others) for additional modules
• “icap” chart for the ICAP-related components and the associated ingress configurations (see the separate icap_ingress directory).
• Supporting Scripts and Workflows: Include example scripts and GitHub workflows that automate the CI/CD as well as provider-specific installation scenarios.
• External Integrations: If shown, external services like cloud functions (Azure webhook notifications) and any external ingress controller (provided by icap_ingress configurations).
Relationships and Interactions
• Inside the cluster, show the deployment segmentation:
• How the Helm charts deploy various components such as Deployments, Services, Ingresses, and CronJobs.
• Ingress pathway by connecting the “icap_ingress” configuration to frontend exposure of services; this shows how incoming traffic might be routed to the respective internal services.
• Example scripts (under example_scripts) to both the provisioning (script-based installation) and the Kubernetes components (configurations like HPA, role-binding, autoscalers) to show they are used to fine-tune deployment on the cluster.
Architectural Patterns and Design Principles
• Infrastructure as Code (IaC): Highlight the Terraform modules and configuration files that provide a repeatable and scalable method to provision cloud resources.
• Declarative Deployment: Stress that Helm charts are used to declaratively manage Kubernetes deployments, configurations and secrets.
• CI/CD Integration: Show the use of GitHub Actions for automating deployments and checks.