|
|
|
@ -113,14 +113,6 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
|
return fmt.Errorf("path must begin with ./")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
|
|
|
|
defer cancel()
|
|
|
|
|
|
|
|
|
|
kubeClient, err := utils.kubeClient(kubeconfig)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if !export {
|
|
|
|
|
logger.Generatef("generating kustomization")
|
|
|
|
|
}
|
|
|
|
@ -190,6 +182,14 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
|
return exportKs(kustomization)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
|
|
|
|
defer cancel()
|
|
|
|
|
|
|
|
|
|
kubeClient, err := utils.kubeClient(kubeconfig)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
logger.Actionf("applying kustomization")
|
|
|
|
|
if err := upsertKustomization(ctx, kubeClient, kustomization); err != nil {
|
|
|
|
|
return err
|
|
|
|
|