pass in slack apprise config via env [ci skip]
This commit is contained in:
parent
04fb2397f3
commit
6bd2fc3cc9
3 changed files with 37 additions and 12 deletions
6
main.tf
6
main.tf
|
|
@ -102,6 +102,9 @@ variable "geoapify_api_key" {}
|
|||
variable "tandoor_database_password" {}
|
||||
variable "n8n_postgresql_password" {}
|
||||
variable "realestate_crawler_db_password" {}
|
||||
variable "realestate_crawler_notification_settings" {
|
||||
type = map(string)
|
||||
}
|
||||
|
||||
# data "terraform_remote_state" "foo" {
|
||||
# backend = "kubernetes"
|
||||
|
|
@ -417,7 +420,8 @@ module "kubernetes_cluster" {
|
|||
|
||||
n8n_postgresql_password = var.n8n_postgresql_password
|
||||
|
||||
realestate_crawler_db_password = var.realestate_crawler_db_password
|
||||
realestate_crawler_db_password = var.realestate_crawler_db_password
|
||||
realestate_crawler_notification_settings = var.realestate_crawler_notification_settings
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ variable "tandoor_database_password" {}
|
|||
variable "tandoor_email_password" {}
|
||||
variable "n8n_postgresql_password" {}
|
||||
variable "realestate_crawler_db_password" {}
|
||||
variable "realestate_crawler_notification_settings" {
|
||||
type = map(string)
|
||||
default = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
variable "defcon_level" {
|
||||
type = number
|
||||
|
|
@ -618,9 +624,10 @@ module "n8n" {
|
|||
}
|
||||
|
||||
module "real-estate-crawler" {
|
||||
source = "./real-estate-crawler"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
db_password = var.realestate_crawler_db_password
|
||||
source = "./real-estate-crawler"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
db_password = var.realestate_crawler_db_password
|
||||
notification_settings = var.realestate_crawler_notification_settings
|
||||
}
|
||||
|
||||
module "tor-proxy" {
|
||||
|
|
@ -628,6 +635,11 @@ module "tor-proxy" {
|
|||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
module "kured" {
|
||||
source = "./kured"
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
# module "onlyoffice" {
|
||||
# source = "./onlyoffice"
|
||||
# tls_secret_name = var.tls_secret_name
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
variable "tls_secret_name" {}
|
||||
variable "notification_settings" {
|
||||
type = map(string)
|
||||
default = {
|
||||
}
|
||||
}
|
||||
variable "db_password" {}
|
||||
|
||||
resource "kubernetes_namespace" "realestate-crawler" {
|
||||
|
|
@ -125,14 +130,14 @@ resource "kubernetes_deployment" "realestate-crawler-api" {
|
|||
value = "mysql://wrongmove:${var.db_password}@mysql.dbaas.svc.cluster.local:3306/wrongmove"
|
||||
|
||||
}
|
||||
env {
|
||||
name = "HTTP_PROXY"
|
||||
value = "http://tor-proxy.tor-proxy:8118"
|
||||
}
|
||||
env {
|
||||
name = "HTTPS_PROXY"
|
||||
value = "http://tor-proxy.tor-proxy:8118"
|
||||
}
|
||||
# env {
|
||||
# name = "HTTP_PROXY"
|
||||
# value = "http://tor-proxy.tor-proxy:8118"
|
||||
# }
|
||||
# env {
|
||||
# name = "HTTPS_PROXY"
|
||||
# value = "http://tor-proxy.tor-proxy:8118"
|
||||
# }
|
||||
env {
|
||||
name = "CELERY_BROKER_URL"
|
||||
value = "redis://redis.redis.svc.cluster.local:6379/0"
|
||||
|
|
@ -146,6 +151,10 @@ resource "kubernetes_deployment" "realestate-crawler-api" {
|
|||
name = "UVICORN_LOG_LEVEL"
|
||||
value = "debug"
|
||||
}
|
||||
env {
|
||||
name = "SLACK_WEBHOOK_URL"
|
||||
value = var.notification_settings["slack"]
|
||||
}
|
||||
port {
|
||||
name = "http"
|
||||
container_port = 5001
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue