- Added windows llama proxy
- Added terraform-mcp - Added S3 storage to gitea - Changed context size for windows LLMs - Changed number of cores for VMs, added P2000 support
This commit is contained in:
@@ -35,6 +35,7 @@ locals {
|
||||
SMTP_HOST = var.app_config.smtp_host
|
||||
SMTP_PORT = var.app_config.smtp_port
|
||||
SSH_SERVER_KEY_EXCHANGES = "mlkem768x25519-sha256"
|
||||
S3_STORAGE = var.app_config.s3_storage
|
||||
})
|
||||
config_checksum = sha256(local.config)
|
||||
}
|
||||
|
||||
@@ -37,8 +37,11 @@ OFFLINE_MODE = false
|
||||
SHELL = /bin/sh
|
||||
SSH_SERVER_KEY_EXCHANGES=${SSH_SERVER_KEY_EXCHANGES}
|
||||
|
||||
%{ if S3_STORAGE != "" ~}
|
||||
%{ else ~}
|
||||
[lfs]
|
||||
PATH = /data/git/lfs
|
||||
%{ endif }
|
||||
|
||||
[database]
|
||||
PATH = /data/gitea/gitea.db
|
||||
@@ -97,3 +100,8 @@ SMTP_PORT = ${SMTP_PORT}
|
||||
[openid]
|
||||
ENABLE_OPENID_SIGNIN = true
|
||||
ENABLE_OPENID_SIGNUP = false
|
||||
|
||||
%{ if S3_STORAGE != "" ~}
|
||||
[storage]
|
||||
${S3_STORAGE}
|
||||
%{ endif }
|
||||
|
||||
@@ -84,5 +84,6 @@ variable "app_config" {
|
||||
db_user = optional(string, "gitea")
|
||||
smtp_protocol = optional(string, "SMTPS")
|
||||
smtp_port = optional(string, "587")
|
||||
s3_storage = optional(string, "")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ locals {
|
||||
OVERWRITECLIURL = "https://${var.fqdn}"
|
||||
|
||||
# PHP
|
||||
PHP_MEMORY_LIMIT = "512M"
|
||||
PHP_MEMORY_LIMIT = "2048M"
|
||||
}, var.db_credentials_are_secrets ? {} : local.database_credentials)
|
||||
|
||||
nextcloud_secrets = merge({
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
locals {
|
||||
app_version = var.tag
|
||||
app_fqdn = var.fqdn
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
resource "kubernetes_ingress_v1" "terraform_mcp" {
|
||||
metadata {
|
||||
name = "ingress"
|
||||
namespace = kubernetes_namespace.terraform_mcp.metadata[0].name
|
||||
}
|
||||
|
||||
spec {
|
||||
rule {
|
||||
host = var.fqdn
|
||||
http {
|
||||
path {
|
||||
backend {
|
||||
service {
|
||||
name = kubernetes_service.terraform_mcp.metadata[0].name
|
||||
port {
|
||||
number = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
resource "kubernetes_namespace" "terraform_mcp" {
|
||||
metadata {
|
||||
name = "terraform-mcp"
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_service_account" "terraform_mcp" {
|
||||
metadata {
|
||||
name = "terraform-mcp-sa"
|
||||
namespace = kubernetes_namespace.terraform_mcp.metadata[0].name
|
||||
}
|
||||
|
||||
automount_service_account_token = false
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "terraform_mcp" {
|
||||
metadata {
|
||||
name = "terraform-mcp"
|
||||
namespace = kubernetes_namespace.terraform_mcp.metadata[0].name
|
||||
labels = {
|
||||
app = "terraform-mcp"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
replicas = 1
|
||||
|
||||
selector {
|
||||
match_labels = {
|
||||
app = "terraform-mcp"
|
||||
}
|
||||
}
|
||||
|
||||
strategy {
|
||||
type = "Recreate"
|
||||
}
|
||||
|
||||
template {
|
||||
metadata {
|
||||
labels = {
|
||||
app = "terraform-mcp"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
service_account_name = kubernetes_service_account.terraform_mcp.metadata[0].name
|
||||
automount_service_account_token = false
|
||||
|
||||
container {
|
||||
name = "terraform-mcp"
|
||||
image = "hashicorp/terraform-mcp-server:${local.app_version}"
|
||||
|
||||
env {
|
||||
name = "TRANSPORT_MODE"
|
||||
value = "streamable-http"
|
||||
}
|
||||
|
||||
env {
|
||||
name = "TRANSPORT_PORT"
|
||||
value = "8084"
|
||||
}
|
||||
|
||||
env {
|
||||
name = "TRANSPORT_HOST"
|
||||
value = "0.0.0.0"
|
||||
}
|
||||
|
||||
security_context {
|
||||
allow_privilege_escalation = false
|
||||
privileged = false
|
||||
|
||||
capabilities {
|
||||
drop = ["ALL"]
|
||||
}
|
||||
}
|
||||
|
||||
port {
|
||||
name = "http"
|
||||
container_port = 8084
|
||||
protocol = "TCP"
|
||||
}
|
||||
|
||||
liveness_probe {
|
||||
http_get {
|
||||
path = "/health"
|
||||
port = "http"
|
||||
}
|
||||
initial_delay_seconds = 10
|
||||
period_seconds = 15
|
||||
}
|
||||
|
||||
readiness_probe {
|
||||
http_get {
|
||||
path = "/health"
|
||||
port = "http"
|
||||
}
|
||||
initial_delay_seconds = 5
|
||||
period_seconds = 10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_service" "terraform_mcp" {
|
||||
metadata {
|
||||
name = "terraform-mcp-service"
|
||||
namespace = kubernetes_namespace.terraform_mcp.metadata[0].name
|
||||
}
|
||||
|
||||
spec {
|
||||
selector = {
|
||||
app = "terraform-mcp"
|
||||
}
|
||||
|
||||
port {
|
||||
name = "http"
|
||||
port = 80
|
||||
target_port = 8084
|
||||
}
|
||||
|
||||
type = "ClusterIP"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
metadata[0].annotations
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
terraform {
|
||||
required_version = "~>1.8"
|
||||
required_providers {
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "2.36.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
variable "fqdn" {
|
||||
description = "FQDN for the service"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "tag" {
|
||||
description = "Image tag to deploy"
|
||||
type = string
|
||||
default = "1.0.0"
|
||||
}
|
||||
|
||||
variable "persistent_folder" {
|
||||
description = "Path for persistent data on the host"
|
||||
type = string
|
||||
}
|
||||
Reference in New Issue
Block a user