Skip to content

Commit 2f02f10

Browse files
committed
Draft: do observables as interface
1 parent 45683f4 commit 2f02f10

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

internal/controller/etcdcluster_controller_new.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,13 @@ func (r *ClusterReconciler) etcdClusterConfig(ctx context.Context, cluster *etcd
333333

334334
// todo: implement this
335335
func (r *ClusterReconciler) createClusterFromScratch(ctx context.Context, state *observables) error {
336-
panic("not implemented")
336+
if err := r.createOrUpdateClusterStateConfigMap(ctx, state); err != nil {
337+
return err
338+
}
339+
if err := r.createOrUpdateStatefulSet(ctx, state); err != nil {
340+
return err
341+
}
342+
return nil
337343
}
338344

339345
// todo: implement this

internal/controller/state.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package controller
2+
3+
type State interface {
4+
ClusterExists() bool
5+
}

0 commit comments

Comments
 (0)