mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 15:08:51 +00:00
fix(zitadelctl): implementation for commands in crd mode (#1685)
* fix(zitadelctl): implement takedown command * fix(zitadelctl): correct destroy flow * fix(zitadelctl): correct backup commands to read crds beforehand * fix: add of destroyfile * fix: clean for userlist * fix: determine mode by --gitops flag for backups * refactor: return error instead of higher order function * fix(destroy): needs no self-reconciling Co-authored-by: Elio Bischof <[email protected]> * fix(destroy): needs no self-reconciling Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <[email protected]> Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
co-authored by
Elio Bischof
parent
413ed80611
commit
25c9d7371d
@@ -91,22 +91,28 @@ func AdaptFunc(
|
||||
return nil, nil, nil, nil, nil, migrate, err
|
||||
}
|
||||
|
||||
rec, _ := Reconcile(monitor, desiredKind.Spec, gitops)
|
||||
|
||||
destroyers := make([]operator.DestroyFunc, 0)
|
||||
queriers := make([]operator.QueryFunc, 0)
|
||||
dbOrBackup := false
|
||||
for _, feature := range features {
|
||||
switch feature {
|
||||
case "database", backup.Instant, backup.Normal, restore.Instant, clean.Instant:
|
||||
queriers = append(queriers,
|
||||
operator.ResourceQueryToZitadelQuery(queryNS),
|
||||
queryDB,
|
||||
)
|
||||
destroyers = append(destroyers,
|
||||
destroyDB,
|
||||
)
|
||||
if !dbOrBackup {
|
||||
dbOrBackup = true
|
||||
queriers = append(queriers,
|
||||
operator.ResourceQueryToZitadelQuery(queryNS),
|
||||
queryDB,
|
||||
)
|
||||
destroyers = append(destroyers,
|
||||
destroyDB,
|
||||
)
|
||||
}
|
||||
case "operator":
|
||||
queriers = append(queriers,
|
||||
operator.ResourceQueryToZitadelQuery(queryNS),
|
||||
operator.EnsureFuncToQueryFunc(Reconcile(monitor, desiredKind.Spec, gitops)),
|
||||
operator.EnsureFuncToQueryFunc(rec),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user