Added `tier = var.tier` to kubernetes_namespace labels in ~73 service modules. This enables Kyverno to generate LimitRange defaults, ResourceQuotas, and PriorityClass injection for all namespaces. Previously only 11 namespaces had tier labels; now all 80 active namespaces are labeled. All pods restarted in rolling waves to pick up the new policies.
59 lines
1.4 KiB
HCL
59 lines
1.4 KiB
HCL
# https://github.com/dmunozv04/iSponsorBlockTV
|
|
variable "tier" { type = string }
|
|
|
|
resource "kubernetes_namespace" "isponsorblocktv" {
|
|
metadata {
|
|
name = "isponsorblocktv"
|
|
labels = {
|
|
"istio-injection" : "disabled"
|
|
tier = var.tier
|
|
}
|
|
}
|
|
}
|
|
# Before running, setup config using
|
|
# docker run --rm -it -v ./youtube:/app/data -e TERM=$TERM -e COLORTERM=$COLORTERM ghcr.io/dmunozv04/isponsorblocktv --setup
|
|
|
|
# Mute and skip ads for vermont smart tv
|
|
resource "kubernetes_deployment" "isponsorblocktv-vermont" {
|
|
metadata {
|
|
name = "isponsorblocktv-vermont"
|
|
namespace = kubernetes_namespace.isponsorblocktv.metadata[0].name
|
|
labels = {
|
|
app = "isponsorblocktv-vermont"
|
|
tier = var.tier
|
|
}
|
|
}
|
|
spec {
|
|
replicas = 1
|
|
selector {
|
|
match_labels = {
|
|
app = "isponsorblocktv-vermont"
|
|
}
|
|
}
|
|
template {
|
|
metadata {
|
|
labels = {
|
|
app = "isponsorblocktv-vermont"
|
|
}
|
|
}
|
|
spec {
|
|
container {
|
|
image = "ghcr.io/dmunozv04/isponsorblocktv"
|
|
name = "isponsorblocktv-vermont"
|
|
volume_mount {
|
|
name = "data"
|
|
mount_path = "/app/data"
|
|
}
|
|
}
|
|
volume {
|
|
name = "data"
|
|
nfs {
|
|
server = "10.0.10.15"
|
|
path = "/mnt/main/isponsorblocktv/vermont"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|