Skip to content

TheLunarCompany/terraform-kubernetes-lunar-mcpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunar MCPX Terraform Module

This Terraform module deploys the Lunar MCPX application onto a Kubernetes cluster, providing a straightforward, ready-to-use deployment solution.


Usage

  • To customize deployment variables, including MCPX configuration files (app.yaml, mcp.json), refer to basic example.

Features

  • Customizable readiness and liveness probes
  • Optional metrics collection with Prometheus annotations
  • Resource allocation controls (CPU/memory)
  • External secrets via secret_ref
  • Integration with control plane
  • Optional Docker-in-Docker support

Requirements

Providers

Name Version
kubernetes >= 2.30

Inputs

Name Description Type Default Required
app_config App configuration. Contents of this variable will be used to create 'app.yaml' configuration any
{
"auth": {
"enabled": false
},
"permissions": {
"base": "allow"
},
"toolExtensions": {
"services": {}
}
}
no
control_plane Control plane configuration
object({
host = string
streaming = object({
enabled = bool
})
rest = object({
enabled = bool
})
})
{
"host": "",
"rest": {
"enabled": false
},
"streaming": {
"enabled": false
}
}
no
docker_in_docker_enabled Enable Docker-in-Docker bool false no
healthcheck_path Health check path string "/healthcheck" no
image_pull_policy Image pull policy string "IfNotPresent" no
image_repository Container image repository string "us-central1-docker.pkg.dev/prj-common-442813/mcpx/mcpx" no
image_tag Container image tag string "0.1.6" no
liveness_probe Liveness probe configuration
object({
enabled = bool
initial_delay_seconds = number
period_seconds = number
timeout_seconds = number
failure_threshold = number
})
{
"enabled": true,
"failure_threshold": 3,
"initial_delay_seconds": 10,
"period_seconds": 10,
"timeout_seconds": 1
}
no
log_level Log level string "info" no
mcp_target_servers_config MCP configuration. Contents of this variable will be used to create 'mcp.json' configuration any
{
"mcpServers": {
"time": {
"args": [
"mcp-server-time",
"--local-timezone=America/New_York"
],
"command": "uvx"
}
}
}
no
metrics_enabled Enable metrics collection bool true no
metrics_port Metrics port number 3000 no
name Name of the deployment string "lunar-mcpx" no
namespace Kubernetes namespace string "default" no
readiness_probe Readiness probe configuration
object({
enabled = bool
initial_delay_seconds = number
period_seconds = number
timeout_seconds = number
failure_threshold = number
success_threshold = number
})
{
"enabled": true,
"failure_threshold": 3,
"initial_delay_seconds": 5,
"period_seconds": 5,
"success_threshold": 1,
"timeout_seconds": 1
}
no
replica_count Number of replicas number 1 no
resources Resource limits and requests
object({
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
})
{
"limits": {
"cpu": "500m",
"memory": "264Mi"
},
"requests": {
"cpu": "250m",
"memory": "128Mi"
}
}
no
secret_ref Secret reference configuration
object({
name = string
keys = list(string)
})
{
"keys": [],
"name": ""
}
no
service_port Service port number 9000 no
service_type Kubernetes service type string "LoadBalancer" no

Outputs

Name Description
config_map_name Name of the Kubernetes ConfigMap
deployment_name Name of the Kubernetes deployment
metrics_port Metrics port (if enabled)
namespace Kubernetes namespace
service_name Name of the Kubernetes service
service_port Service port

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages