feat: add terraform deployment for K8s invidious
This commit is contained in:
parent
ff7c9d8b91
commit
904b067816
10 changed files with 572 additions and 0 deletions
28
deployments/invidious/services.tf
Normal file
28
deployments/invidious/services.tf
Normal file
|
@ -0,0 +1,28 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
resource "kubernetes_service_v1" "app" {
|
||||
metadata {
|
||||
name = var.app_name
|
||||
annotations = {}
|
||||
labels = merge({
|
||||
"app.kubernetes.io/component" = "server"
|
||||
"app.kubernetes.io/name" = var.app_name
|
||||
"app.kubernetes.io/version" = var.app_version
|
||||
"app.kubernetes.io/part-of" = var.app_name
|
||||
"app.kubernetes.io/managed-by" = "opentofu"
|
||||
"app.kubernetes.io/instance" = var.app_name
|
||||
}, var.service_additional_labels)
|
||||
}
|
||||
spec {
|
||||
type = var.service_type
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = var.app_name
|
||||
"app.kubernetes.io/instance" = var.app_name
|
||||
}
|
||||
port {
|
||||
name = "http"
|
||||
protocol = "TCP"
|
||||
port = 3000
|
||||
target_port = "http"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue