Skip to content

Commit

Permalink
Draft: do observables as interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lllamnyp committed Jan 31, 2025
1 parent 45683f4 commit 2f02f10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/controller/etcdcluster_controller_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,13 @@ func (r *ClusterReconciler) etcdClusterConfig(ctx context.Context, cluster *etcd

// todo: implement this
func (r *ClusterReconciler) createClusterFromScratch(ctx context.Context, state *observables) error {
panic("not implemented")
if err := r.createOrUpdateClusterStateConfigMap(ctx, state); err != nil {
return err
}
if err := r.createOrUpdateStatefulSet(ctx, state); err != nil {
return err
}
return nil
}

// todo: implement this
Expand Down
5 changes: 5 additions & 0 deletions internal/controller/state.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package controller

type State interface {
ClusterExists() bool
}

0 comments on commit 2f02f10

Please sign in to comment.