Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force forward auth redeployment when tls secret changes #2771

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module "forwardauth" {
node-group = var.node_groups.general
forwardauth_middleware_name = var.forwardauth_middleware_name
cert_secret_name = var.cert_secret_name

}

variable "forwardauth_middleware_name" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ resource "kubernetes_deployment" "forwardauth-deployment" {
}
}
}

lifecycle {
# force forward auth redeployment if the cert is updated
replace_triggered_by = [
kubernetes_secret_v1.cert_secret.metadata.0.uid
]
}
}

data "kubernetes_secret_v1" "cert_secret" {
metadata {
name = var.cert_secret_name
namespace = var.namespace
}
}

resource "kubernetes_manifest" "forwardauth-middleware" {
Expand Down
Loading