1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Add target namespace to create ks cmd

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2020-11-07 14:01:40 +02:00
parent 1df45e4857
commit 9f7835d818
2 changed files with 6 additions and 2 deletions

View File

@@ -83,6 +83,7 @@ var (
ksSANamespace string
ksDecryptionProvider flags.DecryptionProvider
ksDecryptionSecret string
ksTargetNamespace string
)
func init() {
@@ -97,6 +98,7 @@ func init() {
createKsCmd.Flags().StringVar(&ksSANamespace, "sa-namespace", "", "service account namespace")
createKsCmd.Flags().Var(&ksDecryptionProvider, "decryption-provider", ksDecryptionProvider.Description())
createKsCmd.Flags().StringVar(&ksDecryptionSecret, "decryption-secret", "", "set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption")
createKsCmd.Flags().StringVar(&ksTargetNamespace, "target-namespace", "", "overrides the namespace of all Kustomization objects reconciled by this Kustomization")
createCmd.AddCommand(createKsCmd)
}
@@ -139,8 +141,9 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
Kind: ksSource.Kind,
Name: ksSource.Name,
},
Suspend: false,
Validation: ksValidation,
Suspend: false,
Validation: ksValidation,
TargetNamespace: ksTargetNamespace,
},
}