File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,9 +123,28 @@ func (e *GooseFSEngine) ShouldSetupMaster() (should bool, err error) {
123123 return
124124}
125125
126- // SetupMaster setups the master and updates the status
127- // It will print the information in the Debug window according to the Master status
128- // It return any cache error encountered
126+ // SetupMaster setups the master and updates the status of the runtime.
127+ //
128+ // This function performs the following steps:
129+ // 1. Checks if the master StatefulSet exists:
130+ // - If not found, initializes the master via `setupMasterInternal()`.
131+ // - If found, logs the current ready replicas.
132+ //
133+ // 2. Updates the runtime status:
134+ // - Sets the master phase to `RuntimePhaseNotReady`.
135+ // - Records desired master replicas (defaulting to 1 if unspecified).
136+ // - Initializes worker selectors and sets the value file configmap.
137+ // - Adds a condition indicating the master is initialized.
138+ //
139+ // 3. Uses retry logic to handle concurrent updates to the runtime status.
140+ //
141+ // Parameters:
142+ // - e: *GooseFSEngine
143+ // The engine instance containing client, logger, namespace, and configuration for the GooseFS runtime.
144+ //
145+ // Returns:
146+ // - error
147+ // Returns an error if the master setup fails or the runtime status update encounters an issue.
129148func (e * GooseFSEngine ) SetupMaster () (err error ) {
130149 masterName := e .getMasterName ()
131150
You can’t perform that action at this time.
0 commit comments