add dashy deployment and config

This commit is contained in:
Viktor Barzin 2023-10-21 22:54:05 +00:00
parent e71c3946db
commit 1afd605f38
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
2 changed files with 380 additions and 78 deletions

View file

@ -24,72 +24,7 @@ resource "kubernetes_config_map" "config" {
}
data = {
"conf.yaml" = <<-EOT
---
pageInfo:
title: Dashy
description: Welcome to your new dashboard!
navLinks:
- title: GitHub
path: https://github.com/Lissy93/dashy
- title: Documentation
path: https://dashy.to/docs
appConfig:
theme: colorful
layout: auto
iconSize: large
language: en
sections:
- name: Getting Started
icon: fas fa-rocket
items:
- &ref_0
title: Dashy Live
description: Development a project management links for Dashy
icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
url: https://live.dashy.to/
target: newtab
id: 0_1481_dashylive
- &ref_1
title: GitHub
description: Source Code, Issues and Pull Requests
url: https://github.com/lissy93/dashy
icon: favicon
id: 1_1481_github
- &ref_2
title: Docs
description: Configuring & Usage Documentation
provider: Dashy.to
icon: far fa-book
url: https://dashy.to/docs
id: 2_1481_docs
- &ref_3
title: Showcase
description: See how others are using Dashy
url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
icon: far fa-grin-hearts
id: 3_1481_showcase
- &ref_4
title: Config Guide
description: See full list of configuration options
url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
icon: fas fa-wrench
id: 4_1481_configguide
- &ref_5
title: Support
description: Get help with Dashy, raise a bug, or get in contact
url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
icon: far fa-hands-helping
id: 5_1481_support
filteredItems:
- *ref_0
- *ref_1
- *ref_2
- *ref_3
- *ref_4
- *ref_5
EOT
"conf.yml" = file("${path.root}/modules/kubernetes/dashy/conf.yml")
}
}
@ -125,12 +60,10 @@ resource "kubernetes_deployment" "dashy" {
port {
container_port = 80
}
# volume_mount {
# name = "config"
# mount_path = "/app/public/"
# }
volume_mount {
name = "config"
mount_path = "/app/public/"
}
}
volume {
name = "config"
@ -169,12 +102,8 @@ resource "kubernetes_ingress_v1" "dashy" {
namespace = "dashy"
annotations = {
"kubernetes.io/ingress.class" = "nginx"
//"nginx.ingress.kubernetes.io/auth-tls-verify-client" = "on"
//"nginx.ingress.kubernetes.io/auth-tls-secret" = "default/ca-secret"
# "nginx.ingress.kubernetes.io/auth-url" : "https://$host/oauth2/auth"
"nginx.ingress.kubernetes.io/auth-url" : "https://viktorbarzin.uk.auth0.com//oauth2/auth"
# "nginx.ingress.kubernetes.io/auth-signin" : "https://$host/oauth2/start?rd=$escaped_request_uri"
"nginx.ingress.kubernetes.io/auth-signin" : "https://viktorbarzin.uk.auth0.com//oauth2/start?rd=$escaped_request_uri"
"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"
}
}
@ -201,3 +130,4 @@ resource "kubernetes_ingress_v1" "dashy" {
}
}
}