From 4e3424bc4d663cf8649bd0dde109b4ff7b9a2143 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Sat, 14 Dec 2024 20:50:40 +0000 Subject: [PATCH] fix: ignore namespace label and annotations changes --- modules/kubernetes/external-secrets.tf | 7 +++++++ modules/kubernetes/metallb.tf | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/modules/kubernetes/external-secrets.tf b/modules/kubernetes/external-secrets.tf index 5f96c64..35f598a 100644 --- a/modules/kubernetes/external-secrets.tf +++ b/modules/kubernetes/external-secrets.tf @@ -16,6 +16,13 @@ resource "kubernetes_namespace_v1" "external_secrets" { metadata { name = "external-secrets" } + + lifecycle { + ignore_changes = [ + metadata[0].labels, + metadata[0].annotations, + ] + } } resource "kubernetes_secret_v1" "bitwarden" { diff --git a/modules/kubernetes/metallb.tf b/modules/kubernetes/metallb.tf index e336217..cee6e20 100644 --- a/modules/kubernetes/metallb.tf +++ b/modules/kubernetes/metallb.tf @@ -23,6 +23,13 @@ resource "kubernetes_namespace_v1" "metallb" { metadata { name = "metallb-system" } + + lifecycle { + ignore_changes = [ + metadata[0].labels, + metadata[0].annotations, + ] + } } resource "kubernetes_config_map_v1" "metallb" {