Skip to content

Commit

Permalink
fixup! Apply ssh askpass flow for the workspace container
Browse files Browse the repository at this point in the history
  • Loading branch information
vinokurig committed Sep 9, 2024
1 parent 08c8c5a commit afd7075
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/workspace/devworkspace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func (r *DevWorkspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request
}

// Add SSH ask-pass script into devfile containers
if err := wsprovision.ProvisionSshSshAskPass(clusterAPI, workspace.Namespace, devfilePodAdditions); err != nil {
if err := wsprovision.ProvisionSshAskPass(clusterAPI, workspace.Namespace, devfilePodAdditions); err != nil {
return r.failWorkspace(workspace, fmt.Sprintf("Failed to mount SSH askpass script to workspace: %s", err), metrics.ReasonWorkspaceEngineFailure, reqLogger, &reconcileStatus), nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/provision/workspace/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const SshAskPassScriptFileName = "ssh-askpass.sh"
//go:embed ssh-askpass.sh
var data string

func ProvisionSshSshAskPass(api sync.ClusterAPI, namespace string, podAdditions *v1alpha1.PodAdditions) error {
func ProvisionSshAskPass(api sync.ClusterAPI, namespace string, podAdditions *v1alpha1.PodAdditions) error {
sshAskPassConfigMap := constructSshAskPassCM(namespace)
if _, err := sync.SyncObjectWithCluster(sshAskPassConfigMap, api); err != nil {
switch err.(type) {
Expand Down

0 comments on commit afd7075

Please sign in to comment.