Skip to content

Commit fe6e39e

Browse files
iQQBotmustard-mhcsweichelsagor999
authored andcommitted
[workspace] support user upload ssh keys
Co-authored-by: Huiwen <[email protected]> Co-authored-by: Christian Weichel <[email protected]> Co-authored-by: Pavel Tumik <[email protected]>
1 parent 8dad2f1 commit fe6e39e

File tree

16 files changed

+1814
-356
lines changed

16 files changed

+1814
-356
lines changed

components/common-go/kubernetes/kubernetes.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ const (
6565

6666
// WorkspaceExposedPorts contains the exposed ports in the workspace
6767
WorkspaceExposedPorts = "gitpod/exposedPorts"
68+
69+
// WorkspaceSSHPublicKeys contains all authorized ssh public keys that can be connected to the workspace
70+
WorkspaceSSHPublicKeys = "gitpod.io/sshPublicKeys"
6871
)
6972

7073
// WorkspaceSupervisorEndpoint produces the supervisor endpoint of a workspace.

components/ws-manager-api/core.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ service WorkspaceManager {
4343

4444
// deleteVolumeSnapshot asks ws-manager to delete specific volume snapshot and delete source from cloud provider as well
4545
rpc DeleteVolumeSnapshot(DeleteVolumeSnapshotRequest) returns (DeleteVolumeSnapshotResponse) {}
46+
47+
// UpdateSSHKey update ssh keys
48+
rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {}
4649
}
4750

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

258+
// UpdateSSHKeyRequest update ssh public key
259+
message UpdateSSHKeyRequest {
260+
// ID is the unique identifier of the workspace
261+
string id = 1;
262+
263+
// keys is a set of authorized_keys
264+
repeated string keys = 2;
265+
}
266+
267+
// UpdateSSHKeyResponse is the answer to a upload ssh key request
268+
message UpdateSSHKeyResponse {}
269+
255270
// WorkspaceStatus describes a workspace status
256271
message WorkspaceStatus {
257272
// ID is the unique identifier of the workspace
@@ -540,6 +555,9 @@ message StartWorkspaceSpec {
540555

541556
// volume_snapshot to use to restore PVC from, if set
542557
VolumeSnapshotInfo volume_snapshot = 14;
558+
559+
// ssh_public_keys is user's uploaded ssh public keys
560+
repeated string ssh_public_keys = 15;
543561
}
544562

545563
// WorkspaceFeatureFlag enable non-standard behaviour in workspaces
@@ -624,3 +642,9 @@ message ExposedPorts {
624642
// ports is the set of ports which ought to be exposed to the internet
625643
repeated PortSpec ports = 1;
626644
}
645+
646+
// SSHPublicKeys describes the user's uploaded ssh public keys, it will be used only in annotations.
647+
message SSHPublicKeys {
648+
// keys is the set of ssh public key
649+
repeated string keys = 1;
650+
}

0 commit comments

Comments
 (0)