Add source namespace to create commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ var createKsCmd = &cobra.Command{
|
||||
Long: "The kustomization source create command generates a Kustomize resource for a given source.",
|
||||
Example: ` # Create a Kustomization resource from a source at a given path
|
||||
flux create kustomization contour \
|
||||
--source=contour \
|
||||
--source=GitRepository/contour \
|
||||
--path="./examples/contour/" \
|
||||
--prune=true \
|
||||
--interval=10m \
|
||||
@@ -58,7 +58,16 @@ var createKsCmd = &cobra.Command{
|
||||
# Create a Kustomization resource that depends on the previous one
|
||||
flux create kustomization webapp \
|
||||
--depends-on=contour \
|
||||
--source=webapp \
|
||||
--source=GitRepository/webapp \
|
||||
--path="./deploy/overlays/dev" \
|
||||
--prune=true \
|
||||
--interval=5m \
|
||||
--validation=client
|
||||
|
||||
# Create a Kustomization using a source from a different namespace
|
||||
flux create kustomization podinfo \
|
||||
--namespace=default \
|
||||
--source=GitRepository/podinfo.flux-system \
|
||||
--path="./deploy/overlays/dev" \
|
||||
--prune=true \
|
||||
--interval=5m \
|
||||
@@ -145,8 +154,9 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
|
||||
Path: filepath.ToSlash(kustomizationArgs.path.String()),
|
||||
Prune: kustomizationArgs.prune,
|
||||
SourceRef: kustomizev1.CrossNamespaceSourceReference{
|
||||
Kind: kustomizationArgs.source.Kind,
|
||||
Name: kustomizationArgs.source.Name,
|
||||
Kind: kustomizationArgs.source.Kind,
|
||||
Name: kustomizationArgs.source.Name,
|
||||
Namespace: kustomizationArgs.source.Namespace,
|
||||
},
|
||||
Suspend: false,
|
||||
Validation: kustomizationArgs.validation,
|
||||
|
||||
Reference in New Issue
Block a user