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:
Stefan Benz
2021-07-20 15:47:48 +02:00
committed by GitHub
co-authored by Elio Bischof
parent 413ed80611
commit 25c9d7371d
48 changed files with 1084 additions and 275 deletions
@@ -45,7 +45,7 @@ func SetQueriedForDatabase(queried map[string]interface{}, databaseCurrent *tree
queried[queriedName] = databaseCurrent
}
func SetQueriedForDatabaseDBList(queried map[string]interface{}, databases []string) {
func SetQueriedForDatabaseDBList(queried map[string]interface{}, databases, users []string) {
currentDBList := &CurrentDBList{
Common: &tree.Common{
Kind: "DBList",
@@ -53,6 +53,7 @@ func SetQueriedForDatabaseDBList(queried map[string]interface{}, databases []str
},
Current: &DatabaseCurrentDBList{
Databases: databases,
Users: users,
},
}
@@ -16,6 +16,7 @@ type CurrentDBList struct {
type DatabaseCurrentDBList struct {
Databases []string
Users []string
}
func (c *CurrentDBList) GetURL() string {
@@ -53,7 +54,9 @@ func (c *CurrentDBList) GetListDatabasesFunc() func(k8sClient kubernetes.ClientI
}
func (c *CurrentDBList) GetListUsersFunc() func(k8sClient kubernetes.ClientInt) ([]string, error) {
return nil
return func(k8sClient kubernetes.ClientInt) ([]string, error) {
return c.Current.Users, nil
}
}
func (c *CurrentDBList) GetAddUserFunc() func(user string) (operator.QueryFunc, error) {