[meta] move babybuddy from ramble-hard to lotus-land-story

pull/37/head
Alpha Chen 3 years ago
parent 267fff9c31
commit 8efd305e54

@ -0,0 +1,98 @@
resource "kubernetes_persistent_volume_claim" "babybuddy" {
metadata {
name = "babybuddy"
}
spec {
access_modes = ["ReadWriteOnce"]
resources {
requests = {
storage = "2Gi"
}
}
storage_class_name = "linode-block-storage-retain"
}
}
resource "kubernetes_pod" "babybuddy" {
metadata {
name = "babybuddy"
labels = {
app = "babybuddy"
}
}
spec {
container {
# https://github.com/babybuddy/babybuddy/issues/337
image = "lscr.io/linuxserver/babybuddy:v1.9.0-ls14"
image_pull_policy = "Always"
name = "babybuddy"
port {
container_port = 8000
}
volume_mount {
name = "babybuddy"
mount_path = "/config"
}
}
volume {
name = "babybuddy"
persistent_volume_claim {
claim_name = "babybuddy"
}
}
}
}
resource "kubernetes_service" "babybuddy" {
metadata {
name = "babybuddy"
}
spec {
port {
port = 80
target_port = 8000
protocol = "TCP"
}
selector = {
app = "babybuddy"
}
}
}
resource "kubernetes_ingress_v1" "babybuddy" {
metadata {
name = "babybuddy"
annotations = {
"kubernetes.io/ingress.class" = "nginx"
"cert-manager.io/cluster-issuer" = "letsencrypt-prod"
}
}
spec {
tls {
hosts = [
"babybuddy.${var.domain}"
]
secret_name = "babybuddy-tls"
}
rule {
host = "babybuddy.${var.domain}"
http {
path {
path = "/"
path_type = "Prefix"
backend {
service {
name = "babybuddy"
port {
number = 80
}
}
}
}
}
}
}
}

@ -41,10 +41,9 @@ resource "helm_release" "cert_manager" {
resource "kubernetes_manifest" "letsencrypt_staging" { resource "kubernetes_manifest" "letsencrypt_staging" {
manifest = { manifest = {
apiVersion = "cert-manager.io/v1" apiVersion = "cert-manager.io/v1"
kind = "Issuer" kind = "ClusterIssuer"
metadata = { metadata = {
name = "letsencrypt-staging" name = "letsencrypt-staging"
namespace = "default"
} }
spec = { spec = {
acme = { acme = {
@ -71,10 +70,9 @@ resource "kubernetes_manifest" "letsencrypt_staging" {
resource "kubernetes_manifest" "letsencrypt_prod" { resource "kubernetes_manifest" "letsencrypt_prod" {
manifest = { manifest = {
apiVersion = "cert-manager.io/v1" apiVersion = "cert-manager.io/v1"
kind = "Issuer" kind = "ClusterIssuer"
metadata = { metadata = {
name = "letsencrypt-prod" name = "letsencrypt-prod"
namespace = "default"
} }
spec = { spec = {
acme = { acme = {

@ -9,5 +9,4 @@
- import_playbook: playbooks/docker.yml - import_playbook: playbooks/docker.yml
- import_playbook: playbooks/lets_encrypt/main.yml - import_playbook: playbooks/lets_encrypt/main.yml
- import_playbook: playbooks/babybuddy/main.yml
- import_playbook: playbooks/pixelfed/install.yml - import_playbook: playbooks/pixelfed/install.yml

Loading…
Cancel
Save