Skip to content

Commit 6341764

Browse files
committed
Mark the AddSshAgentPostStartEvent as experimental feature
Signed-off-by: ivinokur <[email protected]>
1 parent ff72383 commit 6341764

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

controllers/workspace/devworkspace_controller.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,12 @@ func (r *DevWorkspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request
281281
}
282282
workspace.Spec.Template = *flattenedWorkspace
283283

284-
err = ssh.AddSshAgentPostStartEvent(&workspace.Spec.Template)
285-
if err != nil {
286-
return r.failWorkspace(workspace, "Failed to add ssh-agent post start event", metrics.ReasonWorkspaceEngineFailure, reqLogger, &reconcileStatus), nil
284+
// Include to experimental features list because it is not clear how to handle post start events in containers without sh.
285+
if *config.EnableExperimentalFeatures {
286+
err = ssh.AddSshAgentPostStartEvent(&workspace.Spec.Template)
287+
if err != nil {
288+
return r.failWorkspace(workspace, "Failed to add ssh-agent post start event", metrics.ReasonWorkspaceEngineFailure, reqLogger, &reconcileStatus), nil
289+
}
287290
}
288291

289292
reconcileStatus.setConditionTrue(conditions.DevWorkspaceResolved, "Resolved plugins and parents from DevWorkspace")

docs/additional-configuration.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ you must add the following in your `~/.bashrc`:
225225
----
226226
[ -f $HOME/ssh-environment ] && source $HOME/ssh-environment
227227
----
228+
*Note:* This is an experimental feature and is controlled by the `DevWorkspaceOperatorConfig.EnableExperimentalFeatures` option.
228229
229230
3. Annotate the secret to configure automatic mounting to DevWorkspaces
230231
+

0 commit comments

Comments
 (0)