add excalidraw module [ci skip]
This commit is contained in:
parent
65fa9216a2
commit
16a6114bd1
4 changed files with 120 additions and 0 deletions
115
modules/kubernetes/excalidraw/main.tf
Normal file
115
modules/kubernetes/excalidraw/main.tf
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
variable "tls_secret_name" {}
|
||||
|
||||
resource "kubernetes_namespace" "finance_app" {
|
||||
metadata {
|
||||
name = "excalidraw"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module "tls_secret" {
|
||||
source = "../setup_tls_secret"
|
||||
namespace = "excalidraw"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "excalidraw" {
|
||||
metadata {
|
||||
name = "excalidraw"
|
||||
namespace = "excalidraw"
|
||||
labels = {
|
||||
app = "excalidraw"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
replicas = 1
|
||||
selector {
|
||||
match_labels = {
|
||||
app = "excalidraw"
|
||||
}
|
||||
}
|
||||
template {
|
||||
metadata {
|
||||
labels = {
|
||||
app = "excalidraw"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
image = "docker.io/excalidraw/excalidraw:latest"
|
||||
name = "excalidraw"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_service" "finance_app" {
|
||||
metadata {
|
||||
name = "excalidraw"
|
||||
namespace = "excalidraw"
|
||||
labels = {
|
||||
app = "excalidraw"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
selector = {
|
||||
app = "excalidraw"
|
||||
}
|
||||
port {
|
||||
name = "http"
|
||||
port = "80"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resource "kubernetes_ingress_v1" "finance_app" {
|
||||
metadata {
|
||||
name = "excalidraw"
|
||||
namespace = "excalidraw"
|
||||
annotations = {
|
||||
"kubernetes.io/ingress.class" = "nginx"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
tls {
|
||||
hosts = ["excalidraw.viktorbarzin.me"]
|
||||
secret_name = var.tls_secret_name
|
||||
}
|
||||
rule {
|
||||
host = "excalidraw.viktorbarzin.me"
|
||||
http {
|
||||
path {
|
||||
path = "/"
|
||||
backend {
|
||||
service {
|
||||
name = "excalidraw"
|
||||
port {
|
||||
number = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rule {
|
||||
host = "draw.viktorbarzin.me"
|
||||
http {
|
||||
path {
|
||||
path = "/"
|
||||
backend {
|
||||
service {
|
||||
name = "excalidraw"
|
||||
port {
|
||||
number = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -272,3 +272,8 @@ module "finance_app" {
|
|||
oauth_google_client_secret = var.finance_app_oauth_google_client_secret
|
||||
graphql_api_secret = var.finance_app_graphql_api_secret
|
||||
}
|
||||
|
||||
module "excalidraw" {
|
||||
source = "./excalidraw"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
BIN
terraform.tfvars
BIN
terraform.tfvars
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue