mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
25c9d7371d
* 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 <eliobischof@gmail.com> * fix(destroy): needs no self-reconciling Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix(logs): fix double handled error Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Elio Bischof <eliobischof@gmail.com>
25 lines
609 B
Go
25 lines
609 B
Go
package crtlcrd
|
|
|
|
import (
|
|
"github.com/caos/orbos/mntr"
|
|
"github.com/caos/orbos/pkg/kubernetes"
|
|
"github.com/caos/zitadel/operator/crtlcrd/database"
|
|
"github.com/caos/zitadel/operator/crtlcrd/zitadel"
|
|
)
|
|
|
|
func Destroy(monitor mntr.Monitor, k8sClient kubernetes.ClientInt, version string, features ...string) error {
|
|
for _, feature := range features {
|
|
switch feature {
|
|
case Zitadel:
|
|
if err := zitadel.Destroy(monitor, k8sClient, version); err != nil {
|
|
return err
|
|
}
|
|
case Database:
|
|
if err := database.Destroy(monitor, k8sClient, version); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|