add pod dependency management via Kyverno init container injection
Kyverno ClusterPolicy reads dependency.kyverno.io/wait-for annotation and injects busybox init containers that block until each dependency is reachable (nc -z). Annotations added to 18 stacks (24 deployments). Includes graceful-db-maintenance.sh script for planned DB maintenance (scales dependents to 0, saves replica counts, restores on startup).
This commit is contained in:
parent
dc274ab413
commit
0f262ceda3
22 changed files with 282 additions and 4 deletions
|
|
@ -252,6 +252,9 @@ resource "kubernetes_deployment" "rybbit" {
|
|||
labels = {
|
||||
app = "rybbit"
|
||||
}
|
||||
annotations = {
|
||||
"dependency.kyverno.io/wait-for" = "postgresql.dbaas:5432,clickhouse.rybbit:8123"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
|
|
@ -404,6 +407,9 @@ resource "kubernetes_deployment" "rybbit-client" {
|
|||
labels = {
|
||||
app = "rybbit-client"
|
||||
}
|
||||
annotations = {
|
||||
"dependency.kyverno.io/wait-for" = "rybbit.rybbit:3001"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue