add authelia module and a few spam email aliases [ci skip]
This commit is contained in:
parent
7b7f11eb02
commit
c3f30e480a
6 changed files with 1886 additions and 0 deletions
28
modules/kubernetes/authelia/main.tf
Normal file
28
modules/kubernetes/authelia/main.tf
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
variable "tls_secret_name" {}
|
||||||
|
|
||||||
|
resource "kubernetes_namespace" "authelia" {
|
||||||
|
metadata {
|
||||||
|
name = "authelia"
|
||||||
|
labels = {
|
||||||
|
"istio-injection" : "enabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module "tls_secret" {
|
||||||
|
source = "../setup_tls_secret"
|
||||||
|
namespace = "authelia"
|
||||||
|
tls_secret_name = var.tls_secret_name
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "helm_release" "authelia" {
|
||||||
|
namespace = "authelia"
|
||||||
|
create_namespace = true
|
||||||
|
name = "authelia"
|
||||||
|
atomic = true
|
||||||
|
|
||||||
|
repository = "https://charts.authelia.com"
|
||||||
|
chart = "authelia"
|
||||||
|
|
||||||
|
values = [templatefile("${path.module}/values.yaml", {})]
|
||||||
|
}
|
||||||
1716
modules/kubernetes/authelia/values.yaml
Normal file
1716
modules/kubernetes/authelia/values.yaml
Normal file
File diff suppressed because it is too large
Load diff
132
modules/kubernetes/discount-bandit/main.tf
Normal file
132
modules/kubernetes/discount-bandit/main.tf
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
variable "tls_secret_name" {}
|
||||||
|
|
||||||
|
resource "kubernetes_namespace" "discount-bandit" {
|
||||||
|
metadata {
|
||||||
|
name = "discount-bandit"
|
||||||
|
# labels = {
|
||||||
|
# "istio-injection" : "enabled"
|
||||||
|
# }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module "tls_secret" {
|
||||||
|
source = "../setup_tls_secret"
|
||||||
|
namespace = "discount-bandit"
|
||||||
|
tls_secret_name = var.tls_secret_name
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_deployment" "discount-bandit" {
|
||||||
|
metadata {
|
||||||
|
name = "discount-bandit"
|
||||||
|
namespace = "discount-bandit"
|
||||||
|
labels = {
|
||||||
|
app = "discount-bandit"
|
||||||
|
}
|
||||||
|
annotations = {
|
||||||
|
"reloader.stakater.com/search" = "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
replicas = 1
|
||||||
|
strategy {
|
||||||
|
type = "Recreate"
|
||||||
|
}
|
||||||
|
selector {
|
||||||
|
match_labels = {
|
||||||
|
app = "discount-bandit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
template {
|
||||||
|
metadata {
|
||||||
|
labels = {
|
||||||
|
app = "discount-bandit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
container {
|
||||||
|
image = "cybrarist/discount-bandit:latest-amd64"
|
||||||
|
name = "discount-bandit"
|
||||||
|
env {
|
||||||
|
name = "DB_HOST"
|
||||||
|
value = "mysql.dbaas"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "DB_DATABASE"
|
||||||
|
value = "discountbandit"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "DB_USERNAME"
|
||||||
|
value = "discountbandit"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "DB_PASSWORD"
|
||||||
|
value = ""
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "APP_URL"
|
||||||
|
value = "http://discount.viktorbarzin.me:80"
|
||||||
|
}
|
||||||
|
|
||||||
|
port {
|
||||||
|
container_port = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_service" "discount-bandit" {
|
||||||
|
metadata {
|
||||||
|
name = "discount-bandit"
|
||||||
|
namespace = "discount-bandit"
|
||||||
|
labels = {
|
||||||
|
"app" = "discount-bandit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spec {
|
||||||
|
selector = {
|
||||||
|
app = "discount-bandit"
|
||||||
|
}
|
||||||
|
port {
|
||||||
|
name = "http"
|
||||||
|
target_port = 80
|
||||||
|
port = 80
|
||||||
|
protocol = "TCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_ingress_v1" "discount-bandit" {
|
||||||
|
metadata {
|
||||||
|
name = "discount-bandit"
|
||||||
|
namespace = "discount-bandit"
|
||||||
|
annotations = {
|
||||||
|
"kubernetes.io/ingress.class" = "nginx"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spec {
|
||||||
|
tls {
|
||||||
|
hosts = ["discount.viktorbarzin.me"]
|
||||||
|
secret_name = var.tls_secret_name
|
||||||
|
}
|
||||||
|
rule {
|
||||||
|
host = "discount.viktorbarzin.me"
|
||||||
|
http {
|
||||||
|
path {
|
||||||
|
path = "/"
|
||||||
|
backend {
|
||||||
|
service {
|
||||||
|
name = "discount-bandit"
|
||||||
|
port {
|
||||||
|
number = 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -419,3 +419,13 @@ module "istio" {
|
||||||
source = "./istio"
|
source = "./istio"
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# module "authelia" {
|
||||||
|
# source = "./authelia"
|
||||||
|
# tls_secret_name = var.tls_secret_name
|
||||||
|
# }
|
||||||
|
|
||||||
|
# module "discount-bandit" {
|
||||||
|
# source = "./discount-bandit"
|
||||||
|
# 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