feat: enable running ZITADEL offline (#1894)

* feat: enable running ZITADEL offline

* refactor: move operator image to common images

* test: remove empty test
This commit is contained in:
Elio Bischof
2021-06-25 08:56:22 +00:00
committed by GitHub
parent c6c60d1d2a
commit b2b53ae9e1
44 changed files with 408 additions and 127 deletions
+1
View File
@@ -85,6 +85,7 @@ func AdaptFunc(
desiredKind.Spec.Tolerations,
desiredKind.Spec.Version,
features,
desiredKind.Spec.CustomImageRegistry,
)
if err != nil {
return nil, nil, nil, nil, nil, migrate, err
+2 -2
View File
@@ -19,8 +19,8 @@ type Spec struct {
Tolerations []corev1.Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
SelfReconciling bool `json:"selfReconciling" yaml:"selfReconciling"`
//Use this registry to pull the Database operator image from
//@default: ghcr.io
//Use this registry to pull container images from
//@default: <multiple public registries>
CustomImageRegistry string `json:"customImageRegistry,omitempty" yaml:"customImageRegistry,omitempty"`
}
+1 -6
View File
@@ -24,11 +24,6 @@ func Reconcile(
return err
}
imageRegistry := spec.CustomImageRegistry
if imageRegistry == "" {
imageRegistry = "ghcr.io"
}
if spec.SelfReconciling {
desiredTree := &tree.Tree{
Common: &tree.Common{
@@ -37,7 +32,7 @@ func Reconcile(
},
}
if err := zitadelKubernetes.EnsureDatabaseArtifacts(monitor, treelabels.MustForAPI(desiredTree, mustDatabaseOperator(&spec.Version)), k8sClient, spec.Version, spec.NodeSelector, spec.Tolerations, imageRegistry, gitops); err != nil {
if err := zitadelKubernetes.EnsureDatabaseArtifacts(monitor, treelabels.MustForAPI(desiredTree, mustDatabaseOperator(&spec.Version)), k8sClient, spec.Version, spec.NodeSelector, spec.Tolerations, spec.CustomImageRegistry, gitops); err != nil {
recMonitor.Error(errors.Wrap(err, "Failed to deploy database-operator into k8s-cluster"))
return err
}