1
0
mirror of synced 2026-02-13 13:06:56 +00:00

fix: support reconcile recursive source tree hr => chart => repo

Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
This commit is contained in:
Raffael Sahli
2023-04-14 10:02:03 +00:00
committed by Hidde Beydals
parent e678738ded
commit b8c24f906d
5 changed files with 75 additions and 30 deletions

View File

@@ -18,12 +18,17 @@ type reconcileWithSource interface {
adapter
reconcilable
reconcileSource() bool
getSource() (reconcileCommand, types.NamespacedName)
getSource() (reconcileSource, types.NamespacedName)
}
type reconcileSource interface {
run(cmd *cobra.Command, args []string) error
}
type reconcileWithSourceCommand struct {
apiType
object reconcileWithSource
force bool
}
func (reconcile reconcileWithSourceCommand) run(cmd *cobra.Command, args []string) error {
@@ -54,7 +59,7 @@ func (reconcile reconcileWithSourceCommand) run(cmd *cobra.Command, args []strin
return fmt.Errorf("resource is suspended")
}
if reconcile.object.reconcileSource() {
if reconcile.object.reconcileSource() || reconcile.force {
reconcileCmd, nsName := reconcile.object.getSource()
nsCopy := *kubeconfigArgs.Namespace
if nsName.Namespace != "" {