mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 20:38:47 +00:00
feat(operator): make running ZITADEL easy (#1562)
* docs: describe crd mode * docs: fix links * docs: fix commands and crdb resources * feat: add configure command * chore: use latest ORBOS * chore: use latest ORBOS * docs: start gitops docs * fix: compile * chore: fix build script path * chore: remove redundant prebuild * chore: add configure.go * docs: describe gitops mode * docs: point template links to main branch * docs: fix versions * feat: initialize empty keys * feat: reconfigure running ZITADEL * docs: describe crd mode * docs: fix links * docs: fix commands and crdb resources * feat: add configure command * chore: use latest ORBOS * chore: use latest ORBOS * docs: start gitops docs * fix: compile * chore: fix build script path * chore: remove redundant prebuild * chore: add configure.go * docs: describe gitops mode * docs: point template links to main branch * docs: fix versions * feat: initialize empty keys * feat: reconfigure running ZITADEL * test: fix * docs: keys are generated with configure * docs: remove keys from template * chore: pass compile time data * chore: use latest ORBOS * fix: when in-cluster, use in-cluster k8s client * fix: try in-cluster config if kubeconfig is empty * fix: reduce unneeded side effects for configure command * docs: boom version * chore: use latest ORBOS * chore: use latest ORBOS * initial commit * inital changes * commit WIP Information Architecture * commit a working state * add static assets and project * add org and fix img names * add plausible * remove img * change sidebar to easier mgmt * add openid oauth and domains * lint md * quickstarts * add auth flow * identity brokering * remove site * fix broken links * extend footer * extend readme * fix: styling * fix: zitadel logo on index * styling * border * fix: nav * fix: nav * fix: index * fix: corrected zitadelctl examples * fix: rename architecture to concepts * fix: introductions * fix: introductions * fix: introductions * docs: cli r/w secrets examples * docs: finish ZITADEL Enterprise Cloud * docs: mention ZITADEL Enterprise Cloud tier * docs: comment configuration options * docs: fix broken links * docs: move some introduction texts around * docs: twilio and email are mandatory * docs: download latest binaries Co-authored-by: Florian Forster <[email protected]> Co-authored-by: fabi <[email protected]> Co-authored-by: Livio Amstutz <[email protected]> Co-authored-by: Stefan Benz <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
fabi
Livio Amstutz
Stefan Benz
parent
06281b5ccb
commit
c0878e4509
@@ -15,7 +15,7 @@ import (
|
||||
core "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
func GetQueryAndDestroyFuncs(
|
||||
func Adapt(
|
||||
monitor mntr.Monitor,
|
||||
operatorLabels *labels.Operator,
|
||||
desiredTree *tree.Tree,
|
||||
@@ -30,6 +30,7 @@ func GetQueryAndDestroyFuncs(
|
||||
) (
|
||||
query operator.QueryFunc,
|
||||
destroy operator.DestroyFunc,
|
||||
configure operator.ConfigureFunc,
|
||||
secrets map[string]*secret.Secret,
|
||||
existing map[string]*secret.Existing,
|
||||
migrate bool,
|
||||
@@ -47,6 +48,6 @@ func GetQueryAndDestroyFuncs(
|
||||
apiLabels := labels.MustForAPI(operatorLabels, "ZITADEL", desiredTree.Common.Version)
|
||||
return zitadel.AdaptFunc(apiLabels, nodeselector, tolerations, dbClient, namespace, action, version, features)(monitor, desiredTree, currentTree)
|
||||
default:
|
||||
return nil, nil, nil, nil, false, errors.Errorf("unknown iam kind %s", desiredTree.Common.Kind)
|
||||
return nil, nil, nil, nil, nil, false, errors.Errorf("unknown iam kind %s", desiredTree.Common.Kind)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@ package zitadel
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/caos/orbos/pkg/helper"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/caos/orbos/pkg/labels"
|
||||
"github.com/caos/orbos/pkg/secret"
|
||||
"github.com/caos/zitadel/operator/zitadel/kinds/iam/zitadel/database"
|
||||
@@ -39,6 +43,7 @@ func AdaptFunc(
|
||||
) (
|
||||
operator.QueryFunc,
|
||||
operator.DestroyFunc,
|
||||
operator.ConfigureFunc,
|
||||
map[string]*secret.Secret,
|
||||
map[string]*secret.Existing,
|
||||
bool,
|
||||
@@ -49,7 +54,7 @@ func AdaptFunc(
|
||||
|
||||
desiredKind, err := parseDesiredV0(desired)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, errors.Wrap(err, "parsing desired state failed")
|
||||
return nil, nil, nil, nil, nil, false, errors.Wrap(err, "parsing desired state failed")
|
||||
}
|
||||
desired.Parsed = desiredKind
|
||||
|
||||
@@ -92,7 +97,7 @@ func AdaptFunc(
|
||||
uiServiceName,
|
||||
uint16(uiPort))
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
getQueryC, destroyC, getConfigurationHashes, err := configuration.AdaptFunc(
|
||||
@@ -111,7 +116,7 @@ func AdaptFunc(
|
||||
services.GetClientIDFunc(namespace, httpServiceName, httpPort),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
queryDB, err := database.AdaptFunc(
|
||||
@@ -119,7 +124,7 @@ func AdaptFunc(
|
||||
dbClient,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
queryM, destroyM, err := migration.AdaptFunc(
|
||||
@@ -134,7 +139,7 @@ func AdaptFunc(
|
||||
tolerations,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
getQuerySetup, destroySetup, err := setup.AdaptFunc(
|
||||
@@ -155,7 +160,7 @@ func AdaptFunc(
|
||||
secretPasswordName,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
queryD, destroyD, err := deployment.AdaptFunc(
|
||||
@@ -182,7 +187,7 @@ func AdaptFunc(
|
||||
setup.GetDoneFunc(monitor, namespace, action),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
queryAmbassador, destroyAmbassador, err := ambassador.AdaptFunc(
|
||||
@@ -195,7 +200,7 @@ func AdaptFunc(
|
||||
desiredKind.Spec.Configuration.DNS,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
|
||||
destroyers := make([]operator.DestroyFunc, 0)
|
||||
@@ -217,33 +222,58 @@ func AdaptFunc(
|
||||
}
|
||||
}
|
||||
|
||||
concatQueriers := func(queriers ...operator.QueryFunc) operator.QueryFunc {
|
||||
return func(k8sClient kubernetes.ClientInt, queried map[string]interface{}) (ensureFunc operator.EnsureFunc, err error) {
|
||||
return operator.QueriersToEnsureFunc(
|
||||
monitor,
|
||||
true,
|
||||
queriers,
|
||||
k8sClient,
|
||||
queried,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
queryCfg := func(k8sClient kubernetes.ClientInt, queried map[string]interface{}) (ensureFunc operator.EnsureFunc, err error) {
|
||||
users, err := getAllUsers(k8sClient, desiredKind)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return concatQueriers(
|
||||
queryDB,
|
||||
getQueryC(users),
|
||||
operator.EnsureFuncToQueryFunc(configuration.GetReadyFunc(
|
||||
monitor,
|
||||
namespace,
|
||||
secretName,
|
||||
secretVarsName,
|
||||
secretPasswordName,
|
||||
cmName,
|
||||
consoleCMName,
|
||||
)),
|
||||
)(k8sClient, queried)
|
||||
}
|
||||
|
||||
queryReadyD := operator.EnsureFuncToQueryFunc(deployment.GetReadyFunc(monitor, namespace, zitadelDeploymentName))
|
||||
|
||||
return func(k8sClient kubernetes.ClientInt, queried map[string]interface{}) (operator.EnsureFunc, error) {
|
||||
users, err := getAllUsers(k8sClient, desiredKind)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
allZitadelUsers, err := getZitadelUserList(k8sClient, desiredKind)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
queryReadyM := operator.EnsureFuncToQueryFunc(migration.GetDoneFunc(monitor, namespace, action))
|
||||
queryC := getQueryC(users)
|
||||
queryReadyC := operator.EnsureFuncToQueryFunc(configuration.GetReadyFunc(monitor, namespace, secretName, secretVarsName, secretPasswordName, cmName, consoleCMName))
|
||||
querySetup := getQuerySetup(allZitadelUsers, getConfigurationHashes)
|
||||
queryReadySetup := operator.EnsureFuncToQueryFunc(setup.GetDoneFunc(monitor, namespace, action))
|
||||
queryD := queryD(allZitadelUsers, getConfigurationHashes)
|
||||
queryReadyD := operator.EnsureFuncToQueryFunc(deployment.GetReadyFunc(monitor, namespace, zitadelDeploymentName))
|
||||
|
||||
queriers := make([]operator.QueryFunc, 0)
|
||||
for _, feature := range features {
|
||||
switch feature {
|
||||
case "migration":
|
||||
queriers = append(queriers,
|
||||
queryDB,
|
||||
//configuration
|
||||
queryC,
|
||||
queryReadyC,
|
||||
queryCfg,
|
||||
//migration
|
||||
queryM,
|
||||
queryReadyM,
|
||||
@@ -251,10 +281,8 @@ func AdaptFunc(
|
||||
)
|
||||
case "iam":
|
||||
queriers = append(queriers,
|
||||
queryDB,
|
||||
//configuration
|
||||
queryC,
|
||||
queryReadyC,
|
||||
queryCfg,
|
||||
//migration
|
||||
queryM,
|
||||
queryReadyM,
|
||||
@@ -267,8 +295,7 @@ func AdaptFunc(
|
||||
queryD,
|
||||
queryReadyD,
|
||||
//handle change if necessary for clientID
|
||||
queryC,
|
||||
queryReadyC,
|
||||
queryCfg,
|
||||
//again apply deployment if config changed
|
||||
queryD,
|
||||
queryReadyD,
|
||||
@@ -289,6 +316,78 @@ func AdaptFunc(
|
||||
return operator.QueriersToEnsureFunc(internalMonitor, true, queriers, k8sClient, queried)
|
||||
},
|
||||
operator.DestroyersToDestroyFunc(monitor, destroyers),
|
||||
func(k8sClient kubernetes.ClientInt, queried map[string]interface{}, gitops bool) error {
|
||||
|
||||
if desiredKind.Spec == nil {
|
||||
desiredKind.Spec = &Spec{}
|
||||
}
|
||||
if desiredKind.Spec.Configuration == nil {
|
||||
desiredKind.Spec.Configuration = &configuration.Configuration{}
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets == nil {
|
||||
desiredKind.Spec.Configuration.Secrets = &configuration.Secrets{}
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.CookieID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.CookieID = "cookiekey_1"
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.OTPVerificationID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.OTPVerificationID = "otpverificationkey_1"
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.DomainVerificationID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.DomainVerificationID = "domainverificationkey_1"
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.IDPConfigVerificationID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.IDPConfigVerificationID = "idpconfigverificationkey_1"
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.OIDCKeysID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.OIDCKeysID = "oidckey_1"
|
||||
}
|
||||
if desiredKind.Spec.Configuration.Secrets.UserVerificationID == "" {
|
||||
desiredKind.Spec.Configuration.Secrets.UserVerificationID = "userverificationkey_1"
|
||||
}
|
||||
if gitops && desiredKind.Spec.Configuration.Secrets.Keys == nil {
|
||||
desiredKind.Spec.Configuration.Secrets.Keys = &secret.Secret{}
|
||||
}
|
||||
if !gitops && desiredKind.Spec.Configuration.Secrets.ExistingKeys == nil {
|
||||
desiredKind.Spec.Configuration.Secrets.ExistingKeys = &secret.Existing{}
|
||||
}
|
||||
|
||||
keys := make(map[string]string)
|
||||
if gitops {
|
||||
if err := yaml.Unmarshal([]byte(desiredKind.Spec.Configuration.Secrets.Keys.Value), keys); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return errors.New("configure is not yet implemented for CRD mode")
|
||||
}
|
||||
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.CookieID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.CookieID] = helper.RandStringBytes(32)
|
||||
}
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.OTPVerificationID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.OTPVerificationID] = helper.RandStringBytes(32)
|
||||
}
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.DomainVerificationID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.DomainVerificationID] = helper.RandStringBytes(32)
|
||||
}
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.IDPConfigVerificationID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.IDPConfigVerificationID] = helper.RandStringBytes(32)
|
||||
}
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.OIDCKeysID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.OIDCKeysID] = helper.RandStringBytes(32)
|
||||
}
|
||||
if _, ok := keys[desiredKind.Spec.Configuration.Secrets.UserVerificationID]; !ok {
|
||||
keys[desiredKind.Spec.Configuration.Secrets.UserVerificationID] = helper.RandStringBytes(32)
|
||||
}
|
||||
|
||||
newKeys, err := yaml.Marshal(keys)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
desiredKind.Spec.Configuration.Secrets.Keys.Value = string(newKeys)
|
||||
return nil
|
||||
},
|
||||
allSecrets,
|
||||
allExisting,
|
||||
false,
|
||||
|
||||
@@ -5,7 +5,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/caos/orbos/pkg/helper"
|
||||
"github.com/caos/orbos/pkg/secret/read"
|
||||
|
||||
"github.com/caos/orbos/pkg/kubernetes"
|
||||
"github.com/caos/zitadel/operator/zitadel/kinds/iam/zitadel/database"
|
||||
)
|
||||
@@ -113,14 +114,14 @@ func literalsSecret(k8sClient kubernetes.ClientInt, desired *Configuration, goog
|
||||
literalsSecret := map[string]string{}
|
||||
if desired != nil {
|
||||
if desired.Tracing != nil && (desired.Tracing.ServiceAccountJSON != nil || desired.Tracing.ExistingServiceAccountJSON != nil) {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Tracing.ServiceAccountJSON, desired.Tracing.ExistingServiceAccountJSON)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Tracing.ServiceAccountJSON, desired.Tracing.ExistingServiceAccountJSON)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
literalsSecret[googleServiceAccountJSONPath] = value
|
||||
}
|
||||
if desired.Secrets != nil && (desired.Secrets.Keys != nil || desired.Secrets.ExistingKeys != nil) {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Secrets.Keys, desired.Secrets.ExistingKeys)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Secrets.Keys, desired.Secrets.ExistingKeys)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -135,28 +136,28 @@ func literalsSecretVars(k8sClient kubernetes.ClientInt, desired *Configuration)
|
||||
if desired != nil {
|
||||
if desired.Notifications != nil {
|
||||
if desired.Notifications.Email.AppKey != nil || desired.Notifications.Email.ExistingAppKey != nil {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Notifications.Email.AppKey, desired.Notifications.Email.ExistingAppKey)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Notifications.Email.AppKey, desired.Notifications.Email.ExistingAppKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
literalsSecretVars["ZITADEL_EMAILAPPKEY"] = value
|
||||
}
|
||||
if desired.Notifications.GoogleChatURL != nil || desired.Notifications.ExistingGoogleChatURL != nil {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Notifications.GoogleChatURL, desired.Notifications.ExistingGoogleChatURL)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Notifications.GoogleChatURL, desired.Notifications.ExistingGoogleChatURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
literalsSecretVars["ZITADEL_GOOGLE_CHAT_URL"] = value
|
||||
}
|
||||
if desired.Notifications.Twilio.AuthToken != nil || desired.Notifications.Twilio.ExistingAuthToken != nil {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Notifications.Twilio.AuthToken, desired.Notifications.Twilio.ExistingAuthToken)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Notifications.Twilio.AuthToken, desired.Notifications.Twilio.ExistingAuthToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
literalsSecretVars["ZITADEL_TWILIO_AUTH_TOKEN"] = value
|
||||
}
|
||||
if desired.Notifications.Twilio.SID != nil || desired.Notifications.Twilio.ExistingSID != nil {
|
||||
value, err := helper.GetSecretValue(k8sClient, desired.Notifications.Twilio.SID, desired.Notifications.Twilio.ExistingSID)
|
||||
value, err := read.GetSecretValue(k8sClient, desired.Notifications.Twilio.SID, desired.Notifications.Twilio.ExistingSID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ package zitadel
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/caos/orbos/pkg/helper"
|
||||
"github.com/caos/orbos/pkg/secret/read"
|
||||
|
||||
"github.com/caos/orbos/pkg/kubernetes"
|
||||
"github.com/caos/orbos/pkg/secret"
|
||||
|
||||
@@ -81,7 +82,7 @@ func fillInUserPassword(
|
||||
return nil
|
||||
}
|
||||
|
||||
pw, err := helper.GetSecretValue(k8sClient, secret, existing)
|
||||
pw, err := read.GetSecretValue(k8sClient, secret, existing)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ func AdaptFunc(
|
||||
) (
|
||||
queryFunc operator.QueryFunc,
|
||||
destroyFunc operator.DestroyFunc,
|
||||
configureFunc operator.ConfigureFunc,
|
||||
allSecrets map[string]*secret.Secret,
|
||||
allExisting map[string]*secret.Existing,
|
||||
migrate bool,
|
||||
@@ -47,7 +48,7 @@ func AdaptFunc(
|
||||
|
||||
desiredKind, err := ParseDesiredV0(desiredTree)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, errors.Wrap(err, "parsing desired state failed")
|
||||
return nil, nil, nil, nil, nil, false, errors.Wrap(err, "parsing desired state failed")
|
||||
}
|
||||
desiredTree.Parsed = desiredKind
|
||||
currentTree = &tree.Tree{}
|
||||
@@ -61,7 +62,7 @@ func AdaptFunc(
|
||||
dbClientT, err := zitadeldb.NewGitOpsClient(monitor, orbconfig.URL, orbconfig.Repokey)
|
||||
if err != nil {
|
||||
monitor.Error(err)
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
dbClient = dbClientT
|
||||
} else {
|
||||
@@ -72,7 +73,7 @@ func AdaptFunc(
|
||||
|
||||
queryNS, err := namespace.AdaptFuncToEnsure(namespaceName)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
/*destroyNS, err := namespace.AdaptFuncToDestroy(namespaceName)
|
||||
if err != nil {
|
||||
@@ -80,7 +81,7 @@ func AdaptFunc(
|
||||
}*/
|
||||
|
||||
iamCurrent := &tree.Tree{}
|
||||
queryIAM, destroyIAM, zitadelSecrets, zitadelExisting, migrateIAM, err := iam.GetQueryAndDestroyFuncs(
|
||||
queryIAM, destroyIAM, configureIAM, zitadelSecrets, zitadelExisting, migrateIAM, err := iam.Adapt(
|
||||
orbMonitor,
|
||||
operatorLabels,
|
||||
desiredKind.IAM,
|
||||
@@ -94,7 +95,7 @@ func AdaptFunc(
|
||||
features,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, false, err
|
||||
return nil, nil, nil, nil, nil, false, err
|
||||
}
|
||||
migrate = migrate || migrateIAM
|
||||
secret.AppendSecrets("", allSecrets, zitadelSecrets, allExisting, zitadelExisting)
|
||||
@@ -134,6 +135,9 @@ func AdaptFunc(
|
||||
monitor.WithField("destroyers", len(queriers)).Info("Destroy")
|
||||
return operator.DestroyersToDestroyFunc(monitor, destroyers)(k8sClient)
|
||||
},
|
||||
func(k8sClient kubernetes.ClientInt, queried map[string]interface{}, gitops bool) error {
|
||||
return configureIAM(k8sClient, queried, gitops)
|
||||
},
|
||||
allSecrets,
|
||||
allExisting,
|
||||
migrate,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package zitadel
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/caos/zitadel/operator"
|
||||
|
||||
"github.com/caos/orbos/mntr"
|
||||
@@ -27,12 +25,7 @@ func Takeoff(
|
||||
}
|
||||
treeCurrent := &tree.Tree{}
|
||||
|
||||
if !k8sClient.Available() {
|
||||
internalMonitor.Error(errors.New("kubeclient is not available"))
|
||||
return err
|
||||
}
|
||||
|
||||
query, _, _, _, _, err := adapt(internalMonitor, treeDesired, treeCurrent)
|
||||
query, _, _, _, _, _, err := adapt(internalMonitor, treeDesired, treeCurrent)
|
||||
if err != nil {
|
||||
internalMonitor.Error(err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user