mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-06 01:54:43 +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:
parent
e678738ded
commit
b8c24f906d
5 changed files with 75 additions and 30 deletions
|
|
@ -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 != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue