From 59dd7ea55a99177b44402a21f2fda53ebf2999ea Mon Sep 17 00:00:00 2001 From: zzxwill Date: Mon, 29 Nov 2021 15:39:16 +0800 Subject: [PATCH] Add a label to mark the secret Added a label "created-by"="terraform-controller" to mark the secret was created by Terraform Controller --- controllers/configuration_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/configuration_controller.go b/controllers/configuration_controller.go index 48430a53..72fbc0f4 100644 --- a/controllers/configuration_controller.go +++ b/controllers/configuration_controller.go @@ -737,6 +737,9 @@ func (meta *TFConfigurationMeta) getTFOutputs(ctx context.Context, k8sClient cli ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, + Labels: map[string]string{ + "created-by": "terraform-controller", + }, }, TypeMeta: metav1.TypeMeta{Kind: "Secret"}, Data: data,