Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ws-proxy, ws-manager] support user upload ssh public key #10617

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/common-go/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ const (

// WorkspaceExposedPorts contains the exposed ports in the workspace
WorkspaceExposedPorts = "gitpod/exposedPorts"

// WorkspaceSSHPublicKeys contains all authorized ssh public keys that can be connected to the workspace
WorkspaceSSHPublicKeys = "gitpod.io/sshPublicKeys"
)

// WorkspaceSupervisorEndpoint produces the supervisor endpoint of a workspace.
Expand Down
24 changes: 24 additions & 0 deletions components/ws-manager-api/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ service WorkspaceManager {

// deleteVolumeSnapshot asks ws-manager to delete specific volume snapshot and delete source from cloud provider as well
rpc DeleteVolumeSnapshot(DeleteVolumeSnapshotRequest) returns (DeleteVolumeSnapshotResponse) {}

// UpdateSSHKey update ssh keys
rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {}
}

// MetadataFilter describes conditions for matching a set of workspaces.
Expand Down Expand Up @@ -252,6 +255,18 @@ message BackupWorkspaceResponse {
string url = 1;
}

// UpdateSSHKeyRequest update ssh public key
message UpdateSSHKeyRequest {
// ID is the unique identifier of the workspace
string id = 1;

// keys is a set of authorized_keys
repeated string keys = 2;
}

// UpdateSSHKeyResponse is the answer to a upload ssh key request
message UpdateSSHKeyResponse {}

// WorkspaceStatus describes a workspace status
message WorkspaceStatus {
// ID is the unique identifier of the workspace
Expand Down Expand Up @@ -540,6 +555,9 @@ message StartWorkspaceSpec {

// volume_snapshot to use to restore PVC from, if set
VolumeSnapshotInfo volume_snapshot = 14;

// ssh_public_keys is user's uploaded ssh public keys
repeated string ssh_public_keys = 15;
}

// WorkspaceFeatureFlag enable non-standard behaviour in workspaces
Expand Down Expand Up @@ -624,3 +642,9 @@ message ExposedPorts {
// ports is the set of ports which ought to be exposed to the internet
repeated PortSpec ports = 1;
}

// SSHPublicKeys describes the user's uploaded ssh public keys, it will be used only in annotations.
message SSHPublicKeys {
// keys is the set of ssh public key
repeated string keys = 1;
iQQBot marked this conversation as resolved.
Show resolved Hide resolved
}
Loading