add metabase secured ingress [ci skip]

This commit is contained in:
Viktor Barzin 2023-11-24 19:04:44 +00:00
parent 26f5ba41fe
commit e2b077f521
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
3 changed files with 45 additions and 56 deletions

View file

@ -69,37 +69,37 @@ resource "helm_release" "crowdsec" {
# values = [templatefile("${path.module}/rowdsec-ingress-bouncer.yaml", {})]
}
resource "kubernetes_ingress_v1" "metabase" {
metadata {
name = "metabase"
namespace = "crowdsec"
annotations = {
"kubernetes.io/ingress.class" = "nginx"
# "nginx.ingress.kubernetes.io/auth-url" : "https://oauth2.viktorbarzin.me/oauth2/auth"
# "nginx.ingress.kubernetes.io/auth-signin" : "https://oauth2.viktorbarzin.me/oauth2/start?rd=/redirect/$http_host$escaped_request_uri"
}
}
# resource "kubernetes_ingress_v1" "metabase" {
# metadata {
# name = "metabase"
# namespace = "crowdsec"
# annotations = {
# "kubernetes.io/ingress.class" = "nginx"
# "nginx.ingress.kubernetes.io/auth-url" : "https://oauth2.viktorbarzin.me/oauth2/auth"
# "nginx.ingress.kubernetes.io/auth-signin" : "https://oauth2.viktorbarzin.me/oauth2/start?rd=/redirect/$http_host$escaped_request_uri"
# }
# }
spec {
tls {
hosts = ["metabase.viktorbarzin.me"]
secret_name = var.tls_secret_name
}
rule {
host = "metabase.viktorbarzin.me"
http {
path {
path = "/"
backend {
service {
name = "crowdsec-service"
port {
number = 3000
}
}
}
}
}
}
}
}
# spec {
# tls {
# hosts = ["metabase.viktorbarzin.me"]
# secret_name = var.tls_secret_name
# }
# rule {
# host = "metabase.viktorbarzin.me"
# http {
# path {
# path = "/"
# backend {
# service {
# name = "crowdsec-service"
# port {
# number = 3000
# }
# }
# }
# }
# }
# }
# }
# }

View file

@ -22,28 +22,17 @@ lapi:
# As it's a test, we don't want to share signals with CrowdSec, so disable the Online API.
- name: DISABLE_ONLINE_API
value: "true"
ingress:
enabled: true
annotations:
# we only want http to the backend so we need this annotation
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# labels: {}
ingressClassName: "nginx"
host: "crowdsec.viktorbarzin.me" # crowdsec-api.example.com
tls:
- hosts:
- crowdsec.viktorbarzin.me
secretName: "tls-secret"
dashboard:
# -- Enable Metabase Dashboard (by default disabled)
enabled: true
annotations:
# metabase only supports http so we need this annotation
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# labels: {}
ingressClassName: "nginx" # nginx
host: "crowdsec.viktorbarzin.me" # crowdsec-api.example.com
tls:
- hosts:
- crowdsec.viktorbarzin.me
secretName: "tls-secret"
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/auth-url: "https://oauth2.viktorbarzin.me/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://oauth2.viktorbarzin.me/oauth2/start?rd=/redirect/$http_host$escaped_request_uri"
ingressClassName: "nginx"
host: "crowdsec.viktorbarzin.me"
tls:
- hosts:
- crowdsec.viktorbarzin.me
secretName: "tls-secret"

Binary file not shown.