mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-24 20:42:05 +03:00
db9ec58f5d
Also updated the way secrets are generated with Terraform and some code cleanup
61 lines
1.2 KiB
HCL
61 lines
1.2 KiB
HCL
resource "kubernetes_deployment" "twentycrm_redis" {
|
|
metadata {
|
|
name = "${var.twentycrm_app_name}-redis"
|
|
namespace = kubernetes_namespace.twentycrm.metadata.0.name
|
|
|
|
labels = {
|
|
app = "${var.twentycrm_app_name}-redis"
|
|
}
|
|
}
|
|
|
|
spec {
|
|
replicas = var.twentycrm_redis_replicas
|
|
selector {
|
|
match_labels = {
|
|
app = "${var.twentycrm_app_name}-redis"
|
|
}
|
|
}
|
|
|
|
strategy {
|
|
type = "RollingUpdate"
|
|
rolling_update {
|
|
max_surge = "1"
|
|
max_unavailable = "1"
|
|
}
|
|
}
|
|
|
|
template {
|
|
metadata {
|
|
labels = {
|
|
app = "${var.twentycrm_app_name}-redis"
|
|
}
|
|
}
|
|
|
|
spec {
|
|
container {
|
|
image = var.twentycrm_redis_image
|
|
name = "redis"
|
|
|
|
port {
|
|
container_port = 6379
|
|
protocol = "TCP"
|
|
}
|
|
|
|
resources {
|
|
requests = {
|
|
cpu = "250m"
|
|
memory = "1024Mi"
|
|
}
|
|
limits = {
|
|
cpu = "500m"
|
|
memory = "2048Mi"
|
|
}
|
|
}
|
|
}
|
|
dns_policy = "ClusterFirst"
|
|
restart_policy = "Always"
|
|
}
|
|
}
|
|
}
|
|
}
|