From af0c939302b5317e479c6278c0bdd50353f963b4 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 4 Dec 2020 13:15:37 +0200 Subject: [PATCH] Add labels to generated secrets Signed-off-by: Stefan Prodan --- cmd/flux/create_source_bucket.go | 1 + cmd/flux/create_source_git.go | 2 ++ cmd/flux/create_source_helm.go | 1 + 3 files changed, 4 insertions(+) diff --git a/cmd/flux/create_source_bucket.go b/cmd/flux/create_source_bucket.go index da50b562..1cebb798 100644 --- a/cmd/flux/create_source_bucket.go +++ b/cmd/flux/create_source_bucket.go @@ -154,6 +154,7 @@ func createSourceBucketCmdRun(cmd *cobra.Command, args []string) error { ObjectMeta: metav1.ObjectMeta{ Name: secretName, Namespace: namespace, + Labels: sourceLabels, }, StringData: map[string]string{}, } diff --git a/cmd/flux/create_source_git.go b/cmd/flux/create_source_git.go index 1fa64167..9a0ca1d9 100644 --- a/cmd/flux/create_source_git.go +++ b/cmd/flux/create_source_git.go @@ -215,6 +215,7 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error { ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, + Labels: sourceLabels, }, StringData: map[string]string{ "identity": string(pair.PrivateKey), @@ -232,6 +233,7 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error { ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, + Labels: sourceLabels, }, StringData: map[string]string{ "username": sourceGitUsername, diff --git a/cmd/flux/create_source_helm.go b/cmd/flux/create_source_helm.go index c187fa3e..78f85f8d 100644 --- a/cmd/flux/create_source_helm.go +++ b/cmd/flux/create_source_helm.go @@ -151,6 +151,7 @@ func createSourceHelmCmdRun(cmd *cobra.Command, args []string) error { ObjectMeta: metav1.ObjectMeta{ Name: secretName, Namespace: namespace, + Labels: sourceLabels, }, StringData: map[string]string{}, }