feat(vaultwarden): add SMTP configuration options and enhance signup settings
- Introduced SMTP settings for Vaultwarden including host, port, security, and authentication details. - Added variables for signup verification, 2FA settings, password hints, and logging options. - Updated Vaultwarden deployment to utilize new SMTP configurations. - Enhanced Grafana module to support dynamic dashboard and datasource provisioning. - Added LLM proxy configuration for Open Web UI with necessary environment variables.
This commit is contained in:
+16
-16
@@ -1,22 +1,22 @@
|
||||
resource "kubernetes_service_account" "ollama_proxy" {
|
||||
resource "kubernetes_service_account" "llm_proxy" {
|
||||
|
||||
count = var.ollama_proxy.enabled ? 1 : 0
|
||||
count = var.llm_proxy.enabled ? 1 : 0
|
||||
metadata {
|
||||
name = "ollama-proxy-sa"
|
||||
name = "llm-proxy-sa"
|
||||
namespace = kubernetes_namespace.openwebui.metadata[0].name
|
||||
}
|
||||
|
||||
automount_service_account_token = false
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "ollama_proxy" {
|
||||
resource "kubernetes_deployment" "llm_proxy" {
|
||||
|
||||
count = var.ollama_proxy.enabled ? 1 : 0
|
||||
count = var.llm_proxy.enabled ? 1 : 0
|
||||
metadata {
|
||||
name = "ollama-proxy"
|
||||
name = "llm-proxy"
|
||||
namespace = kubernetes_namespace.openwebui.metadata[0].name
|
||||
labels = {
|
||||
app = "ollama-proxy"
|
||||
app = "llm-proxy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ resource "kubernetes_deployment" "ollama_proxy" {
|
||||
replicas = 1
|
||||
selector {
|
||||
match_labels = {
|
||||
app = "ollama-proxy"
|
||||
app = "llm-proxy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ resource "kubernetes_deployment" "ollama_proxy" {
|
||||
template {
|
||||
metadata {
|
||||
labels = {
|
||||
app = "ollama-proxy"
|
||||
app = "llm-proxy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,37 +57,37 @@ resource "kubernetes_deployment" "ollama_proxy" {
|
||||
|
||||
port {
|
||||
name = "http"
|
||||
container_port = var.ollama_proxy.port
|
||||
container_port = var.llm_proxy.port
|
||||
}
|
||||
|
||||
env {
|
||||
name = "UPSTREAM_MAC"
|
||||
value = var.ollama_proxy.mac
|
||||
value = var.llm_proxy.mac
|
||||
}
|
||||
|
||||
env {
|
||||
name = "UPSTREAM_IP"
|
||||
value = var.ollama_proxy.ip
|
||||
value = var.llm_proxy.ip
|
||||
}
|
||||
|
||||
env {
|
||||
name = "UPSTREAM_PORT"
|
||||
value = var.ollama_proxy.port
|
||||
value = try(var.llm_proxy.upstream_port, var.llm_proxy.port)
|
||||
}
|
||||
|
||||
env {
|
||||
name = "UPSTREAM_SCHEME"
|
||||
value = var.ollama_proxy.scheme
|
||||
value = var.llm_proxy.scheme
|
||||
}
|
||||
|
||||
env {
|
||||
name = "PROXY_PORT"
|
||||
value = var.ollama_proxy.port
|
||||
value = var.llm_proxy.port
|
||||
}
|
||||
|
||||
readiness_probe {
|
||||
tcp_socket {
|
||||
port = 11434
|
||||
port = var.llm_proxy.port
|
||||
}
|
||||
initial_delay_seconds = 5
|
||||
period_seconds = 10
|
||||
@@ -20,14 +20,15 @@ variable "issuer" {
|
||||
default = "internal-ca"
|
||||
}
|
||||
|
||||
variable "ollama_proxy" {
|
||||
description = "Configuration for the Ollama proxy"
|
||||
variable "llm_proxy" {
|
||||
description = "Configuration for the llm proxy"
|
||||
type = object({
|
||||
enabled = bool
|
||||
mac = optional(string, "")
|
||||
ip = optional(string, "")
|
||||
port = optional(string, "11434")
|
||||
scheme = optional(string, "http")
|
||||
enabled = bool
|
||||
mac = optional(string, "")
|
||||
ip = optional(string, "")
|
||||
port = optional(string, "11434")
|
||||
scheme = optional(string, "http")
|
||||
upstream_port = optional(string, "11434")
|
||||
})
|
||||
default = {
|
||||
enabled = false
|
||||
@@ -54,3 +55,9 @@ variable "log_level" {
|
||||
error_message = "log_level must be one of: DEBUG, INFO, WARNING, ERROR, CRITICAL"
|
||||
}
|
||||
}
|
||||
|
||||
variable "aiohttp_client_timeout" {
|
||||
description = "The timeout for aiohttp client in seconds (e.g., 300, 600 etc.) (By default the timeout will be set to None, effectively disabling the timeout and allowing the client to wait indefinitely.)"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ resource "kubernetes_deployment" "openwebui" {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
container {
|
||||
name = "app"
|
||||
image = "ghcr.io/open-webui/open-webui:${var.tag}"
|
||||
@@ -115,6 +114,10 @@ resource "kubernetes_deployment" "openwebui" {
|
||||
value = var.log_level
|
||||
}
|
||||
|
||||
env {
|
||||
name = "AIOHTTP_CLIENT_TIMEOUT"
|
||||
value = var.aiohttp_client_timeout
|
||||
}
|
||||
|
||||
readiness_probe {
|
||||
tcp_socket {
|
||||
|
||||
Reference in New Issue
Block a user